We are explicitly using Package.resolved to be sure every developer is using the same version.
This works like a charm with Xcode 12 in fast lane but we can't make this work anymore in Xcode 13 although it works wonderfully when Xcode itself (not xcodebuild) — a.k.a. the IDE — resolves.
Why?
Command line invocation:
310[16:06:53]: ▸ /Applications/Xcode-13.0.0.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace MyApp.xcworkspace -scheme MyApp -disableAutomaticPackageResolution
311[16:06:53]: ▸ User defaults from command line:
312[16:06:53]: ▸ IDEDisableAutomaticPackageResolution = YES
313[16:06:53]: ▸ IDEPackageSupportUseBuiltinSCM = YES
314[16:06:54]: ▸ Resolve Package Graph
315[16:06:56]: ▸ Checking out 5.12.0 of package ‘GRDB.swift’
316[16:06:57]: ▸ Resolved source packages:
317[16:06:57]: ▸ MyApp: (null)
318[16:06:57]: ▸ xcodebuild: error: Could not resolve package dependencies:
319[16:06:57]: ▸ Couldn’t check out revision ‘32b2923e890df320906e64cbd0faca22a8bfda14’:
320[16:06:57]: ▸ fatal: reference is not a tree: 32b2923e890df320906e64cbd0faca22a8bfda14
321[16:06:57]: ▸ cannot update Package.resolved file because automatic resolution is disabled
322[16:06:57]: ▸ fatalError
This happens not only with GRDB but with others as well.
To clarify: The revision exists at https://github.com/groue/GRDB.swift/commit/32b2923e890df320906e64cbd0faca22a8bfda14