Inconsistent platforms inserted into Gemfile.lock
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 4k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 81
Description
Describe the problem as clearly as you can
When you generate Gemfile.lock from scratch with nokogiri in it, bundler adds four linux architectures and two darwin architectures.
PLATFORMS
aarch64-linux
arm-linux
arm64-darwin
x86-linux
x86_64-darwin
x86_64-linux
If you already have Gemfile.lock with one of the architectures it does not add any new architectures.
If you generate Gemfile.lock from an almost empty Gemfile, you get something like
PLATFORMS
ruby
x86_64-linux
There are two differences.
ruby is inserted in the last example.
And too many architectures are inserted in the first one.
Did you try upgrading rubygems & bundler?
rubygems 3.5.11
bundler 2.5.11
Post steps to reproduce the problem
docker run --rm -it ruby:3.3.1 bash
gem update --system
bundle init
bundle add nokogiri
cat Gemfile.lock
#PLATFORMS
# aarch64-linux
# arm-linux
# arm64-darwin
# x86-linux
# x86_64-darwin
# x86_64-linux
docker run --rm -it ruby:3.3.1 bash
gem update --system
bundle init
bundle # Creates Gemfile.lock with PLATFORMS [ruby, x86_64-linux]
bundle add nokogiri
cat Gemfile.lock
#PLATFORMS
# ruby
# x86_64-linux
Which command did you run?
What were you expecting to happen?
I expect the two lock files to be identical.
What actually happened?
There are two differences.
ruby is inserted in the last example.
And too many architectures are inserted in the first one.
If not included with the output of your command, run bundle env and paste the output below
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the discrepancy with the two Docker-based Bundler sequences using bundle init, bundle, and bundle add nokogiri, then compare the PLATFORMS sections in Gemfile.lock. Trace Bundler's platform resolution and lockfile generation; done means both sequences produce identical platform entries without losing required architectures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100