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
{{ message }}
Repository navigation
index: keep the parent scope of methods (AstNode.parent is computed and then dropped) #807
The Tree-sitter extractors compute the parent scope of a method or field (Type, Class, Outer) and store it in AstNode.parent at about 64 sites, but ExtractedDef has no such field and the symbols table has no column for it, so the value is dropped. cora explore, brain, callers and impact therefore cannot tell Account#balance from Wallet#balance, and only a free-text signature distinguishes them.
Decide whether to keep it: add a parent column to symbols (schema migration, EXTRACTOR_VERSION bump, show it in the search output and use it to disambiguate callers) or remove the field and its 64 assignments.
Why
The information is already computed for every method, so storing it is cheap, and same-named methods on different types are the main source of ambiguous results. Until it is decided the field carries a narrow #[allow(dead_code)] that points here.
Testing
If kept: a migration test, a test that two same-named methods of different types are told apart in explore and callers, and a measurement on a real project (Sinatra for Ruby, this repository for Rust) of how many results become unambiguous.
If removed: cargo check stays warning-free and the allow is gone.
Activity