rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
14.39k stars 1.62k forks source link

We need more incrementality tests #15685

Open Veykril opened 1 year ago

Veykril commented 1 year ago

We currently only have a very few for the defmap here https://github.com/rust-lang/rust-analyzer/blob/87e2c310f9f1770aa09c1223ae4a5b7b8ce33360/crates/hir-def/src/nameres/tests/incremental.rs and while def map incrementality is the most important one to get right we should also check for more things, like typechecking not being invalidated in expected cases etc

Veykril commented 1 month ago

Re-opening this, we still lack a lot of tests for this on differeing levels, especially on bodies wrt to macros I'd say, https://github.com/rust-lang/rust-analyzer/pull/18264 is an important one for this