mirror of
https://github.com/ruby/ruby.git
synced 2026-10-29 17:06:21 +08:00
`bundle lock --add-checksums --add-platform arm64-darwin` wrote a lockfile that listed arm64-darwin under PLATFORMS but carried none of its platform-specific gems. `Definition#add_checksums` resolves the bundle to fetch the checksums, and it ran before the platform options were applied, so the resolution never saw the new platform. This usually went unnoticed. `SpecSet#add_extra_platforms!` tries to complete every platform the sources know about, and for most bundles that added the darwin gems anyway. It stops working as soon as one gem has a precompiled darwin build whose `required_ruby_version` excludes the current Ruby (bcrypt_pbkdf 1.1.2 on Ruby 3.4): `complete_platform` then gives up on darwin for every gem, and the lockfile ends up listing a platform it has no gems for. Running `bundle lock` again does not repair it, because the platform is already listed. Apply `--add-checksums` after the platform changes have been recorded. https://github.com/ruby/rubygems/commit/2f1d325fc2