I’m trying to work out why with Xcode 26.1 if I download a swift-6.1.2-RELEASE toolchain some code using the attribute I mention won’t compile using the toolchain. The same happens with Xcode 16.4 and a 6.1.2 toolchain. It seems it doesn’t see the attribute I mentioned at all and I’d wager it’s something to do with macro implementations not loading due to something different about the compiler or this not being supported. Has anybody had this problem or know of a way to make this work?
It's hard to say without any logs or details about the failures that you're seeing, but my guess is this: unlike macros built from Swift packages, which are standalone executables, the macros that come with Apple's system frameworks are dylibs and they're bundled with the toolchain, not with the SDKs. So a toolchain downloaded from swift.org simply won't have the macro libraries that Xcode would be looking for.
Thanks for the response, the error is Unknown attribute 'Query' with no other indication of a problem. This is part of SwiftData right? Yet the swift-frontend invocation seems to be doing the right thing (I’ve moved Xcode + the toolchain onto my main disk and the Macro.dylib seems to exist in Xcode’s toolchain). It just doesn’t seem to work, should be easy enough to replicate.