Conversation
| inserted += 1; | ||
| continue; | ||
| } | ||
| ReceiverTypeInference::KnownButUnresolved => continue, |
There was a problem hiding this comment.
Unresolved fields lose fallback edges
When a direct self.field.method() receiver uses a generic, trait, reference, alias, wrapped, or non-local type that exact inference does not support, KnownButUnresolved skips the existing name-match fallback, causing valid call-tree, reverse-caller, impact, and reachability edges to disappear.
Suggested change
| ReceiverTypeInference::KnownButUnresolved => continue, | |
| ReceiverTypeInference::KnownButUnresolved => {} |
Collaborator
Author
|
Matrix verdict delivered on the rebased head (all jobs green, Windows format flake cleared on rerun); #196 is merged. Closing the CI vehicle. |
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.
Internal CI vehicle for fork PR #196 (fork PRs skip secret-gated jobs on this repo). Not for merge — will be closed after the matrix verdict is posted to #196.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Improves Rust call-graph precision by inferring receiver types for direct
self.field.method()calls and linking only when the field type is provable in the same file and module scope. Also normalizes receiver parsing (including whitespace) and uses candidatestart_lineto locate the correctimpl.New Features
self.fieldwhen both the struct and field type are uniquely declared in the same file/module.receiver_expressionand parse the full left side; trims whitespace around./::/->.start_lineto find the enclosingimplfor accurate scope checks.Bug Fixes
self.fieldbinds to unrelated methods (e.g., same-named types in other modules or stdlib).Written for commit aa340e2. Summary will update on new commits.
Greptile Summary
This PR adds conservative Rust type inference for direct
self.field.method()dispatch and scope-aware candidate selection.implblocks.Confidence Score: 4/5
The PR does not appear safe to merge because unresolved direct Rust self-field receivers still lose otherwise available callgraph edges.
KnownButUnresolvedstill exits dispatch before the approximate name-match fallback, so calls through generic, trait-impl, reference, alias, wrapped, and other unsupported field types can disappear from call trees, reverse callers, impact analysis, and reachability.Files Needing Attention: crates/aft/src/callgraph_store/mod.rs
Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'pr-196' into ci-pr196-reba..." | Re-trigger Greptile