Repository navigation
feat(code-intel): resolve Type::method calls so callers, impact and trace stop merging same-named methods - #738
Merged
Conversation
…race stop merging same-named methods (#714) The call graph was keyed by the bare callee name, so every from_env in a workspace merged into one node, and a type name was never a call target. Rust call sites now record the type or module the call was made through (Type::f(), module::f(), self.f() and Self::f() resolve to the impl type, macro arguments included) together with the impl type of the caller, in two new call_graph columns (schema 9). callers accepts name, Type::name or a type name; Type::name matches calls through that type plus ambiguous calls whose receiver type is unknown, and --strict drops the ambiguous ones. impact follows (type, name) nodes. Bare-name queries behave as before.
Closed
1 task done
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Rust call sites now record the type or module the call was made through (
Type::f(),module::f(), andself.f()/Self::f()resolved to the enclosing impl type, macro arguments included), plus the impl type of the caller, in two newcall_graphcolumns (schema 9).cora callersacceptsname,Type::nameor a bare type name.Type::namematches calls through that type plus ambiguous calls whose receiver type is unknown; the new--strictflag drops the ambiguous ones.impactfollows (type, name) nodes, so same-named methods of other types no longer widen the result.cora index.Why
The call graph was keyed by the bare callee name: every
from_envin a workspace merged into one node, and a type name was never a call target, socallers WebFetchToolfound nothing. Closes #714.Testing
self/Self, ambiguous receiver, macro arguments), qualified and strictfind_callers, type-name queries, typedimpact, query parsing, and the v9 migration.callers WebSearchTool::from_envlists only its real callers,callers WebFetchToollists the calls through the type,--stricthides the untyped receiver.callers default52 results,callers Config::default8;impact Config::default57 affected.cargo fmt --all -- --check,cargo clippy --all-targets --features tree-sitter -- -D warnings,cargo test --features tree-sitter(1359 passed),cora review --base origin/develop: no issues.