Missing SwiftMacros.TaskLocalMacros


I'm getting the following errors in Xcode when running the tests for Swift Testing. (see attached image)

I think I've set everything up according to getting started but I could have made an error or the instructions haven't been updated because things are about to change.

I assume from the "KnownIssue"s that this is known but did want to let you know.



This appears to be a bug in the Swift toolchain and is not directly related to swift-testing. The Swift standard library is in the process of reimplementing @TaskLocal as a macro instead of a property wrapper, and this is the sort of diagnostic you might see if the macro couldn't be found.

Thank you

This may be an issue with how macros are "found", @rintaro has been fixing some things in this area recently.

What exact Xcode and toolchain are you using? I'm semi suspecting it may be a problem about custom snapshot toolchains perhaps? :thinking:

Assuming you are using Xcode with a toolchain downloaded from swift.org, this happens because the swift-driver in Xcode doesn't include this patch [6.0] Prefer toolchain's plugins to SDK plugins if the toolchain has stdlib by ktoso · Pull Request #1592 · apple/swift-driver · GitHub.

We're thinking how to workaround this.

1 Like

Hopefully this resolves it

1 Like