Hive Hive
Sign in

test(cli): cover SwifterPM materialization passthrough

GitHub issue · Closed

Metadata
Source
tuist/tuist #11354
Updated
Jun 25, 2026
Domains
CLI Generated projects
Details

Covers configuring SwifterPM cached directory materialization through Tuist’s existing install passthrough arguments instead of introducing a dedicated environment variable.

SwifterPM already exposes --cached-directory-materialization with automatic, copy, and symlink. Tuist also already has an install passthrough path, both from Config.project.generatedProject.installOptions.passthroughSwiftPackageManagerArguments and from the TUIST_INSTALL_PASSTHROUGH_ARGUMENTS environment variable used by tuist install. Reusing that path keeps the CLI surface smaller and avoids adding a second environment variable for one SwifterPM option.

  • Verifies install config passthrough forwards --cached-directory-materialization symlink into the Swift Package Manager controller.
  • Verifies the SwifterPM-backed controller parses --cached-directory-materialization symlink from its existing arguments array.
  • Verifies the default Tuist request leaves the materialization option unset, which SwifterPM resolves as automatic internally.
  • Keeps SwifterPM gated by the existing truthy TUIST_USE_SWIFTERPM opt-in, so SwiftPM fallback behavior is unchanged.

This means users can configure the strategy with the existing env path, for example TUIST_INSTALL_PASSTHROUGH_ARGUMENTS=--cached-directory-materialization,symlink, or through install options in Tuist.swift.

How to test locally

  • swiftformat cli/Sources/TuistConstants/Constants.swift cli/Sources/TuistSupport/SwiftPackageManager/SwiftPackageManagerController.swift cli/Tests/TuistSupportTests/SwiftPackageManager/SwiftPackageManagerControllerTests.swift cli/Tests/TuistKitTests/Services/InstallServiceTests.swift
  • TUIST_USE_SWIFTERPM=0 .build/debug/tuist generate tuist TuistSupport TuistSupportTests TuistKit TuistKitTests ProjectDescription --no-open
  • xcodebuild test -workspace Tuist.xcworkspace -scheme Tuist-Workspace -only-testing TuistSupportTests/SwiftPackageManagerControllerTests -only-testing TuistKitTests/InstallServiceTests CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
Comments
TA
tuist-atlas[bot] Jun 19, 2026

The test coverage for SwifterPM materialization passthrough is now available in version 4.201.0-canary.13. Update to that version to have the test coverage for configuring cached directory materialization.

TA
tuist-atlas[bot] Jun 19, 2026

Test coverage for SwifterPM materialization passthrough configuration is now available in 4.201.0-canary.12. This verifies that install config passthrough correctly forwards --cached-directory-materialization into the Swift Package Manager controller. Update to this version if you want this test coverage.

TA
tuist-atlas[bot] Jun 20, 2026

Test coverage for SwifterPM materialization passthrough is now available in 4.201.0-canary.18. Update to this version to get it.

TA
tuist-atlas[bot] Jun 20, 2026

Test coverage for SwifterPM materialization passthrough is now available in 4.201.0-canary.17. Update to this version for the improved test coverage.

TA
tuist-atlas[bot] Jun 20, 2026

The test coverage for SwifterPM materialization passthrough is now included in 4.201.0-canary.16. This verifies the –cached-directory-materialization option is correctly forwarded through install passthrough arguments. Update to this version.

TA
tuist-atlas[bot] Jun 20, 2026

The test coverage for SwifterPM materialization passthrough is now available in 4.201.0-canary.15. This verifies that install config passthrough correctly forwards --cached-directory-materialization options into the Swift Package Manager controller. Update to this version to use this test coverage.

TA
tuist-atlas[bot] Jun 20, 2026

The test coverage for SwifterPM materialization passthrough is now available in version 4.201.0-canary.14. Update to this version if you are configuring cached directory materialization through install passthrough arguments.

TA
tuist-atlas[bot] Jun 21, 2026

Test coverage for SwifterPM materialization passthrough is now available in 4.201.0-canary.19. This verifies that install config passthrough arguments like --cached-directory-materialization are correctly forwarded to the SwifterPM-backed controller. Update to 4.201.0-canary.19.