fix(rust): keep self method calls on the correct owner - #1882
Merged
Merged
Conversation
This was referenced Sep 16, 2026
bompus
added a commit
to bompus/codegraph
that referenced
this pull request
Sep 16, 2026
Upstream changes: - fix(resolution): resolve awaited TypeScript receivers safely (colbymchenry#1885) - fix(rust): keep self method calls on the correct owner (colbymchenry#1882) - fix(telemetry): honor opt-out (colbymchenry#1880) Conflicts: - CHANGELOG.md (both appended under Fixes; kept fork bullets, added upstream's) - src/resolution/name-matcher.ts (fork's modular/binding architecture vs upstream's awaited-receiver machinery; kept both — awaited caches, lexical scope gating and the matchMethodCall fallback slot in alongside requireReceiverEvidence, guarded/iteration receivers and bound-call factory resolution) Fork-side reconciliation: - matchBoundReceiverCall factory path now requires the callee call to end the initializer (upstream's tail rule), so `await f().chain()` binds the chain result rather than f's return type. - Added `new Cls().factory()` member-factory handling to the same path — upstream resolves the awaited member-factory case via generic name matching that the fork's receiver-evidence gate deliberately blocks. - Re-baselined the fork-owned torture-multilang golden: `self.m()` refs are now emitted owner-scoped; `self.area` resolves via qualified-name (0.9) instead of bare-name exact-match (0.4), and calls to methods absent from Self stay unresolved.
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.
Rust
self.reset()could link to another type'sreset()solely because that method was nearer in the file. Retain the receiver in both extractors and resolve it against the enclosing type, with guards for duplicate type names across modules. Missing or ambiguous owners stay unresolved; valid trait, field, split-impl and local-owner calls remain covered.Fixes #1861. Reuses @L4XB's implementation and original regression tests from #1866, adding duplicate-owner and remove/restore sync coverage. Co-authored-by: L4XB lukas.buck@e-mail.de.
Validation on Linux, Node 24.16, freshly built Rust 1.98.1 kernel:
The additional ownership guard is covered by tests that fail against the original #1866 proposal. Existing #1794 fixture suites (90 tests) and #1784 getter presence were checked on the fresh baseline before resolver edits.