ruby / ruby/rubygems

Checksums not updates when downgrading packages

Open
#8,391 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bundler
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

I can't quite repro this, but a few folks have run into it on bundler 2.6.2 on our team

We added checksums (via bundle lock --normalize-platforms; bundle lock --add-checksums) and that's been working great.

However, we recently had to downgrade a gem (httpx in our case), and the first bundle install run put in an empty checksum line for httpx . Note: this downgrade was to a version we previously had locally, so it might have been using a cached version vs a re-download.

rerunning bundle lock --normalize-platforms; bundle lock --add-checksums fixed it up, that said

Did you try upgrading rubygems & bundler?

Yes, on latest for both

Post steps to reproduce the problem
source "https://rubygems.org"
gem "httpx", "~> 1.4.0", require: false

amongst many other things

Changed it to

source "https://rubygems.org"
gem "httpx", "1.3.4", require: false
Which command did you run?

bundle install

What were you expecting to happen?

we had this:

httpx (1.4.0) sha256=REDACTED

get a checksum, instead we got:

httpx (1.3.4)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported sequence with Bundler 2.6.2: add checksums, change httpx from the ~> 1.4.0 constraint to 1.3.4, and run bundle install. Compare the resulting checksum entry with the output after bundle lock --normalize-platforms and bundle lock --add-checksums; done means the downgrade retains a populated checksum without the follow-up commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.