Skip to content

fix(ci): commit Tuist's .package.resolved at repo root (closes #104) - #105

Merged
wei18 merged 1 commit into
mainfrom
fix/commit-tuist-package-resolved
May 23, 2026
Merged

wei18 merged 1 commit into
mainfrom
fix/commit-tuist-package-resolved

Conversation

@wei18

@wei18 wei18 commented May 23, 2026

Copy link
Copy Markdown
Owner

Closes #104. Per Tuist 4 design (PR tuist/tuist#6823, Oct 2024): when external SPM deps are transitive through local packages, Tuist generates the canonical .package.resolved at repo root and symlinks the workspace location to it.

The file is intentionally not gitignored — committing it is the documented Tuist 4 fix.

Supersedes my prior assumption that ci_post_clone.sh needed patching. Kept blocks 3.2-pre / 3.3 in script for fresh-checkout safety but they're now unused on normal builds.

Per Tuist 4 design (post #6823, Oct 2024): when a project's external
SwiftPM deps live transitively inside local Package.swift packages
(our case — AdMob/UMP/snapshot-testing all pulled via Packages/
SudokuKit/ + Packages/AppMonetizationKit/), Tuist generates the
canonical .package.resolved file at the **project root** and
symlinks Sudoku.xcworkspace/xcshareddata/swiftpm/Package.resolved
→ /<repo>/.package.resolved.

The file is intentionally NOT gitignored — commit it so Xcode
Cloud's xcodebuild finds the resolved file via the symlink (which
Tuist regenerates on every `tuist generate`).

This is the proper Tuist 4 fix for #104, NOT a ci_post_clone.sh
patch. Previous PRs #98/#100 added explicit `xcodebuild
-resolvePackageDependencies` in block 3.3 as a fallback — kept as
safety net for fresh-checkout edge cases but no longer the primary
mechanism.

Closes #104. Investigation:
- tuist install help: no SwiftPM resolve when no Tuist/Package.swift
- tuist generate flags: no skip-resolution option
- Tuist PR #6823: bug fix that landed Oct 2024 — generates root
  .package.resolved for transitive-only-remote-dep projects
- Local verification: tuist generate creates symlink correctly

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@wei18
wei18 merged commit db10d03 into main May 23, 2026
@wei18
wei18 deleted the fix/commit-tuist-package-resolved branch May 23, 2026 11:58
wei18 added a commit that referenced this pull request May 23, 2026
#112)

Closes #111. XCC build exit 64:

  xcodebuild: error: If you specify a workspace then you must also
  specify a scheme.

Root cause: PR #100 dropped -scheme Sudoku from the explicit resolve
in block 3.3 thinking it'd enable workspace-wide resolution. xcodebuild
requires -scheme when -workspace is given; the command rejected
outright.

Fix: delete block 3.3 entirely. PR #105 committed .package.resolved at
repo root, which Tuist symlinks from the workspace location during
`tuist generate`. xcodebuild's internal resolution finds the resolved
file via the symlink → no explicit resolve needed.

bash -n OK.

Co-authored-by: Claude Opus 4.7 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): pre-populate workspace Package.resolved before tuist generate

1 participant