Hive Hive
Sign in

Unable to cache SwiftSyntax on tuist 4.60.1

GitHub issue · Open

Metadata
Source
tuist/tuist #8019
Updated
Jun 11, 2026
Domains
CLI Cache
Details

What happened?

I have a project that uses StructuredQueries and I want to cache some of the more expensive dependencies like SwiftSyntax.

Running tuist cache SwiftSyntax and then generating a project gives me this error in Xcode:

I tried to force building with both architectures like this:

tuist cache --architectures arm64,x86_64 SwiftSyntax

but that gives me an error:

Error: The value 'arm64,x86_64' is invalid for '--architectures <architectures>'

This problem also exists in 4.59.2 btw

How do we reproduce it?

Open the fixture ios_app_with_frameworks and make the following changes:

in Tuist/Package.swift:

let package = Package(
name: "SamplePackages",
dependencies: [
.package(
url: "https://github.com/pointfreeco/swift-structured-queries.git",
from: "0.12.1"
),
]
)

in Project.swift

// Framework1
dependencies: [
.target(name: "Framework2-iOS"),
.external(name: "StructuredQueries"),
],

Then tuist install; tuist cache SwiftSyntax; tuist generate

Error log

error shows up in Xcode

macOS version

15.5

Tuist version

4.60.1

Xcode version

16.4

Comments
D
dosubot[bot] Aug 15, 2025

The error with --architectures arm64,x86_64 is because the flag only accepts a single architecture value, not a comma-separated list. As of Tuist 4.60.1, the default is to cache for arm64 only, and there isn’t built-in support for caching a universal (arm64 + x86_64) build in one go. If you need both, you would need to run tuist cache separately for each architecture (e.g., once with --architectures arm64 and once with --architectures x86_64), but there is no documented way to merge these into a single universal xcframework via Tuist right now. This is a known limitation and is related to how Tuist handles xcframeworks and binary caching for Swift packages like SwiftSyntax. Treating SwiftSyntax as a dynamic framework or using xcframeworks directly does not resolve the issue either, according to user and maintainer reports.

For more details, see the recent PR that introduced the --architectures flag and set the default to arm64 only: PR #7977. There are also related discussions about platform and architecture compatibility issues with SwiftSyntax and SwiftSyntaxMacros in Tuist projects: issue #7050, issue #6107.

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about tuist Share Dosu with your team