dendron icon indicating copy to clipboard operation
dendron copied to clipboard

Lookup stops working after updating schema

Open samuelxyz opened this issue 3 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.)

  • [ ] Workspace. VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
  • [x] Lookup. Dendron's Lookup Command
  • [ ] Views. Dendron Preview, Tree View, Side Panels in the UI
  • [x] 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

After updating a schema, the Lookup palette stops functioning properly. Specifically,

  • suggestions are either not given at all, or suggestions for unrelated notes are given, or only some applicable suggestions are given
  • tab completion does not work (does nothing)
  • typing in a note and pressing enter sometimes navigates to the correct note, but will often produce one of the following behaviors instead:
    • nothing happens
    • Dendron navigates to a completely different note
    • Dendron creates a note with a filename that is missing some characters or has extra characters in it

To Reproduce

Steps to reproduce the behavior:

  1. Open a schema yml file
  2. Save the file, causing Dendron to update the schema
  3. Press Ctrl+L to open the lookup palette and attempt to use it.

Expected behavior

The lookup palette works as normal.

Screenshots

Lookup palette with no suggestions: image

Desktop (please complete the following information)

  • OS: Windows 11 Home 10.0.22000
  • Browser (if with published websites; include version): N/A
  • Versions (all that apply to bug):
    • Dendron Extension: v0.107.2
    • VS Code version: 1.70.1
    • Dendron CLI:

Additional context

I first noticed this after editing the daily journal schema. A copy is here: dendron.daily.schema.yml.txt (GitHub does not support uploading .yml files, so I have added a .txt extension.)

dendron.yml.txt (Uploading this just in case, also renamed to a .txt)

Edit: I forgot to add, workaround is to reload the window after editing schema. Reloading causes the lookup palette to go back to normal.

Dendron Log file

dendron.log

samuelxyz avatar Aug 11 '22 23:08 samuelxyz

Thank you for the bug report!

Just want to point out that we don't support multi-level schemas (I'm assuming that you have your schema defined in dendron.daily.schema.yml. This is not supported. Schemas can't have a dot hierarchy in their filename. It may appear to work, but there might be problems down the line)

Regardless, I can reproduce this bug (I've tested with daily.schema.yml with the same content). We'll take a look and let you know when this gets resolved.

hikchoi avatar Aug 12 '22 04:08 hikchoi

Just want to point out that we don't support multi-level schemas (I'm assuming that you have your schema defined in dendron.daily.schema.yml. This is not supported. Schemas can't have a dot hierarchy in their filename. It may appear to work, but there might be problems down the line)

Weird, I don't remember giving it that name. Thanks for pointing that out!

samuelxyz avatar Aug 12 '22 05:08 samuelxyz