summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/update_spec.rb
AgeCommit message (Collapse)Author
12 days[rubygems/rubygems] Extract stdboth spec helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb13f4e702
13 days[rubygems/rubygems] Fix `bundle update --bundler` when restarts disabledDavid Rodríguez
There's no reason why we should not update bundler as requested, even if restarts are disabled. https://github.com/rubygems/rubygems/commit/e59acd2a0d
13 days[rubygems/rubygems] Look in configured path when checking if self-update ↵David Rodríguez
version is installed https://github.com/rubygems/rubygems/commit/1ce0882e6f
13 days[rubygems/rubygems] Make update specs independent from version of BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/609b21a5fe
2025-04-14[rubygems/rubygems] Refine `bundle update --verbose` logsDavid Rodríguez
Don't mention "Found changes from the lockfile" because that's not really true in general. https://github.com/rubygems/rubygems/commit/0181c278e8
2025-03-31[rubygems/rubygems] Remove edge cases for not removing invalid platformsDavid Rodríguez
Instead, remove them anytime we find dependencies don't match the lockfile for a platform, and then add them back after resolution if they ended up being valid. https://github.com/rubygems/rubygems/commit/220bd77887
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 Bundler incorrectly downgrading direct dependenciesDavid Rodríguez
There's no reason to call `converge_specs` when adding additional lower bound requirements to prevent downgrades, and it actually causes the extra requirements to be missed sometimes. Loop over the originally locked specs directly, adding the additional precaution of not adding the requirement if the Gemfile dependency has changed and it no longer matches the locked spec. https://github.com/rubygems/rubygems/commit/5154506912
2025-02-13[rubygems/rubygems] Fix incorrect error message in frozen modeDavid Rodríguez
When Bundler refuses to install in frozen mode, sometimes it would incorrectly claim that some dependencies have been added to the Gemfile when that's not really the case. Fix that by making sure `locked_dependencies` always has all locked dependencies, even when unlocking, Additionally, the suggestion to run `bundle install` is also confusing when unlocking, since `bundle update` is what has been run. So skip that part as well when unlocking. https://github.com/rubygems/rubygems/commit/64d84ad7d8
2025-01-28[rubygems/rubygems] Remove unnecessary platform helpersDavid Rodríguez
I think they add unnecessary indirection and inconsistency to the specs. https://github.com/rubygems/rubygems/commit/609924d985
2024-11-26[rubygems/rubygems] Fix installs of subdependencies of unlocked dependencies ↵David Rodríguez
to be conservative When converging specification to pass the set of versions that should be preserved from the lockfile during resolution, we should make sure all top level gems are considered, and only exclude those gems themselves (and not their dependencies) if their locked versions happen to not be satisfied by an edited Gemfile. https://github.com/rubygems/rubygems/commit/ed2f1b7b88
2024-10-04[rubygems/rubygems] Remove extra space in BUNDLED WITH sectionSamuel Giddins
Signed-off-by: Samuel Giddins <[email protected]> https://github.com/rubygems/rubygems/commit/d8b5d05e46
2024-10-04[rubygems/rubygems] Remove outdated conditionals from testsSamuel Giddins
Signed-off-by: Samuel Giddins <[email protected]> https://github.com/rubygems/rubygems/commit/06eec6d855
2024-09-20[rubygems/rubygems] Fix RubyGems warnings about pre-release dependenciesDavid Rodríguez
Nothing here relies on the dependency being on a pre-release, and Bundler does not use prereleases in the realworld. https://github.com/rubygems/rubygems/commit/96f5742ff1
2024-09-13[rubygems/rubygems] Remove redundant arguments passed to `bundle` helperDavid Rodríguez
They are used by default. https://github.com/rubygems/rubygems/commit/0b7f7d879f
2024-09-13[rubygems/rubygems] Remove `BUNDLER_IGNORE_DEFAULT_GEM`David Rodríguez
As long as we use a high enough test version, the default version of Bundler should never get in the middle. https://github.com/rubygems/rubygems/commit/d63f0818aa
2024-09-13[rubygems/rubygems] Make sure test does not load system version of BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d850ea1d95
2024-08-05[rubygems/rubygems] Extract a `build_repo3` helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d8cf4aa0cd
2024-07-26[rubygems/rubygems] Make all tests still pass when switching from ↵David Rodríguez
truffleruby to cruby https://github.com/rubygems/rubygems/commit/4f3d9fa3bf
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-06-28Synchronize Bundler & RubyGems (#11071)David Rodríguez
2024-05-31[rubygems/rubygems] Raise a friendly error whenever commands run in subshell ↵David Rodríguez
take more than a minute I expect to make occasional CI hangs easier to investigate. Implementation was adapted from tty-command. https://github.com/rubygems/rubygems/commit/39c92955bf
2024-04-29[rubygems/rubygems] Fix issue with `bundle update` with an out of sync lockfileDavid Rodríguez
An old platform related bug fix made some existing lockfiles no longer work because they included invalid platforms. So to make it backwards compatible, code was added to remove invalid platforms from the lockfile before resolution. This is skipped though when Gemfile has changed dependencies because in that case we will be re-resolving anyways. However, in the `bundle update` case, the detection of "dependencies have changed" was not actually working making Bundler remove all platforms and not be able to resolve. https://github.com/rubygems/rubygems/commit/6452adfd62
2024-03-29[rubygems/rubygems] add test case to ensure updating with multiple sources + ↵Alex Robbin
caching maintains the right lockfile https://github.com/rubygems/rubygems/commit/65839757e6
2024-03-22[rubygems/rubygems] Fix incorrect `bundle update --bundler` messageDavid Rodriguez
https://github.com/rubygems/rubygems/commit/146de56353
2024-01-11[rubygems/rubygems] Fix Bundler daily CIDavid Rodríguez
There is another place artifice usage was making the copy of vendored http in ruby-core be loaded instead of the one under test. Remove unnecessary usage of artifice. https://github.com/rubygems/rubygems/commit/d2488199b0
2023-12-22Merge RubyGems-3.5.2 and Bundler-2.5.2Hiroshi SHIBATA
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-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-09[rubygems/rubygems] No need to let this command failDavid Rodríguez
This command is not expected to fail. If it fails, we can stop the test. https://github.com/rubygems/rubygems/commit/2511a5b093
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] Use the server checksum, then calculate from gem on disk ↵Mercedes Bernard
if possible 1. Use the checksum provided by the server if provided: provides security knowing if the gem you downloaded matches the gem on the server 2. Calculate the checksum from the gem on disk: provides security knowing if the gem has changed between installs 3. In some cases, neither is possible in which case we don't put anything in the checksum and we maintain functionality as it is today Add the checksums to specs in the index if we already have them Prior to checksums, we didn't lose any information when overwriting specs in the index with stubs. But now when we overwrite EndpointSpecifications or RemoteSpecifications with more generic specs, we could lose checksum info. This manually sets checksum info so we keep it in the index. https://github.com/rubygems/rubygems/commit/de00a4f153
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-07-24[rubygems/rubygems] Avoid printing using messages when version has not changedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9635a2fd74
2023-06-20Merge rubygems/rubygems HEADHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/880dd95996c93adc1e032399816931b243c5fe17 Notes: Merged: https://github.com/ruby/ruby/pull/7961
2023-06-15[rubygems/rubygems] Improve frozen mode error messageDavid Rodríguez
This error message is also printed when using `bundler/setup` in frozen model, so we're not necessarily installing any gems when it happens. This new message play nicer with all situations. https://github.com/rubygems/rubygems/commit/6874bbacce
2023-06-15[rubygems/rubygems] Use "frozen" rather than "deployment" in error messageDavid Rodríguez
I think it communicates better what's going on. https://github.com/rubygems/rubygems/commit/07a25767a4
2023-06-15[rubygems/rubygems] Remove weird line breaks in the middle of error messageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/22b8caf42f
2023-05-30Merge RubyGems/Bundler master from 4076391fce5847689bf2ec402b17133fe4e32285Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7873
2023-03-17[rubygems/rubygems] Remove unnecessary `specific_local_platform` test helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/86b574824d
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] Support for pre flag in `bundle update`Michael Siegfried
Passing this flag allows bumping to the current version, even if that version is prerelease. This works in concert with the current flags. https://github.com/rubygems/rubygems/commit/a6409e3509 Notes: Merged: https://github.com/ruby/ruby/pull/6966
2022-11-11Merge RubyGems/Bundler master from ee2f8398324af4bc1b95f7565ce2fda98126e026v3_2_0_preview3Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/6715
2022-08-23[rubygems/rubygems] Fix conservative update downgrading top level gemsDavid Rodríguez
When `--conservative` is passed, explicit unlocks are set for top level gems via `@unlock[:gems]`, so that only those particular gems are allowed to be updated. When we compute the "base resolve" from the lockfile (the set of gems whose versions should be kept pinned by the resolver), we always exclude gems explicitly unlocked through `@unlock[:gems]` from it. This is done by the `converge_specs` method. However, the `converge_specs` method is also used for figuring out additional lower bound requirements from the lockfile. But in this case, even if gems are explicitly unlock in `@unlock[:gems]`, we still want to add the additional requirement, so that gems are not downgraded by the resolver. So the solution is to move the line filtering out gems in `@unlock[:gems]` from the `converged_specs` method out of that method, so that it only applies for computing the "base resolve", but not the addtional lower bound requirements. https://github.com/rubygems/rubygems/commit/405119bd7b Notes: Merged: https://github.com/ruby/ruby/pull/6268