Compilation time increase due to swift-syntax dependency #468
-
|
I know the compile time impact if swift-syntax is not the responsibility of pointfreeco. I still wanted to raise a discussion around how others are managing the compile time hit, when adding sqlite-data as a dependency to their projects. sqlite-data is the first library I'm really interested in that uses Swift macros and I just had to revert adding it, because of the compile time downside. Even on the M4 Max it's significant. I've searched around the internet for possible improvements and found this. So you can set My environment is: If anyone has any advice here, I would highly appreciate it. I wouldn't want such a problem to stand between me along with other developers and using such an awesome library. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Prebuilts are really the only solution, and are enabled by default in Xcode 26. Unfortunately it's hard to tell when they're properly available for the right combination of swift-syntax and Xcode, but they do work. Fortunately, a debug build of swift-syntax should only add about 10 - 15 seconds to your build. Unfortunately, the debug macro processes are pretty slow, so the more macros you use the more painful it is. You can also check to make sure you have the new Xcode 26 build caching system turned on in your project settings, it helps quite a bit with repeated swift-syntax builds. I'll see if I can figure where they keep the prebuilt manifests now and make sure they're properly available. |
Beta Was this translation helpful? Give feedback.

Prebuilts are really the only solution, and are enabled by default in Xcode 26. Unfortunately it's hard to tell when they're properly available for the right combination of swift-syntax and Xcode, but they do work. Fortunately, a debug build of swift-syntax should only add about 10 - 15 seconds to your build. Unfortunately, the debug macro processes are pretty slow, so the more macros you use the more painful it is. You can also check to make sure you have the new Xcode 26 build caching system turned on in your project settings, it helps quite a bit with repeated swift-syntax builds. I'll see if I can figure where they keep the prebuilt manifests now and make sure they're properly available.