Repository navigation
Pin the CocoaPods installer used by iOS releases - #30181
Conversation
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
🧹 Nitpick comments: 2
mobile/scripts/check-cocoapods-install.rb: 2
13-13: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value
locked_versionlookup depends on the process environment, not on the Gemfile path.
Bundler.definitionreadsBUNDLE_GEMFILEfrom the process environment. The script computesgemfileon Line 10, but it does not setENV["BUNDLE_GEMFILE"]. The workflow runs the script withbundle exec, which sets this variable. A directruby scripts/check-cocoapods-install.rbrun can resolve a different Gemfile or fail.Set
ENV["BUNDLE_GEMFILE"] = gemfilebefore the lookup. Alternatively, useBundler::LockfileParser.new(original_lock).Proposed fix
-locked_version = Bundler.definition.locked_gems.specs.find { |spec| spec.name == "cocoapods" }.version.to_s +locked_version = Bundler::LockfileParser.new(original_lock).specs.find { |spec| spec.name == "cocoapods" }.version.to_s
73-73: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueThe lockfile-unchanged check does not run when an earlier step aborts.
abortexits the script before Line 73. The temporary directory is cleaned up. The lockfile is not restored. This matters only for local runs. In CI, the checkout is discarded.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
b00be404-782c-4402-aebb-291f33bfac8d
⛔ Files ignored due to path filters: 1
mobile/Gemfile.lockis excluded by!**/*.lock
📒 Files selected for processing: 4
.github/workflows/mobile-ios-release.yml.github/workflows/mobile.ymlmobile/Gemfilemobile/scripts/check-cocoapods-install.rb
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
ELI5
An iOS release currently downloads an unpinned npm program to install CocoaPods. Releases will instead use the exact CocoaPods version and gem checksums reviewed in the repository.
What Changed
Pin CocoaPods 1.17.0 beside Fastlane in the existing frozen Ruby bundle and run
bundle exec pod installfrommobile/ios. Add a scoped macOS PR check that runs this command against a local pod and a temporary Xcode project, verifies the installed version and workspace, and confirms that frozen Bundler rejects a changed tool manifest.Why
Using the existing Ruby lockfile removes the extra executable download without adding a second package manager or an npm override. The locked installer also supplies CocoaPods instead of relying on a runner's global installation. CocoaPods requires
public_suffix4.x, so the shared lock changes that gem from 7.0.5 to 4.0.7; Fastlane remains 2.240.1.Linked Issue
Maintainer-requested supply-chain follow-up; no existing issue.
Visual Proof
N/A — release tooling only; no application UI changes.
Testing
On macOS 26.3.1, Ruby 4.0.6 and Xcode 26.1.1:
bundle checkpassed using an isolated/tmpbundle.The new PR job runs the installer check with Ruby 3.3, matching release CI, without signing credentials or uploads. Typecheck/application builds are unaffected; normal PR CI remains enabled.
Review
The pin and checksums cover the Ruby installer, not every native pod downloaded by the generated application Podfile. Native dependency locking and registry provenance remain separate follow-ups; no generated native project is committed here.
Agent skill upstream boundary
Notes
Only the macOS iOS release installer changes. Other platforms and remote execution are unaffected. Existing release checks, signing order and upload steps are preserved.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)