Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduce lockDatabase project resolution #1142

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Myriad-Dreamin
Copy link
Owner

@Myriad-Dreamin Myriad-Dreamin commented Jan 9, 2025

Although we have great multiple-files project support in VS Code, we still experiment a sample implementation in VS Code. The new mechanism is put behind a flag. It isn't enabled by default. You can also only use the lockDatabase in some specific workspaces.

  • the CLI or server will update the lock file if one invokes compile/preview commands via CLI or LSP.
  • the server will see the lock file to see what's the best main file to use:
    • If a file is depended by some unique main file recorded in the lock, the main file is used.
    • If a file is depended by multiple main files, the most recently recorded main file wins.
    • otherwise, the language server sets the main file to the file itself.

Even if there is no any editor-side (client-side) additional support, people should be able to tell such information to the language server by invoking CLI in terminal.

We might deprecate the pin/unpin commands if this solution receives positive voice after experiment.

@Myriad-Dreamin Myriad-Dreamin force-pushed the project-history branch 2 times, most recently from 5f1a10d to da907a0 Compare January 13, 2025 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant