<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/bundler/installer/parallel_installer.rb, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Merge RubyGems/Bundler 4.0.9</title>
<updated>2026-04-08T22:49:38+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2026-04-08T08:07:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=dc13b5adc91c91a8d2c35cf6e770390811dbf596'/>
<id>dc13b5adc91c91a8d2c35cf6e770390811dbf596</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Fix `--local` hitting the network when default gems are included</title>
<updated>2024-09-17T05:39:06+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2024-09-12T17:24:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=80e934c29c5bd8b7955e26f8683ac6644d69a200'/>
<id>80e934c29c5bd8b7955e26f8683ac6644d69a200</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/b9a2d4d539
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/b9a2d4d539
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Allow bundle pristine to run in parallel</title>
<updated>2023-12-12T02:10:53+00:00</updated>
<author>
<name>Samuel Giddins</name>
<email>segiddins@segiddins.me</email>
</author>
<published>2023-08-30T22:21:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e223dde3295cc59415c289305fd8d706d46cd2e9'/>
<id>e223dde3295cc59415c289305fd8d706d46cd2e9</id>
<content type='text'>
Also fix running when BUNDLE_NO_INSTALL happens to be set, same as with install/update commands

https://github.com/rubygems/rubygems/commit/a555fd6ccd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also fix running when BUNDLE_NO_INSTALL happens to be set, same as with install/update commands

https://github.com/rubygems/rubygems/commit/a555fd6ccd
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Reduce allocations when installing gems with bundler</title>
<updated>2023-11-26T22:07:39+00:00</updated>
<author>
<name>Samuel Giddins</name>
<email>segiddins@segiddins.me</email>
</author>
<published>2023-09-19T02:18:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=08308fe3e8fd51f4445be9408a418d9ac6960921'/>
<id>08308fe3e8fd51f4445be9408a418d9ac6960921</id>
<content type='text'>
```
==&gt; memprof.after.txt &lt;==
Total allocated: 1.13 MB (2352 objects)
Total retained:  10.08 kB (78 objects)

==&gt; memprof.before.txt &lt;==
Total allocated: 46.27 MB (38439 objects)
Total retained:  9.94 kB (75 objects)
```

Yes, we were allocating 45MB of arrays in `dependencies_installed?`,
it was accidentally cubic.

https://github.com/rubygems/rubygems/commit/13ab874388
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
```
==&gt; memprof.after.txt &lt;==
Total allocated: 1.13 MB (2352 objects)
Total retained:  10.08 kB (78 objects)

==&gt; memprof.before.txt &lt;==
Total allocated: 46.27 MB (38439 objects)
Total retained:  9.94 kB (75 objects)
```

Yes, we were allocating 45MB of arrays in `dependencies_installed?`,
it was accidentally cubic.

https://github.com/rubygems/rubygems/commit/13ab874388
</pre>
</div>
</content>
</entry>
<entry>
<title>Re-resolve when lockfile is invalid</title>
<updated>2023-10-16T04:49:49+00:00</updated>
<author>
<name>David Rodriguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2023-09-30T19:01:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cbf2e133c10b87bb7d1f858471e600af6c6e62d1'/>
<id>cbf2e133c10b87bb7d1f858471e600af6c6e62d1</id>
<content type='text'>
Move the check for unmet dependencies in lockfile just in time to be
able to re-resolve if unmet dependencies are found.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the check for unmet dependencies in lockfile just in time to be
able to re-resolve if unmet dependencies are found.
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Auto-heal on corrupted lockfile with missing deps</title>
<updated>2023-03-01T02:50:40+00:00</updated>
<author>
<name>Daniel Colson</name>
<email>danieljamescolson@gmail.com</email>
</author>
<published>2023-02-21T21:27:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=62b3bcba5ee422d7431f90567636155358234288'/>
<id>62b3bcba5ee422d7431f90567636155358234288</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Avoid crashing with a corrupted lockfile</title>
<updated>2023-02-09T10:29:50+00:00</updated>
<author>
<name>Daniel Colson</name>
<email>danieljamescolson@gmail.com</email>
</author>
<published>2023-02-07T18:13:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8edd350bda66a9ecb2c1043627679f2dc48d6f66'/>
<id>8edd350bda66a9ecb2c1043627679f2dc48d6f66</id>
<content type='text'>
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 (&gt;= 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
* #&lt;Thread:0x000000010833b130 sleep_forever&gt;
   rb_thread_t:0x00007fa6b6704660 native:0x0000000108985600 int:0

* #&lt;Thread:0x0000000108dea630@Parallel Installer Worker #0 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever&gt;
   rb_thread_t:0x00007fa6b67f67c0 native:0x0000700009a62000 int:0

* #&lt;Thread:0x0000000108dea4a0@Parallel Installer Worker #1 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever&gt;
   rb_thread_t:0x00007fa6b67f63c0 native:0x0000700009c65000 int:0

&lt;internal:thread_sync&gt;: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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 (&gt;= 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
* #&lt;Thread:0x000000010833b130 sleep_forever&gt;
   rb_thread_t:0x00007fa6b6704660 native:0x0000000108985600 int:0

* #&lt;Thread:0x0000000108dea630@Parallel Installer Worker #0 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever&gt;
   rb_thread_t:0x00007fa6b67f67c0 native:0x0000700009a62000 int:0

* #&lt;Thread:0x0000000108dea4a0@Parallel Installer Worker #1 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever&gt;
   rb_thread_t:0x00007fa6b67f63c0 native:0x0000700009c65000 int:0

&lt;internal:thread_sync&gt;: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
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Improve wording of unmet dependencies warning</title>
<updated>2023-02-08T22:20:24+00:00</updated>
<author>
<name>Daniel Colson</name>
<email>danieljamescolson@gmail.com</email>
</author>
<published>2023-02-08T19:56:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=728d2f808e7baf92d9190b3b27161d2405236eb0'/>
<id>728d2f808e7baf92d9190b3b27161d2405236eb0</id>
<content type='text'>
`trying to manually editing` doesn't seem quite grammatically
correct. We could change it to `trying to manually edit` (is that a
split infinitive?), but I don't think `trying to` adds much here so
I've removed it instead so `editing` is the verb.

For the list of dependencies, the wording before this commit seemed to
reverse the dependency. "B, depended on A" sounds like B depends on A
(or did in the past but doesn't anymore?), but that's not correct. I
think there's a missing word: "B, depended on by A", but I find "B,
dependency of A" a bit nicer.

https://github.com/rubygems/rubygems/commit/49a31257e3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`trying to manually editing` doesn't seem quite grammatically
correct. We could change it to `trying to manually edit` (is that a
split infinitive?), but I don't think `trying to` adds much here so
I've removed it instead so `editing` is the verb.

For the list of dependencies, the wording before this commit seemed to
reverse the dependency. "B, depended on A" sounds like B depends on A
(or did in the past but doesn't anymore?), but that's not correct. I
think there's a missing word: "B, depended on by A", but I find "B,
dependency of A" a bit nicer.

https://github.com/rubygems/rubygems/commit/49a31257e3
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge RubyGems/Bundler master</title>
<updated>2022-12-26T06:09:21+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-12-26T05:00:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b7ad60a79440f65cf883d3ff9dbdde701666ef56'/>
<id>b7ad60a79440f65cf883d3ff9dbdde701666ef56</id>
<content type='text'>
  from https://github.com/rubygems/rubygems/commit/72fd3dd2096af16d797ad0cd8e0d2a8869e240b3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  from https://github.com/rubygems/rubygems/commit/72fd3dd2096af16d797ad0cd8e0d2a8869e240b3
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Fix crash when lockfile is missing dependencies</title>
<updated>2022-12-20T04:15:02+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2022-12-15T11:14:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3fd33590f624ff74d91c1d505f85653902764384'/>
<id>3fd33590f624ff74d91c1d505f85653902764384</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
</feed>
