Skip to content

[AST] Clear module lookup cache in SourceFile::addTopLevelDecl #83369

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

Closed
wants to merge 1 commit into from

Conversation

hamishknight
Copy link
Contributor

Completion unfortunately relies on this to add a top-level decl after the lookup table has been built, make sure the decl gets added to it. We ought to fix completion to avoid needing to mutate the AST like this after-the-fact, but this should work around the issue for now.

@hamishknight hamishknight force-pushed the look-up branch 2 times, most recently from 9059042 to 7359f7f Compare August 7, 2025 16:54
@hamishknight
Copy link
Contributor Author

@swift-ci please SourceKit stress test

Completion unfortunately relies on this to add a top-level decl
after the lookup table has been built, make sure the decl gets added
to it. We ought to fix completion to avoid needing to mutate the AST
like this after-the-fact, but this should work around the issue for now.
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight marked this pull request as ready for review August 8, 2025 10:20
@hamishknight hamishknight marked this pull request as draft August 8, 2025 14:10
@hamishknight
Copy link
Contributor Author

Trying a different approach: #83613

@hamishknight hamishknight deleted the look-up branch August 11, 2025 10:12
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