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

Enable module resolution caching to work, even if the file containing the module has changed #5241

Open
keyboardDrummer opened this issue Mar 22, 2024 · 1 comment
Assignees
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny part: language server Support for LSP in Dafny (server part; client is in ide-vscode repo)

Comments

@keyboardDrummer
Copy link
Member

Currently the Dafny resolution caching will use, as a key for determining whether a module has changed, instead of computing a unique hash for a module, use the unique hash of the file content that the module is in.

This means that if a module is in a file that has changed, there will be no resolution caching for that module.

This is not intuitive, and users that are working with very large files and are suffering from long resolution times, will not think of splitting their project up into smaller files.

@keyboardDrummer keyboardDrummer added kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny part: language server Support for LSP in Dafny (server part; client is in ide-vscode repo) labels Mar 22, 2024
@keyboardDrummer keyboardDrummer self-assigned this Mar 22, 2024
@keyboardDrummer
Copy link
Member Author

This requires working differently with tokens. It means that a token should not store absolute file positions, but should contain a TextAnchor that can be resolved to absolute positions using a TextBuffer. The TextBuffer will contain a map from TextAnchor to offsets that it updates when processing document updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny part: language server Support for LSP in Dafny (server part; client is in ide-vscode repo)
Projects
None yet
Development

No branches or pull requests

1 participant