Hive Hive
Sign in

fix(cli): quote framework search path response files

GitHub issue · Closed

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

What changed

  • Quote FrameworkSearchPathsGraphMapper response file references before adding them to OTHER_CFLAGS and OTHER_LDFLAGS.
  • Update the existing response-file consolidation test expectations to include the quotes.
  • Add a regression test for a target named Etsy Enterprise so response file references with whitespace remain a single build setting argument.

Why

Large precompiled framework search path sets are consolidated into Derived/FrameworkSearchPaths/<target>.resp and referenced through @file tokens to keep clang and ld under ARG_MAX. When a target name contains whitespace, the unquoted token @$(SRCROOT)/Derived/FrameworkSearchPaths/Etsy Enterprise.resp is split into two arguments, so clang looks for .../Etsy and Enterprise.resp separately.

Root cause

The mapper generated the response file path using the target name, but it inserted the @$(SRCROOT)/... reference into C and linker flags without shell-style quotes. Xcode/clang then treated whitespace in the target-derived filename as an argument boundary before the response file could be loaded.

Approach

The response file path and contents stay the same; only the build setting token is wrapped as "@$(SRCROOT)/...". This keeps the existing response-file side effect and SDK/precompiled-path split intact while making target names with spaces safe for C/ObjC compilation and linking.

Impact

Projects with cached/precompiled framework search paths and targets whose names include whitespace can build correctly once the mapper consolidates paths into response files. Targets without whitespace get the same response-file behavior with a quoted token.

Validation

  • tuist install --force-resolved-versions
  • tuist generate tuist TuistGenerator TuistGeneratorTests ProjectDescription --no-open
  • xcsiftbuild test -workspace Tuist.xcworkspace -scheme Tuist-Workspace -destination platform=macOS,arch=arm64 -only-testing TuistGeneratorTests/FrameworkSearchPathsGraphMapperTests CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" COMPILATION_CACHE_ENABLE_CACHING=NO - 4 passed, 0 failed
  • swiftformat cli/Sources/TuistGenerator/Mappers/FrameworkSearchPathsGraphMapper.swift cli/Tests/TuistGeneratorTests/Mappers/FrameworkSearchPathsGraphMapperTests.swift
  • git diff --check
Comments
T
tuist[bot] Jun 19, 2026

🛠️ Tuist Run Report 🛠️

Tests 🧪
Scheme Status Cache hit rate Tests Skipped Ran Commit
TuistAcceptanceTests 0 % 103 0 103 487e8c3e8
TuistUnitTests 0 % 2668 35 2633 ee29499d5
Failed Tests ❌
Builds 🔨
Scheme Status Duration Commit
TuistAcceptanceTests 4m 33s 487e8c3e8
TuistUnitTests 5m 30s 487e8c3e8
TA
tuist-atlas[bot] Jun 20, 2026

The fix for quoting framework search path response files is now available in 4.201.0-canary.18. Update to this version to get it.

TA
tuist-atlas[bot] Jun 21, 2026

Quoted framework search path response files are now available in 4.201.0-canary.19. This fixes build failures when target names contain whitespace by properly quoting response file references in OTHER_CFLAGS and OTHER_LDFLAGS. Update to 4.201.0-canary.19 to get this fix.