Hive Hive
Sign in

fix(cli): add xcframework Headers root for cached static-objc-behind-dynamic deps (ARCore) [4.201.x backport]

GitHub issue · Closed

Metadata
Source
tuist/tuist #11510
Updated
Jul 5, 2026
Domains
Cache Generated projects
Details

Backport of #11506 to releases/4.201.x.

Fixes ARCore (and similarly-shaped Google SDK xcframeworks) failing to build when consumed from the binary cache.

What changed

StaticXCFrameworkModuleMapGraphMapper now also adds each matching slice’s Headers root to a consuming target’s HEADER_SEARCH_PATHS, in addition to the module map’s own directory. Clean cherry-pick of the squashed merge commit addbf41 (patch-id verified identical; no conflicts).

Why this is needed on the RC line

The regression chain that produced the customer-reported error lives entirely on this release line:

  • rc.1 (#11290) added all xcframework Headersredefinition of module 'ARCoreGARSession'.
  • rc.2 (#11472 → backport #11482) excluded module-map xcframework headers → fixed the redefinition, but removed the Headers root the cached static-objc-behind-dynamic path needs, surfacing 'ARCoreGARSession/GARTrackingState.h' file not found.
  • This PR restores that root for the cached static-behind-dynamic path only — nested layouts (ARCore) resolve prefixed sibling imports without re-introducing a second discoverable module map, and flat layouts (GoogleMaps) dedupe to no-op.

Without this backport, anyone on 4.201.0-rc.x that caches ARCore is still broken. With #11482 already on this branch, this is the completing fix for the rc.2 trade-off.

How to test locally

  1. tuist generate TuistKit TuistKitTests --no-open
  2. xcodebuild test -workspace Tuist.xcworkspace -scheme Tuist-Workspace -only-testing TuistKitTests/StaticXCFrameworkModuleMapGraphMapperTests CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""

The new test test_map_when_static_xcframework_library_with_nested_module_headers_linked_via_dynamic_xcframework asserts both the module-map dir and the Headers root land on HEADER_SEARCH_PATHS. Full suite green on main.

🤖 Generated with Claude Code

Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments