tuist
tuist copied to clipboard
`.package.resolved` is not generated
What happened?
If you use Local Package with Xcode's default integration mechanism, the .package.resolved file is not generated by Tuist, so builds will fail on Xcode Cloud, which expects the existence of a *.xcworkspace/xcshareddata/swiftpm/Package.resolved
file.
How do we reproduce it?
- Clone https://github.com/tdkn/tuist-minimal-reproduction (or zipped version is here)
- Run
tuist generate --no-open
- The
.package.resolved
file should be present but is missing. - Also,
*.xcworkspace/xcshareddata/swiftpm/Package.resolved
should have been generated, but it's not there. - Simulate Xcode Cloud's
Resolve package dependencies
task locally. - And then an error occurs.
Error log
Simulate Xcode Cloud's Resolve package dependencies
task locally.
$ xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile -disableAutomaticPackageResolution -workspace ./MyWorkspace.xcworkspace -scheme TuistMinimalReproduction -hideShellScriptEnvironment
The following error outputs:
Command line invocation:
/Applications/Xcode-15.4.0.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile -disableAutomaticPackageResolution -workspace ./MyWorkspace.xcworkspace -scheme TuistMinimalReproduction -hideShellScriptEnvironment
User defaults from command line:
HideShellScriptEnvironment = YES
IDEPackageOnlyUseVersionsFromResolvedFile = YES
IDEPackageSupportUseBuiltinSCM = YES
Resolve Package Graph
a resolved file is required when automatic dependency resolution is disabled and should be placed at /Users/tdkn/Workspaces/private/TuistMinimalReproduction/MyWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved. Running resolver because the following dependencies were added: 'swift-algorithms' (https://github.com/apple/swift-algorithms)
Resolved source packages:
MyPackage: /Users/tdkn/Workspaces/private/TuistMinimalReproduction/MyPackage
2024-05-28 16:08:50.337 xcodebuild[90624:1899640] Writing error result bundle to /var/folders/bz/2q5vvytd059by91lfx4b39380000gn/T/ResultBundle_2024-28-05_16-08-0050.xcresult
xcodebuild: error: Could not resolve package dependencies:
a resolved file is required when automatic dependency resolution is disabled and should be placed at /Users/tdkn/Workspaces/private/TuistMinimalReproduction/MyWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved. Running resolver because the following dependencies were added: 'swift-algorithms' (https://github.com/apple/swift-algorithms)
Screenshot of Xcode Cloud Log (Web)
macOS version
14.4.1
Tuist version
4.14.0
Xcode version
15.4