Skip to content

Work around a compiler regression affecting exit test value capturing. #1171

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 3 commits into from
Jun 25, 2025

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Jun 24, 2025

This PR works around a compiler regression (apparently caused by the change in swiftlang/swift#82326) as of Swift acbdfef4f4d71b1 that causes our helper macro #__capturedValue() to be incorrectly expanded (wrong overload is selected.) The workaround is to pass captured values as individual arguments instead of as a tuple. (The workaround is temporary because the use of individual arguments makes the trailing comment argument potentially ambiguous. We'll go back to using a tuple when the compiler bug is fixed.)

Works around rdar://154221449.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

This PR works around a compiler regression as of Swift acbdfef4f4d71b1 that
causes our helper macro `#__capturedValue()` to be incorrectly expanded (wrong
overload is selected.) The workaround is to disable our use of this macro, which
does not affect correct functioning of our code but which does degrade the
quality of our diagnostics.

Works around rdar://154221449.
@grynspan grynspan added this to the Swift 6.x milestone Jun 24, 2025
@grynspan grynspan self-assigned this Jun 24, 2025
@grynspan grynspan added workaround Workaround for an issue in another component (may need to revert later) exit-tests ☠️ Work related to exit tests macros 🔭 Related to Swift macros such as @Test or #expect exit-test-capture-lists 🥍 Work related to exit test capture lists labels Jun 24, 2025
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

Appears to have been caused by swiftlang/swift#82326.

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan grynspan merged commit 77de51d into main Jun 25, 2025
3 checks passed
@grynspan grynspan deleted the jgrynspan/154221449-workaround branch June 25, 2025 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exit-test-capture-lists 🥍 Work related to exit test capture lists exit-tests ☠️ Work related to exit tests macros 🔭 Related to Swift macros such as @Test or #expect workaround Workaround for an issue in another component (may need to revert later)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants