Hive Hive
Sign in

fix(cli): exclude module-map xcframework headers from search paths [4.201.x backport]

GitHub issue · Closed

Metadata
Source
tuist/tuist #11482
Updated
Jun 24, 2026
Domains
Generated projects
Details

Backport of #11472 to the releases/4.201.x line.

This is a regression introduced in 4.201.0-rc.1 (via #11290), so the fix needs to ship in the current 4.201.0 RC rather than only on the next minor. Cherry-picked cleanly from main (cherry picked from commit 58cea1eb167...).

Summary

Targets depending on a precompiled xcframework that ships a module.modulemap fail to compile with Redefinition of module 'X'.

Xcode’s ProcessXCFramework already extracts the SDK-matching slice’s headers — including any module.modulemap — into $(BUILT_PRODUCTS_DIR)/include, which is on the header search path. Since #11290, GraphTraverser.librariesPublicHeadersFolders additionally adds every xcframework slice’s Headers to HEADER_SEARCH_PATHS, putting a second copy of the same module on the search path → redefinition of module 'X'.

The fix skips those headers when the xcframework ships a module map; module-map-less xcframeworks (the cached Swift/library products from #11290) keep their headers, so that feature is unaffected.

See #11472 for the full root-cause analysis and end-to-end verification (reproduced on 4.201.0-canary.13, unit tests, and a clean rebuild with the patched CLI).

🤖 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
T
tuist[bot] Jun 24, 2026

🛠️ Tuist Run Report 🛠️

Tests 🧪
Scheme Status Cache hit rate Tests Skipped Ran Commit
TuistUnitTests 82 % 3003 5 2998 e103d52d4
Flaky Tests ⚠️
  • TuistUnitTests: 3 flaky tests (View all)
Test case Module Suite
parseTestStatuses_returnsCorrectStatuses() TuistXCResultServiceTests XCResultServiceTests
parseTestWithCustomLabelXCResult() TuistXCResultServiceTests XCResultServiceTests
parseTestXCResult() TuistXCResultServiceTests XCResultServiceTests
Builds 🔨
Scheme Status Duration Commit
TuistAcceptanceTests 1m 27s e103d52d4
TuistUnitTests 2m 24s e103d52d4