Hive
Remote binary cache reuses an incompatible simulator module when SDK versions differ but the Swift compiler build is identical
GitHub issue · Open
Remote binary cache reuses an incompatible simulator module when SDK versions differ but the Swift compiler build is identical
What happened?
A colleague using Xcode 27.1 uploaded a cached CachedFramework XCFramework (module names are anonymized). All four CI runners use Xcode 27.0. After scheduled maintenance on September 26 removed the local Tuist cache and warmed it, Tuist reported 68 remote hits, 0 local hits, 0 misses. A recorded request for the cached framework’s ZIP returned HTTP 200.
The subsequent CI build failed in SwiftDriver ConsumerFramework while importing cached CachedFramework. The artifact contains binary Swift modules and no .swiftinterface.
The CachedFramework cache key is identical under both Xcode versions. Both the downloaded module and the consumer report Swift 6.4, compiler build swiftlang-6.4.0.34.1 clang-2100.3.34.1; their simulator SDKs differ.
This evidence suggests an SDK compatibility gap in app-module cache identity or artifact validation. In 4.208.0’s CacheGraphContentHasher, configuration, Swift compiler build, and cache format version are added to the graph hash; there is no explicit SDK/Xcode-build fingerprint there. Sources, settings, and dependencies are also hashed, so this observation does not establish every effective hash input.
Expected: an incompatible artifact is rejected and treated as a cache miss/rebuild. Please consider an SDK/Xcode-build fingerprint and compatibility validation.
Issue #4720 was fixed by #4738, which included the full Swift compiler build. This case has the same compiler build. #10598, merged May 5, 2026, adds the macOS SDK to the ProjectDescriptionHelpers key only. Our search found no exact report for this SDK/same-compiler combination.
How do we reproduce it?
The observed failure is confirmed in existing CI. A fresh minimal reproduction has not been independently verified. The general sequence is:
- Using Xcode 27.1, build and upload a framework to the remote binary cache.
- Using Xcode 27.0 with the same sources, settings, dependencies, and Tuist cache account/project, confirm the identical Swift compiler build above and use a separate, initially empty local binary cache.
- Generate the consumer project and obtain a remote cache hit for the framework with the identical cache key.
- Build the consumer for iOS Simulator; the cached binary Swift module fails with an SDK mismatch.
Error log
Excerpt with the module name anonymized; this is not a verbatim log:
Unable to resolve Swift module dependency to a compatible module: 'CachedFramework'
arm64-apple-ios-simulator.swiftmodule: SDK does not match
macOS version
Consumer: macOS 27.0, build 26A428. Producer artifact records OS build 26B5091g; its macOS version was not independently recorded.
Tuist version
Consumer/local: 4.208.0. Producer Tuist version was not independently recorded.
Xcode version
Producer: Xcode 27.1 (27A9269), simulator SDK 27.1 (24A94403). Consumer: Xcode 27.0 (27A266a), simulator SDK 27.0 (24A430).
Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.
Start a Flight and preserve its objective, outcome, and session here.
No GitHub comments yet.