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