Skip to content

Stop resolving locally for empty CHECKSUMS entries - #9862

Open
hsbt wants to merge 1 commit into
masterfrom
skip-local-resolve-for-empty-checksums
Open

Stop resolving locally for empty CHECKSUMS entries#9862
hsbt wants to merge 1 commit into
masterfrom
skip-local-resolve-for-empty-checksums

Conversation

@hsbt

@hsbt hsbt commented Sep 8, 2026

Copy link
Copy Markdown
Member

Fixes #9109.

Bundler.setup without a lockfile writes CHECKSUMS entries without digests, because nothing is fetched on that path. Since 05199ae those empty entries count as a lockfile change, so every later Bundler.setup printed "Resolving dependencies..." and re-resolved although no local resolution can ever fill them. The lockfile ends up identical each time.

I now count an empty entry only when a remote fetch is coming or when frozen mode has to refuse it. bundle install still goes remote to fill those entries, and frozen mode still raises the same error. As a side effect bundle install --local stops re-resolving for them too, which is the path the original report hit through Fedora's package build.

I did not compute the digests from installed gems on the setup path. Default gems have no .gem file to hash, and distributions like Fedora strip the gem cache, so the entries would stay empty there and the loop would remain.

$ printf 'source "https://rubygems.org"\ngem "minitest"\n' > Gemfile
$ printf 'require "bundler"\nBundler.setup\n' > setup.rb
$ ruby setup.rb   # resolves and writes the lockfile
Resolving dependencies...
$ ruby setup.rb   # before: resolved again, after: silent, lockfile untouched

Generated with Claude Code

`Bundler.setup` without a lockfile writes CHECKSUMS entries without
digests, since no remote fetch happens on that path. On the next run
those empty entries counted as a lockfile change, so every startup
re-resolved and printed "Resolving dependencies..." although nothing
could fill them. Count empty entries only when a remote fetch is coming
or frozen mode has to refuse them, and keep `bundle install` going
remote to fill them.

#9109

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bundler 4 is re-resolving dependencies every run

1 participant