Description
Symptom
Build #9 (after #95 fixed CI_TEAM_ID) advances past Signing + tuist generate, then fails:
xcodebuild: error: Could not resolve package dependencies:
a resolved file is required when automatic dependency resolution is disabled
and should be placed at /Volumes/workspace/repository/Sudoku.xcworkspace/xcshareddata/swiftpm/Package.resolved.
Running resolver because the following dependencies were added:
'swift-package-manager-google-mobile-ads'
Exit 74.
Root cause
Tuist generates Sudoku.xcworkspace, then invokes xcodebuild -resolvePackageDependencies -workspace ... -list with -disableAutomaticPackageResolution (Tuist 4 default for safety). The workspace has no committed Package.resolved (gitignored — workspace itself is generated), so resolution fails.
The SudokuKit package's own Packages/SudokuKit/Package.resolved IS committed and pins the AdMob version, but that's for the SwiftPM-only path; xcodebuild's workspace resolver looks at Sudoku.xcworkspace/xcshareddata/swiftpm/Package.resolved.
Fix
In ci_scripts/ci_post_clone.sh, after tuist generate --no-open, run an explicit xcodebuild resolve that enables automatic resolution:
# 3.3) Resolve SwiftPM packages at the workspace level (Tuist disables
# automatic resolution; we re-enable for first-time CI fetches)
xcodebuild -resolvePackageDependencies \
-workspace Sudoku.xcworkspace \
-scheme Sudoku \
-clonedSourcePackagesDirPath "${CI_DERIVED_DATA_PATH:-DerivedData}/SourcePackages" \
-onlyUsePackageVersionsFromResolvedFile NOReference: Apple's xcodebuild docs + Tuist's CI guide mention this pattern for first-fetch.
-onlyUsePackageVersionsFromResolvedFile NO allows xcodebuild to fetch + write a new Package.resolved when none exists.
Alternative considered
- Commit workspace Package.resolved — workspace is generated by
tuist generate, so the file would always be stale relative to Package.swift edits. Rejected. - Use SudokuKit Package.resolved — different location; xcodebuild won't pick it up at the workspace path.
Acceptance
- Build feat(skill): agent-impl-notes-log — running concurrent dispatch log #10 advances past
resolvePackageDependencies - Subsequent
xcodebuildbuild/test steps find AdMob + UMP SDKs
Out of scope
- Caching
~/Library/Caches/org.swift.swiftpm/between builds (backlog) - Switching off Tuist (out of scope)
Activity
fix(ci): xcodebuild -resolvePackageDependencies after tuist generate (#…