summaryrefslogtreecommitdiff
path: root/spec/bundler/lock
AgeCommit message (Collapse)Author
2025-03-25[rubygems/rubygems] Remove specs with bad sources when converging dependenciesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a0f7851451
2025-03-25[rubygems/rubygems] Add test for fixing mismatched versions in lockfileRandy Stauner
This test confirms that a bug that existed in 2.6.3 was fixed by https://github.com/rubygems/rubygems/commit/b8e55087f026 https://github.com/rubygems/rubygems/commit/9e4ca5c5b2
2025-03-24[rubygems/rubygems] Raise an error in frozen mode if CHECKSUMS entries are ↵David Rodríguez
missing https://github.com/rubygems/rubygems/commit/054a0cd76c Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Consistently use "lockfile" over "lock file"David Rodríguez
https://github.com/rubygems/rubygems/commit/e891be9197 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-12[rubygems/rubygems] Prefer `FileUtils.rm_r` to `FileUtils.rm_rf` for specsDavid Rodríguez
Because it does not swallow errors if it fails to remove the given folders, making issues easier to debug. https://github.com/rubygems/rubygems/commit/0db12d7afc
2025-02-18[rubygems/rubygems] Fix locked gems being upgraded when locked dependencies ↵David Rodríguez
are incorrect Resolver had internal logic to prioritize locked versions when sorting versions, however part of it was not being actually hit because of how unlocking worked in the resolver: a package was allow to be unlocked when that was explicit requested or when the list of unlocks was empty. That did not make a lot of sense and other cases were working because the explicit list of unlocks was getting "artificially filled". Now we consider a package unlocked when explicitly requested (`bundle update <package>`), or when everything is being unlocked (`bundle install` with no lockfile or `bundle update`). This makes things simpler and gets the edge case added as a test case working as expected. https://github.com/rubygems/rubygems/commit/b8e55087f0
2025-02-14[rubygems/rubygems] Raise error when lockfile is missing deps in frozen modeDavid Rodríguez
And avoid installing any gems. https://github.com/rubygems/rubygems/commit/c12700c7e4
2025-01-28[rubygems/rubygems] Support installing arm native gems on WindowsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/96496e3f53 Co-authored-by: Johnny Shields <[email protected]>
2024-11-21[rubygems/rubygems] Fix locking of incorrect version of git gem in an edge caseDavid Rodríguez
In particular, when a gem registry transitive dependency is changed to a git source direct dependency. https://github.com/rubygems/rubygems/commit/bcdc7660d9
2024-11-06[rubygems/rubygems] Automatically fix lockfile when the API reveals missing depsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/92196ccfdb
2024-10-22[rubygems/rubygems] Cleanup some specs after recent support dropDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9548aa6766
2024-07-23[rubygems/rubygems] Enable checksums on Bundler 3 for fresh lockfilesDavid Rodríguez
And get specs passing. https://github.com/rubygems/rubygems/commit/c23b5f5b84
2024-07-23[rubygems/rubygems] Enforce passing a block to `simulate_platform`David Rodríguez
https://github.com/rubygems/rubygems/commit/0658903e25
2024-07-09[rubygems/rubygems] Minor Bundler spec improvementsDavid Rodríguez
While working on something else I noticed: * Usage of uppercased "RUBY" and "JAVA" as platforms, when those don't really exist. * Usage of some test gems with "1.0" as gemspec version and "1.0.0" as actual version. This commit fixes both inconsistencies to make things more expectable. https://github.com/rubygems/rubygems/commit/e3ec32e247
2024-06-28Synchronize Bundler & RubyGems (#11071)David Rodríguez
2024-06-20[rubygems/rubygems] Fix credentials being readded when re-resolving without ↵David Rodríguez
a full unlock https://github.com/rubygems/rubygems/commit/a8670e43f8
2024-06-11[rubygems/rubygems] Keep credentials in lockfile if they are already thereDavid Rodríguez
So that those lockfiles still work with older Bundler versions. https://github.com/rubygems/rubygems/commit/880275bb66
2024-06-06[rubygems/rubygems] The `tmp` test helper already joins internallyDavid Rodriguez
https://github.com/rubygems/rubygems/commit/2d9eeadb62
2024-04-18[rubygems/rubygems] Never write credentials to lockfilesDavid Rodriguez
https://github.com/rubygems/rubygems/commit/e8a363713e
2024-01-11Complete missing specs for platforms after resolutionDavid Rodríguez
If two platform specific variants have different dependencies, then resolution may fallback to the non platform specific variant. However, the platform specific variants that have the same dependencies as the non specific one can still be kept. Do a pass to complete those after resolution.
2023-12-22Merge RubyGems-3.5.2 and Bundler-2.5.2Hiroshi SHIBATA
2023-12-12[rubygems/rubygems] Bump rake version used by testsDavid Rodríguez
And make it easier to update next time. https://github.com/rubygems/rubygems/commit/1ea4bfa5d8
2023-12-07[rubygems/rubygems] Use modern hashes consistentlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb66253f2c
2023-12-05[rubygems/rubygems] Converts Bundler lockfile checksum validation to opt-in onlyMartin Emde
Looks for the CHECKSUMS section in the lockfile, activating the feature only if the section exists. Without a CHECKSUMS section, Bundler will continue as normal, validating checksums when gems are installed while checksums from the compact index are present. https://github.com/rubygems/rubygems/commit/2353cc93a4
2023-11-27[rubygems/rubygems] Remove no longer necessary workaround for old RubyGemsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/ed4eaefac0
2023-11-13[rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/93619c97ff
2023-11-13[rubygems/rubygems] Automatically lock extra ruby platformsDavid Rodríguez
Since we started locking the specific platform in the lockfile, that has created an annoying situation for users that don't develop on Linux. They will create a lockfile on their machines, locking their local platform, for example, darwin. But then that lockfile won't work automatically when deploying to Heroku for example, because the lockfile is frozen and the Linux platform is not included. There's the chance though that resolving against two platforms (Linux + the local platform) won't succeed while resolving for just the current platform will. So, instead, we check other platform specific variants available for the resolution we initially found, and lock those platforms and specs too if they satisfy the resolution. This is only done when generating new lockfiles from scratch, existing lockfiles should keep working as before, and it's only done for "ruby platforms", i.e., not Java or Windows which have their own complexities, and so are excluded. With this change, we expect that MacOS users can bundle locally and deploy to Heroku without needing to do anything special. https://github.com/rubygems/rubygems/commit/5f24f06bc5
2023-11-13[rubygems/rubygems] Refactor platform test helpersDavid Rodriguez
https://github.com/rubygems/rubygems/commit/7ab4c203f9
2023-10-23[rubygems/rubygems] Improve errors and register checksums reliablyMartin Emde
Improve error reporting for checksums, raises a new error class. Solve for multi-source checksum errors. Add CHECKSUMS to tool/bundler/(dev|standard|rubocop)26_gems.rb https://github.com/rubygems/rubygems/commit/26ceee0e76 Co-authored-by: Samuel Giddins <[email protected]>
2023-10-23[rubygems/rubygems] Refactor Checksum classes and methods to reduceMartin Emde
code. (https://github.com/rubygems/rubygems/pull/6917) https://github.com/rubygems/rubygems/commit/2238bdaadc
2023-10-23[rubygems/rubygems] Refactor to checksums stored via sourceSamuel Giddins
This gets the specs passing, and handles the fact that we expect checkums to be pinned only to a particular source This also avoids reading in .gem files during lockfile generation, instead allowing us to query the source for each resolved gem to grab the checksum Finally, this opens up a route to having user-stored checksum databases, similar to how other package managers do this! Add checksums to dev lockfiles Handle full name conflicts from different original_platforms when adding checksums to store from compact index Specs passing on Bundler 3 https://github.com/rubygems/rubygems/commit/86c7084e1c
2023-10-23[rubygems/rubygems] Add CHECKSUMS for each gem in lockfileThong Kuah
We lock the checksum for each resolved spec under a new CHECKSUMS section in the lockfile. If the locked spec does not resolve for the local platform, we preserve the locked checksum, similar to how we preserve specs. Checksum locking only makes sense on install. The compact index information is only available then. https://github.com/rubygems/rubygems/commit/bde37ca6bf
2023-09-27[rubygems/rubygems] Reword a couple of error messagesDavid Rodriguez
When a path does not make a lot of sense. https://github.com/rubygems/rubygems/commit/d173c79e9a
2023-08-16[rubygems/rubygems] Fix git source conservativenessDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9a0e0dfd5b
2023-06-15[rubygems/rubygems] Show missing spec in lockfile incomplete error messageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/b86caaa3d5
2023-05-30Merge RubyGems/Bundler master from 4076391fce5847689bf2ec402b17133fe4e32285Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7873
2023-03-23Don't suggest `--full-index` on API Response mismatch errorsDavid Rodríguez
I've never seen this error in real life, and if it was happening, I think it's either some server side issue that would need to be fixed or some transient issue. We should move away from the full index, since it's slow, so let's stop recommending it. Notes: Merged: https://github.com/ruby/ruby/pull/7582
2023-03-23Don't remove RUBY platform when healing a lockfile with missing specsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/7582
2023-03-23Don't remove RUBY platform when healing a lockfile with missing specsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/7582
2023-03-17[rubygems/rubygems] Simplify `lockfile_platforms` helperDavid Rodríguez
To make it easier to change the default platforms that get locked later. https://github.com/rubygems/rubygems/commit/255c4012ec
2023-03-17[rubygems/rubygems] Use splatted args to `lockfile_platforms_for`David Rodríguez
Nicer :) https://github.com/rubygems/rubygems/commit/c0ab2893c3
2023-03-02[rubygems/rubygems] Regenerate lockfile if spec list is invalid/empty.Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/d2c56315e2
2023-03-01[rubygems/rubygems] Auto-heal on corrupted lockfile with missing depsDaniel Colson
Following up on https://github.com/rubygems/rubygems/pull/6355, which turned a crash into a nicer error message, this commit auto-heals the corrupt lockfile instead. In this particular case (a corrupt Gemfile.lock with missing dependencies) the LazySpecification will not have accurate dependency information, we have to materialize the SpecSet to determine there are missing dependencies. We've already got a way to handle this, via `SpecSet#incomplete_specs`, but it wasn't quite working for this case because we'd get to `@incomplete_specs += lookup[name]` and `lookup[name]` would be empty for the dependency. With this commit we catch it a bit earlier, marking the parent spec containing the missing dependency as incomplete. https://github.com/rubygems/rubygems/commit/486ecb8f20
2023-02-21[rubygems/rubygems] Restore better error message when locked ref does not existDavid Rodríguez
https://github.com/rubygems/rubygems/commit/c8e024359f Notes: Merged: https://github.com/ruby/ruby/pull/7345
2023-02-09[rubygems/rubygems] Avoid crashing with a corrupted lockfileDaniel Colson
I did a bad thing (script that edits the Gemfile.lock directly) and ended up with a Gemfile.lock that was completely missing some indirect dependencies. While this is my fault and an error is reasonable, I noticed that the error got progressively less friendly in recent versions of bundler. Something similar came up in https://github.com/rubygems/rubygems/issues/6210, and this commit would have helped with that case as well (although we've already handled this a different way with #6219). Details: --- Back on Bundler 2.2.23, a corrupt lockfile like this would cause a helpful error: ``` Unable to find a spec satisfying minitest (>= 5.1) in the set. Perhaps the lockfile is corrupted? ``` Bundler 2.3.26 gave a helpful warning: ``` Warning: Your lockfile was created by an old Bundler that left some things out. Because of the missing DEPENDENCIES, we can only install gems one at a time, instead of installing 16 at a time. You can fix this by adding the missing gems to your Gemfile, running bundle install, and then removing the gems from your Gemfile. The missing gems are: * minitest depended upon by activesupport ``` But then continued on and crashed while trying to report the unmet dependency: ``` --- ERROR REPORT TEMPLATE ------------------------------------------------------- NoMethodError: undefined method `full_name' for nil:NilClass lib/bundler/installer/parallel_installer.rb:127:in `block (2 levels) in check_for_unmet_dependencies' ... ``` Bundler 2.4.0 and up crash as above when jobs=1, but crash even harder when run in parallel: ``` --- ERROR REPORT TEMPLATE ------------------------------------------------------- fatal: No live threads left. Deadlock? 3 threads, 3 sleeps current:0x00007fa6b6704660 main thread:0x00007fa6b6704660 * #<Thread:0x000000010833b130 sleep_forever> rb_thread_t:0x00007fa6b6704660 native:0x0000000108985600 int:0 * #<Thread:0x0000000108dea630@Parallel Installer Worker #0 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever> rb_thread_t:0x00007fa6b67f67c0 native:0x0000700009a62000 int:0 * #<Thread:0x0000000108dea4a0@Parallel Installer Worker #1 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever> rb_thread_t:0x00007fa6b67f63c0 native:0x0000700009c65000 int:0 <internal:thread_sync>:18:in `pop' tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:42:in `deq' ... ``` Changes --- This commit fixes the confusing thread deadlock crash by detecting if dependencies are missing such that we'll never be able to enqueue. When that happens we treat it as a failure so the install can finish. That gets us back to the `NoMethodError`, which this commit fixes by using a different warning in the case where no spec is found. https://github.com/rubygems/rubygems/commit/d73001a21d
2022-12-25Update Bundler to 2.4.1 & and RubyGems to 3.4.1David Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/7020
2022-12-24Merge RubyGems-3.4.0 and Bundler-2.4.0Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/6987
2022-12-20Merge RubyGems/Bundler masterHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/ba3adad4d80038ffd7bea015da2f11d3e8a2ff82 Notes: Merged: https://github.com/ruby/ruby/pull/6966
2022-12-20[rubygems/rubygems] Fix crash when lockfile is missing dependenciesDavid Rodríguez
We have a check for a corrupt lockfile right before installing. However, the check accounted for locked specs not satisfying locked dependencies, but not for locked specs missing for some locked dependencies. Instead of fixing this check, I decided to remove it in favor of automatically detecting the situation and re-resolve to automatically fix the lockfile rather than printing a warning but leave the problem there. https://github.com/rubygems/rubygems/commit/4a7a584252 Notes: Merged: https://github.com/ruby/ruby/pull/6966
2022-12-15Merge RubyGems/Bundler masterHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/084f7d1f21f6fc3e2bb685b7bda3653fb2891c6e Notes: Merged: https://github.com/ruby/ruby/pull/6936