rust-lang / rust-lang/rust-analyzer
Resolve vs Record
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
There are two principal ways an IDE can get semantic information.
- By re-deriving it. When asked for goto definition for
use foo::bar::baz, IDE asks for scope of the current module, and then resolvesfoo::bar::bazin this scope - By looking it up in a side-table. When compiler processes
use foo::bar::baz, it records where thebazresolved to, and IDE picks this information.
We are currently mostly biased towards the first approach, but I feel we should move towards the second one long term.
See https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Architecture.20quetion.3A.20to.20remember.20or.20to.20compute for an extended discussion.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or code entry points are identified. Start by reading the issue and the linked Zulip discussion about remembering versus recomputing semantic information; the desired architecture and completion criteria still need to be defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100