Hive Hive
Sign in

fix(cli): avoid checkout cwd for SwiftPM package dumps

GitHub issue · Closed

Metadata
Source
tuist/tuist #10966
Updated
Jun 24, 2026
Domains
Generated projects
Details

Summary

  • Stop passing the package checkout as the working directory when loading SwiftPM package metadata with dump-package.
  • Keep the explicit working directory behavior for SwiftPM commands that mutate or build packages.
  • Add a regression test that verifies package-info loading does not override the caller working directory.

Note

This is not a full revert of the previous working-directory fix. Commands such as resolve, update, tools-version, package builds, and lipo still run with the explicit package working directory. The exception is dump-package, which already receives an absolute --package-path and only reads manifest metadata, so running it from inside Tuist/.build/checkouts/<Package> can expose SwiftPM cwd or scratch-state issues without providing a benefit.

Testing

  • swift build --replace-scm-with-registry
  • mise run lint
  • Reproduced the released 4.195.7 failure shape with a cwd-sensitive swift shim against a CombineExt fixture.
  • Verified 4.195.0 and the locally fixed binary pass under the same shim.
Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments
TA
tuist-atlas[bot] May 28, 2026

The change to avoid checkout cwd for SwiftPM package dumps is now available in 4.195.9. Please update to this version to get the fix.