I was excited to give this a try but unfortunately, we have to depend on SwiftPM's release/6.1 branch, which in turn pins us on SwiftSyntax's release/6.1. I believe that's the reason I'm not seeing a build time difference - that branch doesn't have any pre-built libraries.
Is that perhaps something that's going to be available at some point or is this only ever to cover SwiftSyntax releases? (I wish we didn't have to depend on SwiftPM but we have to at the moment.)
It's really only for releases at the moment. On the 6.2 branch, I've tightened up the compiler dependency checking so that opens the door to support snapshot builds. Lots more to figure out there first though.
Very excited to try this out on CI today. In my first run I am getting some download errors from swift-collections. It seems to just download the source and build as a backup, but I figured I would bring it up and file a bug if needed.
This is building with Xcode 16.4.
INFO [2025-05-30 08:50:08.11]: ▸ skipping cache due to an error: Couldn’t fetch updates from remote repositories:
INFO [2025-05-30 08:50:08.11]: ▸ POST git-upload-pack (165 bytes)
INFO [2025-05-30 08:50:08.11]: ▸ error: non-monotonic index ./objects/pack/pack-d8d5209b3c67c0fcb18c9f531b10a98e6bf1c35d.idx
INFO [2025-05-30 08:50:08.11]: ▸ error: non-monotonic index ./objects/pack/pack-d8d5209b3c67c0fcb18c9f531b10a98e6bf1c35d.idx
truncated...
INFO [2025-05-30 08:50:08.11]: ▸ error: non-monotonic index ./objects/pack/pack-d8d5209b3c67c0fcb18c9f531b10a98e6bf1c35d.idx
INFO [2025-05-30 08:50:08.11]: ▸ From https://github.com/apple/swift-collections
INFO [2025-05-30 08:50:08.11]: ▸ - [deleted] (none) -> lorentey-patch-2
INFO [2025-05-30 08:50:08.11]: ▸ - [deleted] (none) -> silence-32bit-warning
INFO [2025-05-30 08:50:08.11]: ▸ - [deleted] (none) -> wip-filter-set
INFO [2025-05-30 08:50:08.11]: ▸ - [deleted] (none) -> refs/pull/371/merge
INFO [2025-05-30 08:50:08.11]: ▸ - [deleted] (none) -> refs/pull/390/merge
INFO [2025-05-30 08:50:08.11]: ▸ - [deleted] (none) -> refs/pull/411/merge
and truncated again...
INFO [2025-05-30 10:13:08.88]: ▸ fatal: bad object 762bc5757de4bcf86cc3b3266e3df93f76469089
INFO [2025-05-30 10:13:08.98]: ▸ error: https://github.com/apple/swift-collections.git did not send all necessary objects
I believe I'm seeing this same issue and have made a demo repo. This repo is the result of creating a new macro template in Xcode, but then rewriting the unit test target to use the open source swift-macro-testing library.
The tests run successfully on macOS when not using prebuilts, and start failing with import MyMacroMacros <-- Missing required module 'SwiftCompilerPlugin' when prebuilts are on.
Definitely. Thanks! It's the same issue. The failure happens in Xcode if you have a macro or a macro test that depends on a library that depends on swift-syntax.
Packages can already do binary dependencies by publishing such.
This is only true for Apple platforms. Please, for all that is holy, include that stipulation rather than making grandiose, unqualified, universal statements. I have gone down so many rabbit holes looking for ways to do this on Linux because of the many, many posts on this forum that make similar blanket statements without acknowledging the existence of other platforms.
That binary dependencies still cannot be specified in Package.swift on non-Apple platforms continues to hamper Swift's adoption on those platforms.
The fact that this Swift-Syntax-specific feature supports non-Apple platforms may, some day, lead to fully generalized prebuilt binary dependency support for non-Apple platforms in SwiftPM. Maybe. Until then, those of us hoping to broaden Swift's appeal on those other platforms are being left out in the cold.
I don't think Apple Feedback is necessarily the right place for that either. It looks like a git issue, and therefore the best place to start would be somewhere like Stack Overflow or the git mailing lists on kernel.org.
Is there any possibility this git clone is corrupted with any experimental or development branches that might have been force pushed to new commit hashes?
> xcode-select -p
/Applications/Xcode.app/Contents/Developer
> swift --version
swift-driver version: 1.120.5 Apple Swift version 6.1.2 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
Target: arm64-apple-macosx15.0
This is something I've been waiting for for a long time and it has made a huge difference in our project. On an M4 Pro MBP a clean build has gone down from around 180s to 120s, a 33% improvement!
However, we have run into one issue: when building for Swift UI Previews we get the following build errors:
cannot load module 'SwiftDiagnostics' built with SDK 'macosx15.5'
when using SDK 'iphonesimulator18.5':
/Users/michael/Library/Developer/Xcode/DerivedData/Argent-abjsbansejjcbwcjgelbjpjlnxuc/SourcePackages/prebuilts/swift-syntax/600.0.1/6.1-MacroSupport-macos_aarch64/Modules/SwiftDiagnostics.swiftmodule
We are using the "Legacy Previews Execution" option, if that makes any difference (we never been able to run our previews without this option for reasons which are not clear to us).
Which means we are left between choosing between the productivity benefits of faster builds or the productivity benefits of using SwiftUI Previews