Skip to content

fix(ci): workspace-wide package resolve (closes #99) - #100

Merged
wei18 merged 1 commit into
mainfrom
fix/ci-package-resolve-workspace-wide
May 22, 2026
Merged

wei18 merged 1 commit into
mainfrom
fix/ci-package-resolve-workspace-wide

Conversation

@wei18

@wei18 wei18 commented May 22, 2026

Copy link
Copy Markdown
Owner

Closes #99. Drop -scheme Sudoku from PR #98's xcodebuild -resolvePackageDependencies so test-target deps (snapshot-testing) get resolved too. bash -n OK.

Build #10 (after PR #98) failed:
  Could not resolve package dependencies:
    Running resolver because: 'swift-snapshot-testing' was added

PR #98's -scheme Sudoku limited resolve to app-target deps; snapshot-
testing is a SudokuKit test-target dep. Drop -scheme for workspace-wide
resolve.

bash -n OK. Closes #99.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@wei18
wei18 merged commit 3ae7e94 into main May 22, 2026
@wei18
wei18 deleted the fix/ci-package-resolve-workspace-wide branch May 22, 2026 13:34
wei18 added a commit that referenced this pull request May 23, 2026
…105)

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 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): Xcode Cloud — workspace-wide package resolve (snapshot-testing missing from #98)

1 participant