Closed iosdec closed 2 months ago
Hey @iosdec 👋
Thank you for the detailed report 👍
That's interesting:
xcodebuild: error: Could not resolve package dependencies:
a resolved file is required when automatic dependency resolution is disabled and should be placed at /**/*.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved.
And Xcode Cloud documentation state the following:
Following the best practice for using Swift package dependencies in a CI/CD environment, Xcode Cloud doesn’t use automatic package resolution and instead relies on the
Package.resolved
file to resolve your dependencies. If you use Swift package dependencies in your project, make sure to include thePackage.resolved
file in your Git repository and commit any changes to it. Don’t include the file in your.gitignore
file. Additionally, make sure thePackage.resolved
file resides at$filename.xcodeproj/project.workspace/xcshareddata/swiftpm/Package.resolved
.
So we should commit the Package.resolved
in our testing Xcode projects.
That being said, I would also recommend using our pre-built binaries by removing the --no-use-binaries
argument when invoking carthage. It will workaround this issue and speed up your build.
Hey @iosdec 👋
Thank you for the detailed report 👍
That's interesting:
xcodebuild: error: Could not resolve package dependencies: a resolved file is required when automatic dependency resolution is disabled and should be placed at /**/*.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved.
And Xcode Cloud documentation state the following:
Following the best practice for using Swift package dependencies in a CI/CD environment, Xcode Cloud doesn’t use automatic package resolution and instead relies on the
Package.resolved
file to resolve your dependencies. If you use Swift package dependencies in your project, make sure to include thePackage.resolved
file in your Git repository and commit any changes to it. Don’t include the file in your.gitignore
file. Additionally, make sure thePackage.resolved
file resides at$filename.xcodeproj/project.workspace/xcshareddata/swiftpm/Package.resolved
.So we should commit the
Package.resolved
in our testing Xcode projects.That being said, I would also recommend using our pre-built binaries by removing the
--no-use-binaries
argument when invoking carthage. It will workaround this issue and speed up your build.
I can confirm after updating my ci script to remove --no-use-binaries
, the carthage update command was successful, and I have a build uploaded with Xcode Cloud! Also saves much more time using prebuilt binaries.
Thank you very much!
Describe the bug
When building with Xcode Cloud, there's an error that occurs when using Carthage:
Cartfile contents (using previous version, because latest has issue for me with
DatadogPrivate
being missing):All works perfectly locally, but with Xcode Cloud I receive the following errors:
Reproduction steps
Update Cartfile with:
Run Xcode Cloud with
ci_post_clone.sh
script:SDK logs
Expected behavior
That the carthage update command runs successfully.
Affected SDK versions
2.10.0 +
Latest working SDK version
n/a
Did you confirm if the latest SDK version fixes the bug?
Yes
Integration Methods
Carthage
Xcode Version
15.4
Swift Version
5.0
MacOS Version
Latest
Deployment Target
16.0
Device Information
No response
Other relevant information
No response