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=""