forked from chapel-lang/chapel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement whole-workspace reference tracking and update existing feat…
…ures to make use of it (chapel-lang#24445) This PR modifies the 'use tracking' aspect of the language server to lift uses to the "dyno context" level. Since Dyno contexts are created such that one context is shared among multiple files compiled together, this leads to a "workspace-wide rename" functionality. The PR works by replacing the `Dict[NodeId, List[Reference]]` with a `Dict[NodeId, ReferenceList]`, where `ReferenceList` is a new class. The `ReferenceList` class is _also_ inserted into the "dyno context" container, also associated with a `NodeId`. The context-level container is `Dict[NodeId, List[ReferenceList]]`, containing reference lists from multiple files. By making the `ReferenceList` object be shared between the `FileInfo` and the context container, so when the `FileInfo` is updated, so is the corresponding entry in the `ContextContainer`. From there, LSP features that need global symbols (find references, rename) can simply use the context-level list instead of `uses_here`. Reviewed by @jabraham17 -- thanks!
- Loading branch information
Showing
1 changed file
with
57 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters