dendronhq / dendron

The personal knowledge management (PKM) tool that grows as you do!
https://wiki.dendron.so
Apache License 2.0
6.55k stars 247 forks source link

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

Open acramsay opened 2 years ago

acramsay commented 2 years ago

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

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)

Additional context

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

jonathanyeung commented 2 years ago

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

acramsay commented 2 years ago

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!!