XCTest-dependent helper targets (TestSupport, test utilities) should be cacheable

staticFramework targets that depend on XCTest (e.g. TestSupport targets providing test mocks/helpers) are excluded from binary caching. These are not test bundles — they’re regular frameworks only consumed by test targets.

tuist cache --print-hashes does not list any XCTest-dependent staticFramework target. In our project this excludes ~60 targets (TestSupport modules, SnapshotTesting, test utility frameworks) — none of which are dependencies of the app target.

Reproduction:

  1. Create a staticFramework target that depends on an SPM package importing XCTest

  2. Run tuist cache --print-hashes

  3. The target does not appear in the cacheable list

Replacing a TestSupport target with a binary doesn’t change the dependency graph — it’s still only consumed by test bundles. These targets should be cacheable.

I noticed PR #8529 addressed exactly this but was closed. Is there a specific reason it wasn’t merged? Are there known issues with caching XCTest-dependent frameworks?

Environment: Tuist 4.150.0 (Cloud/EE), Xcode 26.2, macOS 26.2 arm64
Github Issue #9756

Hi @eghnacr

We tried to enable support for it, but it came with cascading effects that we didn’t have the time to look into. I’ll have a look again tomorrow and see if I can get this working.