<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/bundler/resolver, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[rubygems/rubygems] Fix truffleruby failing to install sorbet-static when there's no lockfile</title>
<updated>2025-07-30T02:19:26+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2025-07-25T13:24:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e42f1aaa5aa77b51f6c590a23be59cd61776ae2d'/>
<id>e42f1aaa5aa77b51f6c590a23be59cd61776ae2d</id>
<content type='text'>
The generic Ruby platform was getting unconditionally added in
truffleruby, preventing resolution in situations where there's no
generic ruby version (sorbet-static). Instead, the generic platform
should be considered per dependency, not globally.

https://github.com/rubygems/rubygems/commit/a96afc5351
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The generic Ruby platform was getting unconditionally added in
truffleruby, preventing resolution in situations where there's no
generic ruby version (sorbet-static). Instead, the generic platform
should be considered per dependency, not globally.

https://github.com/rubygems/rubygems/commit/a96afc5351
</pre>
</div>
</content>
</entry>
<entry>
<title>Move most of Bundler::GemHelpers to Gem::Platform</title>
<updated>2025-06-06T01:22:18+00:00</updated>
<author>
<name>Samuel Giddins</name>
<email>segiddins@segiddins.me</email>
</author>
<published>2025-05-18T15:37:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c0a1e877b3c0c5dd69bb634262bd4e73a07eb27e'/>
<id>c0a1e877b3c0c5dd69bb634262bd4e73a07eb27e</id>
<content type='text'>
This will help centralize wheel platform selection logic eventually

Signed-off-by: Samuel Giddins &lt;segiddins@segiddins.me&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will help centralize wheel platform selection logic eventually

Signed-off-by: Samuel Giddins &lt;segiddins@segiddins.me&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Implement pub_grub strategy interface</title>
<updated>2025-03-27T04:57:26+00:00</updated>
<author>
<name>Hartley McGuire</name>
<email>skipkayhil@gmail.com</email>
</author>
<published>2025-03-26T03:27:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=752a1d785475d1950b33c7d77b289a6a3a753f02'/>
<id>752a1d785475d1950b33c7d77b289a6a3a753f02</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Consistently use "lockfile" over "lock file"</title>
<updated>2025-03-24T04:25:07+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2025-03-12T17:16:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bb1b5877a7b2dba79c81275f32b7cc5485323540'/>
<id>bb1b5877a7b2dba79c81275f32b7cc5485323540</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/e891be9197
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/e891be9197
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Remove array allocation from Candidate#&lt;=&gt;</title>
<updated>2025-03-13T01:24:21+00:00</updated>
<author>
<name>Hartley McGuire</name>
<email>skipkayhil@gmail.com</email>
</author>
<published>2025-03-11T21:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8cc85dc00feef7fc7846ad15df2778f58716c169'/>
<id>8cc85dc00feef7fc7846ad15df2778f58716c169</id>
<content type='text'>
In a large application I profiled allocations while running `bundle
update` and found that this method was ~60% of allocations while
resolving (and Candidate#&lt;=&gt; is almost half of the total runtime).

This commit removes the array allocation in Candidate#&lt;=&gt; (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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a large application I profiled allocations while running `bundle
update` and found that this method was ~60% of allocations while
resolving (and Candidate#&lt;=&gt; is almost half of the total runtime).

This commit removes the array allocation in Candidate#&lt;=&gt; (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
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Fix locked gems being upgraded when locked dependencies are incorrect</title>
<updated>2025-02-18T03:12:51+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2025-02-12T14:45:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c77354157f7a0af8de5f16dc1b4f352f4bc1402f'/>
<id>c77354157f7a0af8de5f16dc1b4f352f4bc1402f</id>
<content type='text'>
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 &lt;package&gt;`), 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;package&gt;`), 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
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Move expanding dependencies with metadata to specification classes</title>
<updated>2025-02-06T06:57:57+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2025-01-31T06:19:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a1716e236566fd34e4f17b9b484cc077f48e7e69'/>
<id>a1716e236566fd34e4f17b9b484cc077f48e7e69</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/7f921aa46e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/7f921aa46e
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Metadata dependencies can be `Gem::Dependency` instances</title>
<updated>2025-02-06T06:57:56+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2025-01-31T05:50:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=24f5e3010f632d400e56042e4b14b121a09e6c74'/>
<id>24f5e3010f632d400e56042e4b14b121a09e6c74</id>
<content type='text'>
They use less memory that way.

When resolving from scratch a Gemfile including only `"gem "rails", "~&gt;
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They use less memory that way.

When resolving from scratch a Gemfile including only `"gem "rails", "~&gt;
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Remove unnecessary remapping of dependencies</title>
<updated>2025-02-06T06:57:55+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2025-01-30T14:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7fed6c887d68e1347defcd1364b0ceb5ba18a2b9'/>
<id>7fed6c887d68e1347defcd1364b0ceb5ba18a2b9</id>
<content type='text'>
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", "~&gt;
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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", "~&gt;
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Don't remove platform specific variants from the lockfile unless necessary</title>
<updated>2025-01-14T03:24:37+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2025-01-09T20:34:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0b1b8bc3ec08de6944e6784de1ea5e03e90d8dba'/>
<id>0b1b8bc3ec08de6944e6784de1ea5e03e90d8dba</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
</feed>
