Need help. How to get Xcode Cloud to 'resolve package dependencies.'

My organization just started having problems with Xcode Cloud this week.

We have created a pretty simple 'Build on Pull Request'. The problem is our builds have started failing immediately because with the error.

"Could not resolve package dependencies:"

What is even more frustrating is the dependency that reported failed seem to changes every time.

  • This did not happen before this week.
  • Our build process is fairly vanilla, through Xcode. (We are NOT using CLI xcodebuild)
  • I can build a locally just fine from a clean build, and cleaning derived data.
  • Nothing has changed in our dependencies.
  • We are not using any private dependencies.

So I am stumped on what else to do how to debug, and fix this, because I am not sure how to encourage the Xcode Cloud build runner/server that the dependences are available and to jsut go get them.

Any help would be great, because we just started using Xcode Cloud to get away from Fastlane (which was causing problems), and it would be frustrating if this is a sign of things to come.

Sincerely,

Stan

Answered by DTS Engineer in 823749022

One of the most common mistakes here is not checking in the Package.resolved.swift file. See Building Swift packages and Swift Playgrounds app projects with Xcode Cloud.

Nothing has changed in our dependencies.

The purpose of the Package.resolved.swift file is to guarantee this. For example, if you're allowing your package dependencies to float to any 1.x.x version, it could have updated to a new minor version. When developing at desk, that's fine, but for the purposes of reproducible builds that get released from a continuous integration system, you want guarantees of the exact versioning for everything that you're releasing.

I'm discussing the Package.resolved.swift file here because it's one of the most common things people overlook. If you look at your logs and git repository and determine that this file is checked in, then here is an article that takes you through a variety of other circumstances that you should verify.

— Ed Ford,  DTS Engineer

One of the most common mistakes here is not checking in the Package.resolved.swift file. See Building Swift packages and Swift Playgrounds app projects with Xcode Cloud.

Nothing has changed in our dependencies.

The purpose of the Package.resolved.swift file is to guarantee this. For example, if you're allowing your package dependencies to float to any 1.x.x version, it could have updated to a new minor version. When developing at desk, that's fine, but for the purposes of reproducible builds that get released from a continuous integration system, you want guarantees of the exact versioning for everything that you're releasing.

I'm discussing the Package.resolved.swift file here because it's one of the most common things people overlook. If you look at your logs and git repository and determine that this file is checked in, then here is an article that takes you through a variety of other circumstances that you should verify.

— Ed Ford,  DTS Engineer

Need help. How to get Xcode Cloud to 'resolve package dependencies.'
 
 
Q