Skip to content

[IDE] Perform extension binding after AST mutation #83613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Aug 8, 2025

IDEInspectionSecondPassRequest unfortunately currently relies on mutating the AST after-the-fact, make sure we delay extension binding until after that has happened to ensure we don't attempt to prematurely build incomplete lookup tables. This also allows us to get rid of the ad-hoc extension binding logic in typeCheckContextAt.

This ought to be requestified, but for now let's split it into its
own function.
This allows us to lazily bind extensions after mutating the AST,
ensuring we don't prematurely kick the building of lookup tables.
Now that we correctly bind extensions after mutating the AST, this
is no longer necessary.
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please SourceKit stress test

@hamishknight hamishknight changed the title [IDE] Perform import resolution and extension binding after AST mutation [IDE] Perform extension binding after AST mutation Aug 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant