[gym, scan, snapshot] Allow disabling swift packages fetches when using xcodebuild#29862
Merged
Conversation
…g all swift package repositories
…when using the options "disable_package_automatic_updates" or "skip_package_repository_fetches"
Member
Test failure is odd. I'd just add an ignore since an options class growing in options seems fine. |
…ling_swift_packages_fetches_when_using_xcodebuild
iBotPeaches
approved these changes
Jan 23, 2026
4 tasks
Contributor
There was a problem hiding this comment.
Hey @alexandre-pod 👋
Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a month, and your PR will be included in the next one.
Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀"
Contributor
There was a problem hiding this comment.
Congratulations! 🎉 This was released as part of fastlane 2.232.0 🚀
6 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
bundle exec rspecfrom the root directory to see all new and existing tests passbundle exec rubocop -ato ensure the code style is validci/circlecibuilds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
I want to be able to give the argument
-skipPackageUpdatesto xcodebuild when running gym or run_tests to prevent it from fetching all packages repository.Without this argument the execution of
xcodebuild -showBuildSettingscan be slow as it will first need to fetch all dependencies repositoryThis was attempted by #21562, but the PR is stalled since several years without update.
closes #21562
Description
No existing option allowed to add this argument to xcodebuild in all situations:
skip_package_dependencies_resolutiondisables the package resolution before getting the build settings of the project. This prevented an execution ofxcodebuild -resolvePackageDependencies ..., but it does not gives the option-skipPackageUpdatesto xcodebuild when runningxcodebuild -showBuildSettingsdisable_package_automatic_updatesprevents xcodebuild from updating swift packages automatically, and respect the versions inPackage.resolved. But this does not prevent xcodebuild from updating packages repository when usedxcargsand giving it the option-skipPackageUpdates. But this is option is not supported when getting build settings. (This follow the documentation saying this option is used in the build phase)In this PR I added another option
skip_package_repository_fetchesthat will add the-skipPackageUpdatesto xcodebuild arguments.I choose this name to prevent confusion in what it does.
And as suggested in #21562 I updated the description of the option
disable_package_automatic_updatesto include that the argument-disableAutomaticPackageResolutionwill be given to xcodebuild.I was able to confirm in CI that
-skipPackageUpdateswas properly given toxcodebuildpreventing it from updating all packages repositories when the new option is used.Testing Steps
I've run
bundle exec rspecbut I was not able to have all tests pass before my changes. But my changes did not break any tests that were passing before.Here the list of tests I was not able to see pass