Skip to content

Conversation

stmontgomery
Copy link
Contributor

Cherry-pick this fix landed on main in #574 to release/6.2.

This resolves an issue which can occur when using Xcode 26 Beta with the downloadable Metal toolchain installed, if a target imports Swift Testing. A toolchain override is specified in this scenario, and this causes the existing logic modified by this PR to incorrectly believe it's using a non-Xcode toolchain, which in turn causes the wrong Swift macro plugin flags to be passed, ultimately leading to a failure locating the TestingMacros plugin.

The fix is to recognize all toolchains which have Xcode's prefix, and ensure the default toolchain prefix is used whenever any Xcode toolchain is in use.

Fixes rdar://152088164

…rrectly when using a non-default Xcode toolchain

This resolves an issue which can occur when using Xcode 26 Beta with the downloadable Metal toolchain installed, if a target imports Swift Testing. A toolchain override is specified in this scenario, and this causes the existing logic modified by this PR to incorrectly believe it's using a non-Xcode toolchain, which in turn causes the wrong Swift macro plugin flags to be passed, ultimately leading to a failure locating the `TestingMacros` plugin.

The fix is to recognize all toolchains which have Xcode's prefix, and ensure the default toolchain prefix is used whenever any Xcode toolchain is in use.

Fixes rdar://152088164
@stmontgomery stmontgomery self-assigned this Jun 23, 2025
@stmontgomery stmontgomery added the bug Something isn't working label Jun 23, 2025
@stmontgomery
Copy link
Contributor Author

@swift-ci test

@stmontgomery
Copy link
Contributor Author

@swift-ci test macOS

@stmontgomery stmontgomery merged commit 3bc16fa into swiftlang:release/6.2 Jun 23, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants