You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Description
## Problem
Resolves#5774
## Summary
LSP caches open files so that features work relative to open,
potentially unsaved, file buffers. Before analyzing a crate or
processing a package, we add these open files to a FileManager. The
problem was that we were adding all open files, regardless of whether
they belonged to a package. Because we don't always call `check_crate`
on LSP features (for example when you hover we collect a packages files
but don't call `check_crate`) a packages file FileIDs would change if we
added new files that didn't exist before in that package.
It's... kind of hard to explain. But it also makes sense to not add
files that are not relevant to the package. I debugged it for hours
until I found the reason. With this fix LSP should work really well now
(it wasn't working that well in Aztec-Packages).
## Additional Context
None.
## Documentation
Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.
# PR Checklist
- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
Aim
LSP hover (and other features) sometimes works in a wrong way when you navigate to a different file and come back.
For example:
Expected Behavior
Hovering over the same thing should always give you the same result.
Bug
Hover misbehaves.
To Reproduce
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
No response
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: