fix: recheck dependent calls after import target changes - #23
Draft
JohnXu22786 wants to merge 4 commits into
Draft
JohnXu22786 wants to merge 4 commits into
JohnXu22786 wants to merge 4 commits into
Conversation
When a newly indexed file supersedes an existing import target, revisit calls in importing files so stale callee IDs are cleared or updated.
When an import target changes, keep symbols from the previous target out of fallback resolution so dependent calls cannot retain stale callee IDs.
Resolution retries need the previous import graph so a newly selected target cannot fall back to a symbol in the obsolete target.
Name-based import inference must not reintroduce an older same-module file after a higher-priority target is selected.
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 this PR does
Before this PR:
Incremental indexing rechecked import targets after a higher-priority file was added, but dependent calls in unchanged importing files could retain stale callee_id values. Even after those calls were rechecked, global and same-module fallback could reintroduce symbols from obsolete targets. Failed resolution passes and default, namespace, or CommonJS binding imports had additional stale-target paths.
After this PR:
Incremental and full-graph resolution retries preserve prior import reachability, recheck dependent calls, and exclude obsolete targets from fallback resolution. Name-based import inference now defers to an already-resolved target when both refer to the same module. Focused regressions cover successful and failed-then-retried target changes, globally unique symbols, and default/namespace/CommonJS bindings.
Type of change
fix