Age | Commit message (Collapse) | Author |
|
This will help centralize wheel platform selection logic eventually
Signed-off-by: Samuel Giddins <[email protected]>
|
|
My application spends more than 30% of time during `bundle update`
comparing versions due to versions being sorted inside
next_package_to_try. This has been addressed in pub_grub by defining a
strategy interface (a `#next_package_and_version` method) which allows
consumers to have finer control over the heuristic to select the next
package to try.
This commit implements the new strategy interface to remove extraneous
version sorting (previously in next_package_to_try) since only the final
count of versions is used.
Combined with a previous change to pub_grub (already applied to
Bundler), this commit results in `bundle update` taking only half the
time it did on 2.6.5.
https://github.com/rubygems/rubygems/commit/62f69e27f0
|
|
https://github.com/rubygems/rubygems/commit/e891be9197
Notes:
Merged: https://github.com/ruby/ruby/pull/12968
|
|
In a large application I profiled allocations while running `bundle
update` and found that this method was ~60% of allocations while
resolving (and Candidate#<=> is almost half of the total runtime).
This commit removes the array allocation in Candidate#<=> (and similar
methods since the implementations are so simple). The array is always
the same two elements so they can just be compared directly.
https://github.com/rubygems/rubygems/commit/6a7c411ba7
|
|
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
|
|
specification classes
https://github.com/rubygems/rubygems/commit/7f921aa46e
|
|
They use less memory that way.
When resolving from scratch a Gemfile including only `"gem "rails", "~>
8.0.1"`, I get the following results:
### Before
Total allocated: 265.06 MB (3186053 objects)
Total retained: 116.98 MB (1302280 objects)
### After
Total allocated: 262.99 MB (3177437 objects)
Total retained: 115.91 MB (1297821 objects)
https://github.com/rubygems/rubygems/commit/a4ef9c5f56
|
|
Sometimes we'll resolve using bare `Gem::Dependency` instances rather
than `Bundler::Dependency` instances, which is fine, simpler, and saves
some memory.
When resolving from scratch a Gemfile including only `"gem "rails", "~>
8.0.1"`, I get the following results:
### Before
Total allocated: 277.48 MB (3384318 objects)
Total retained: 117.53 MB (1338657 objects)
### After
Total allocated: 265.06 MB (3186053 objects)
Total retained: 116.98 MB (1302280 objects)
https://github.com/rubygems/rubygems/commit/c6dc2966c5
|
|
lockfile unless necessary
Even if they don't match the current Ruby version, they could still work
in other rubies. So it's better to keep them.
https://github.com/rubygems/rubygems/commit/9a3e583b0c
Notes:
Merged: https://github.com/ruby/ruby/pull/12568
|
|
https://github.com/rubygems/rubygems/commit/a76fd6d3bf
Notes:
Merged: https://github.com/ruby/ruby/pull/12568
|
|
https://github.com/rubygems/rubygems/commit/9ea1539b08
|
|
most_specific_locked_platform
So there's no need to pass it around in so many places.
https://github.com/rubygems/rubygems/commit/784ab7481b
|
|
https://github.com/rubygems/rubygems/commit/0c3a65871a
|
|
https://github.com/rubygems/rubygems/commit/d8d68cc00e
|
|
https://github.com/rubygems/rubygems/commit/d5dce93167
|
|
The original implementation of this flag was too naive and all it did
was restricting gems to locally installed versions if there are any
local versions installed.
However, it should be much smarter. For example:
* It should fallback to remote versions if locally installed version
don't satisfy the requirements.
* It should pick locally installed versions even for subdependencies not
yet discovered.
This commit fixes both issues by using a smarter approach similar to how
we resolve prereleases:
* First resolve optimistically using only locally installed gems.
* If any conflicts are found, scan those conflicts, allow remote
versions for the specific gems that run into conflicts, and
re-resolve.
https://github.com/rubygems/rubygems/commit/607a3bf479
Co-authored-by: Gourav Khunger <[email protected]>
|
|
when locked for a specific platform
If they are already in the lockfile as the most specific variant for a
platform, we shouldn't change that unless explicitly unlocking.
https://github.com/rubygems/rubygems/commit/a901660498
|
|
Instead of having to do a complete pass after resolve.
To do this, we add to the ruby group all the platform specs with the
same dependencies as the ruby specs.
https://github.com/rubygems/rubygems/commit/e50415f2a6
|
|
It's just for debugging and a simple method, so no need.
https://github.com/rubygems/rubygems/commit/3230425a9a
|
|
https://github.com/rubygems/rubygems/commit/e2c1bc1b6c
|
|
https://github.com/rubygems/rubygems/commit/0ddf25e5aa
|
|
https://github.com/rubygems/rubygems/commit/bb66253f2c
|
|
full spec
https://github.com/rubygems/rubygems/commit/957d3d9a7f
|
|
This is a step forward towards eventually including metadata in the
lockfile.
https://github.com/rubygems/rubygems/commit/56fc02b251
|
|
https://github.com/rubygems/rubygems/commit/2462c8e04d
|
|
resolve under all locked platforms
https://github.com/rubygems/rubygems/commit/25304f3e8d
|
|
While working on locking multiple platforms by default, I got an
infinite resolution loop in one of our resolver specs.
The culprit ended up being that when dealing with lockfile specs with
incomplete dependencies (spec appears in lockfile, but its dependencies
don't), those specs were not being properly expired and that tripped up
resolution.
The issue for some reason only manifests when dealing with multiple
lockfile platforms, that's why it only manifested when working on
locking multiple platforms by default.
https://github.com/rubygems/rubygems/commit/4ca72913bb
|
|
This reverts commit 69580f8b72f41c58cae57d1ada4db909922b3891.
|
|
unlocking
Bundler is very conservative by default, trying to preserve versions
from the lockfile as possible, and never downgrading them. However, when
it runs into a resolution error, it still tries to find a valid
resolution.
This fallback behavior was too "brute-force" though, completely
unrestricting any gem found in the resolution conflict, and that could
lead to direct dependencies being downgraded in some edge cases.
Instead, unlock things a bit more carefully:
* First try unlocking fully pinned indirect dependencies, but leave a
lower bound requirement in place to prevent downgrades.
* Then try unlocking any fully pinned dependency, also leaving a lower
bound requirement in place.
* Finally completely unrestrict dependencies if nothing else worked.
https://github.com/rubygems/rubygems/commit/7f55ed8302
|
|
Recent bugs fixed made me realize we were relying on state too much
here. We only need to keep incomplete specs to be able to expire them
and retry resolution without them locked. If we use a separate class, we
can do that more transparently and handle them just like we handle
"missing specs".
Notes:
Merged: https://github.com/ruby/ruby/pull/7582
|
|
Pick from https://github.com/rubygems/rubygems/commit/5ace20dbecfeaf09fba5f616193f3cfcff70ba00
Notes:
Merged: https://github.com/ruby/ruby/pull/7203
|
|
from https://github.com/rubygems/rubygems/commit/0635c1423db5d7c461d53bf0c3329bca75de7609
Notes:
Merged: https://github.com/ruby/ruby/pull/7094
|
|
Pick from https://github.com/rubygems/rubygems/commit/823c776d951f3c35094611473ec77f94e8bf6610
Notes:
Merged: https://github.com/ruby/ruby/pull/6890
|
|
https://github.com/rubygems/rubygems/pull/5960
Co-authored-by: David Rodríguez <[email protected]>
|
|
https://github.com/rubygems/rubygems/commit/6214d00b2315ed37c76b1fbc1c72f61f92ba5a65
Notes:
Merged: https://github.com/ruby/ruby/pull/6578
|
|
https://github.com/rubygems/rubygems/commit/62c2edd255
Notes:
Merged: https://github.com/ruby/ruby/pull/6578
|
|
https://github.com/rubygems/rubygems/commit/788e46e152
Notes:
Merged: https://github.com/ruby/ruby/pull/6578
|
|
https://github.com/rubygems/rubygems/commit/16c3535413afebcdbab7582c6017c27b5da8a8dc
Notes:
Merged: https://github.com/ruby/ruby/pull/6326
|
|
Pick from https://github.com/rubygems/rubygems/commit/6b3a5a9ab0453463381a8164efb6298ea9eb776f
Notes:
Merged: https://github.com/ruby/ruby/pull/6268
|
|
https://github.com/rubygems/rubygems/commit/fa60f1fe43
Notes:
Merged: https://github.com/ruby/ruby/pull/6268
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6124
|
|
https://github.com/rubygems/rubygems/commit/3f7d0352e84b29d4a2d4cd93b31e5ebdb5f79cc6
Notes:
Merged: https://github.com/ruby/ruby/pull/5669
|
|
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a
Notes:
Merged: https://github.com/ruby/ruby/pull/5462
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4367
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4143
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3982
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3901
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3659
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3086
|
|
Try to fix failure at https://github.com/ruby/ruby/runs/207580232#step:10:382
```
undefined method `name' for "Gemfile.lock":String
/home/runner/work/ruby/ruby/lib/bundler/resolver/spec_group.rb:65:in `eql?'
```
|