Skip to content

Bundler 4 is re-resolving dependencies every run #9109

@voxik

Description

@voxik

Describe the problem as clearly as you can

Having this test setup:

$ ruby -v
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]

$ echo 'gem "minitest"' > Gemfile

$ cat <<EOF > test.rb  
require "bundler"
Bundler.setup
EOF

Bundler 4.0 seems to try to resolve the dependencies every time:

$ bundle -v
4.0.0.beta1

$ ruby test.rb 
Resolving dependencies...

$ ruby test.rb 
Resolving dependencies...

Bundler 2.6 resolves the dependencies just once:

$ bundle -v
Bundler version 2.6.9

$ ruby test.rb 
Resolving dependencies...

$ ruby test.rb

Or at least does not print the message all the time ;)

Interestingly, when the Gemfile.lock is created by Bundler 2.6, Bundler 4.0 is happy with it 🤷 This is the diff between Gemfiles:

--- bundler-2.6.9
+++ bundler-4.0.0.beta1
@@ -10,5 +10,8 @@
 DEPENDENCIES
   minitest
 
+CHECKSUMS
+  minitest (5.26.0)
+
 BUNDLED WITH
-   2.6.9
+  4.0.0.beta1

BTW, not sure where the CHECKSUMS sections comes from and how it is supposed to be populated, but I can't see any checksum there. Can it be because minitest is actually installed via RPM?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions