What changed
- Updated
DerivedDataLocator to mirror Xcode’s DerivedData directory prefix behavior by replacing spaces in the project/workspace name with underscores before appending the existing MD5 path hash.
- Added a regression test using a project path with a space in the filename to assert that Tuist looks under the underscore-normalized DerivedData prefix.
- Updated the agent guidance in the root and CLI
AGENTS.md files so CLI validation regenerates a narrow Tuist workspace and uses xcodebuild/xcsiftbuild instead of falling back to SwiftPM, preserving Tuist caching.
Why
A customer’s Xcode scheme post-action could run tuist inspect build, but Tuist failed to find the generated .xcactivitylog. The project filename contained a space, so Tuist looked under a DerivedData directory prefixed with the literal name while Xcode wrote the logs under the same prefix with spaces replaced by underscores.
Root cause
DerivedDataLocator used the raw basenameWithoutExt as the DerivedData directory prefix. Xcode sanitizes spaces in that prefix to underscores, while keeping the hash based on the full original path. Because the prefix differed, tuist inspect build searched the wrong DerivedData directory for projects with spaces in their names.
Impact
Build insights collection can now locate Xcode activity logs for project/workspace names containing spaces. The guideline update also prevents future CLI work from bypassing Tuist-generated workspaces and cache usage during validation.
Validation
tuist install
tuist generate tuist TuistXcodeBuildProducts TuistXcodeBuildProductsTests ProjectDescription --no-open
xcodebuild test -workspace Tuist.xcworkspace -scheme Tuist-Workspace -only-testing TuistXcodeBuildProductsTests/DerivedDataLocatorTests -destination platform=macOS -derivedDataPath /private/tmp/tuist-insights-derived-data CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= COMPILATION_CACHE_ENABLE_CACHING=NO
- Result:
** TEST SUCCEEDED ** with 9 DerivedDataLocatorTests passing, including locate_replaces_spaces_in_hash_based_path_prefix().
git diff --check -- AGENTS.md cli/AGENTS.md cli/Sources/TuistXcodeBuildProducts/DerivedDataLocator.swift cli/Tests/TuistXcodeBuildProductsTests/Utils/DerivedDataLocatorTests.swift