rust-lang / rust-lang/rust-analyzer
Add first-class limits
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
We have various hard limits everywhere, to makes sure we don't get stuck on overly-long files and such:
We should wrap those raw numbers into some kind of struct Limit. This should give us the following ability:
- run analysis stats and check what was the highest limit achieved (to see if we can tighten some limits up)
- override limits in tests, to make it possible to write fast tests that exercise the limits
- (feature creep?) ability to override the limits via some kind of env-var.
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
Start with the hard limit at crates/hir_def/src/nameres/collector.rs lines 52–55, then identify the other raw limits referenced by the issue. Define the scope of a Limit abstraction around analysis statistics and test overrides, with environment-variable overrides treated as optional feature creep. Done means the agreed limit behavior is implemented across the relevant locations and exercised by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100