Skip to content

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

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 2 commits into from
Jun 10, 2024

Conversation

hamishknight
Copy link
Contributor

6.0 cherry-pick of #74219 + #74233

  • Explanation: Fixes code completion on values that depend on result builders being solved
  • Scope: Affects code completion around result builders
  • Issue: rdar://127154780, Autocomplete does not work for values that depend on result builder inference #72399
  • Risk: Low, causes us to avoid skipping result builder expressions in more cases, stress tester didn't show any performance-related failures
  • Testing: Added tests to test suite
  • Reviewer: Alex Hoppen

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 hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.0 labels Jun 10, 2024
@hamishknight hamishknight requested a review from bnbarham June 10, 2024 09:24
@hamishknight hamishknight requested a review from a team as a code owner June 10, 2024 09:24
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 1d9981e into swiftlang:release/6.0 Jun 10, 2024
5 checks passed
@hamishknight hamishknight deleted the building-skip-6.0 branch June 10, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants