0

TLDR: how can I get Resolve Package Graphs to succeed when running Xcode 16 under Fastlane? Is there some option to scan I am missing or some setup/config I need to do prior to running scan?

My company is using Fastlane to run tests when we open PR's. It's failing while trying to resolve package graphs for SPM / Swift Package Manager packages.

With Xcode 15, this runs great:

    desc """
        Builds a Debug configuration of the app and runs its tests.
        - Example usage: `fastlane test`
    """
    lane :test do
        puts(message: "about to scan for tests ☺️")
        scan(
            workspace: "MyWonderfulApp.xcworkspace",
            scheme: "MyWonderfulApp",
            configuration: "Debug",
            cloned_source_packages_path: "~/SourcePackages",
            clean: true,
            reset_simulator: true,
            device: "iPhone 15" - or "iPhone 16" if we're under Xcode 16
        )
        puts(message: "done scanning for tests")
    end

And the log looks something like this:

[16:29:47]: Driving the lane 'ios test' 🚀
[16:29:47]: ------------------
[16:29:47]: --- Step: scan ---
[16:29:47]: ------------------
[16:29:47]: Resolving Swift Package Manager dependencies...
[16:29:47]: $ xcodebuild -resolvePackageDependencies -workspace MyGreatApp.xcworkspace -scheme MyGreatApp -configuration Debug -clonedSourcePackagesDirPath \~/SourcePackages
[16:29:47]: ▸ Command line invocation:
[16:29:47]: ▸     /Applications/Xcode_15.4.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace MyGreatApp.xcworkspace -scheme MyGreatApp -configuration Debug -clonedSourcePackagesDirPath "~/SourcePackages"
[16:29:47]: ▸ User defaults from command line:
[16:29:47]: ▸     IDEClonedSourcePackagesDirPathOverride = /Users/runner/SourcePackages
[16:29:47]: ▸     IDEPackageSupportUseBuiltinSCM = YES
[16:29:52]: ▸ Resolve Package Graph /
[16:29:52]: ▸ Fetching from [email protected]:mycompany-dot-com/ios-xc-alamofire.git
[16:29:55]: ▸ Fetching from https://github.com/Salesforce-Async-Messaging/Swift-Package-ServiceChat
...
...
[16:31:58]: ▸ Checking out 7.13.3 of package ‘GoogleUtilities’
[16:32:19]: ▸ Resolved source packages:
[16:32:19]: ▸   swift-snapshot-testing: https://github.com/pointfreeco/swift-snapshot-testing @ 1.18.0
...
...

With Xcode 16 however, we never get to the "Resolved source packages" line in the console log. It times out after our default timeout of 40 or even 60 minutes.

[16:57:37]: ▸ Command line invocation:
[16:57:37]: ▸ /Applications/Xcode_16.2.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile
[16:57:37]: ▸ User defaults from command line:
[16:57:37]: ▸ IDEPackageOnlyUseVersionsFromResolvedFile = YES
[16:57:37]: ▸ IDEPackageSupportUseBuiltinSCM = YES
[16:57:40]: ▸ Resolve Package Graph
[16:57:40]: ▸ Fetching from https://github.com/Veriff/veriff-ios-spm/
...
...
...
[16:58:29]: ▸ Creating working copy of package ‘swift-syntax’
[16:58:29]: ▸ Checking out 510.0.2 of package ‘swift-syntax’
Error: The operation was canceled. // 40 to 60 minutes later, due to timeout

I've seen similar questions to this posted elsewhere, with no answers. Hopefully somebody somewhere has jumped over and solve this problem.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.