dendron icon indicating copy to clipboard operation
dendron copied to clipboard

Using dendronrc.yaml can cause dnedron to fail to load.

Open acramsay opened this issue 2 years ago • 2 comments

Please select the area your bug applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

  • [X ] Workspace. VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
  • [ ] Lookup. Dendron's Lookup Command
  • [ ] Views. Dendron Preview, Tree View, Side Panels in the UI
  • [ ] Schema. Dendron Schemas
  • [ ] Pod. Data import from / export to Dendron
  • [ ] Publish. External Site Publish
  • [ ] Markdown. Markdown features, such as syntax support and features

Describe the bug

When a vault is specified in the dendronrc.yml file, the Vault Add and Vault Remove commands can create a name conflict error. This prevents Dendron from successfully loading.

To Reproduce

  1. Create a new vault named "Personal Notes" via the Vault Add command
  2. Move the vault directory to a new path such as "~/Personal Notes"
  3. Remove the settings related to the "Personal Notes" vault from "dendron.yml" and add them to dendronrc.yml instead
  4. Reload VSCode via the "Developer: Reload Window" command. Dendron loads normally. The "Personal Notes" vault is available
  5. Add a new vault named "Test" via the Vault Add command. The produces an error message: Following vault names have duplicates: Personal Notes
  6. Review the "dendron.yml" file and see that it contains settings for the "Personal Notes" and "Test" vaults.
  7. Remove the settings for the "Personal Notes" vault from dendron.yml
  8. Reload VSCode via the "Developer: Reload Window" command. Dendron loads normally. The "Personal Notes" vault is available
  9. Delete the "Test" vault via the Vault Remove command. This produces the same error and merged data in dendron.yml

Expected behavior

The content of dendronrc.yml should not be merged into dendron.yml. This would also prevent the error message and allow Dendron to function normally.

Desktop (please complete the following information)

  • OS: Windows
  • Versions (all that apply to bug):
    • Dendron Extension: v0.104.1
    • VS Code version: 1.69.2

Additional context

This was discovered while attempting to setup a globally available "Personal Notes" vault that would be accessible in all workspaces in VSCode

acramsay avatar Jul 25 '22 02:07 acramsay

Thanks for finding this issue @Lodrus - dendronrc.yaml is still a germ /alpha stage feature, but we can add an item on our backlog to make the vault configuration better w.r.t dendronrc.yaml

jonathanyeung avatar Jul 26 '22 08:07 jonathanyeung

For reference, this issue spawned from a discussion in Discord: https://discord.com/channels/717965437182410783/999396933930057739

Yes, understood that the feature is still in alpha. Thanks!!

acramsay avatar Jul 26 '22 21:07 acramsay