Skip to content

[Completion] Only skip result builder expressions in the same builder #74219

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

Merged
merged 1 commit into from
Jun 8, 2024

Conversation

hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Jun 7, 2024

Previously we would skip any expression in a result builder that didn't contain the completion token, but that would cause issues if e.g the result builder was needed to infer the type of a variable that we're completing on. Instead, only skip expressions in a result builder if the completion token is in the same builder and the expression itself doesn't contain the completion.

rdar://127154780
Resolves #72399

Previously we would skip any expression in a
result builder that didn't contain the completion
token, but that would cause issues if e.g the
result builder was needed to infer the type of a
variable that we're completing on. Instead, only
skip expressions in a result builder if the
completion token is in the same builder and the
expression itself doesn't contain the completion.

rdar://127154780
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please SourceKit stress test

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!

@hamishknight
Copy link
Contributor Author

hamishknight commented Jun 8, 2024

Same stress tester UPASS as on main

@hamishknight hamishknight merged commit 64869e5 into swiftlang:main Jun 8, 2024
5 of 6 checks passed
@hamishknight hamishknight deleted the building-skip branch June 8, 2024 10:17
jefferyq2 pushed a commit to jefferyq2/swift that referenced this pull request Jun 10, 2024
[Completion] Only skip result builder expressions in the same builder
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.

Autocomplete does not work for values that depend on result builder inference
3 participants