Lock normalization doesn't persist across updates
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
In this doc, it's mentioned that one should call normalize-lock before add-checksums.
Which works great. However, if a gem in a new version adds new platforms, the bundle install doesn't renormalize, so you end up out of sync again.
Did you try upgrading rubygems & bundler?
Yes, on latest of both (2.6.3)
Post steps to reproduce the problem
Gemfile to start:
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'nokogiri', '1.16.7'
Then run the following:
bundle install; bundle lock --add-platform ruby; bundle lock --normalize-platforms; bundle lock --add-checksums- commit those into git.
- update nokogiri in the Gemfile turning that into:
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'nokogiri', '1.18.2'
- run
bundle install - commit that into git
- then run
bundle lock --normalize-platforms
Notice the lock is now now changed as new platforms were added by nokogiri, but not auto-added to the lock.
Which command did you run?
See above
What were you expecting to happen?
Once you normalize once per docs, it is kept up to date automatically (especially to avoid running into https://github.com/rubygems/rubygems/issues/8391 if someone installs from a different platform but already had
What actually happened?
New gem platforms were not auto-added to the lock
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
Start with the Bundler lock workflow exercised by the reported commands, using the Gemfile and lockfile from the nokogiri 1.16.7 to 1.18.2 reproduction. Run bundle install, bundle lock --normalize-platforms, and the other listed lock commands; done means newly introduced gem platforms are automatically included after updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100