| Age | Commit message (Collapse) | Author |
|
The hook receives a Bundler spec proxy (Bundler::EndpointSpecification
or Bundler::RemoteSpecification) that responds to the Gem::Specification
API but is not itself a Gem::Specification instance. Plugins doing
strict is_a? checks would break on the previous wording.
Also clarify the cache-hit language: the hook does not fire when the
initial download-cache check in fetch_gem finds the .gem already on
disk, but Bundler.rubygems.download_gem also has a race-protection
early return on the same path, which the previous wording obscured.
https://github.com/ruby/rubygems/commit/93fe617ea8
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
|
Arrange events.rb by actual firing order so the file reads as a
timeline of bundler's lifecycle: Gemfile eval, install-all bracket
(with per-gem fetch, git fetch, and install nested inside), then
require-all bracket (with per-gem require nested inside).
Also clarify the git fetch hook docstrings: the hook fires around
both remote fetch and checkout, not only fetch.
https://github.com/ruby/rubygems/commit/acc0659ffc
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
|
Adds four new hook points:
- before-fetch / after-fetch: fires in Source::Rubygems#download_gem
around actual network downloads, avoiding noise from cache hits.
- before-git-fetch / after-git-fetch: fires in Source::Git#specs
around fetch/checkout operations.
Based on the original proposal in #8162 with adjustments:
- Moved gem fetch hooks from fetch_gem_if_possible to download_gem
so they only fire on actual network I/O.
- Dropped the source argument since spec.source provides it.
- Renamed git hooks to before-git-fetch / after-git-fetch for
consistency with the existing before-*/after-* pattern.
- Removed GEM_BEFORE_FETCH/GEM_AFTER_FETCH from Source::Git#install
since using gem fetch events for git sources is semantically
inconsistent.
https://github.com/ruby/rubygems/commit/34c4a46ef2
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
|
https://github.com/ruby/rubygems/commit/fefe97c0bd
|
|
Bundler::Plugin::Index
https://github.com/ruby/rubygems/commit/dd50b93622
|
|
- ### Problem
Bundler awaits for the dependencies of a gem to be download and installed
before it proceeds to downloading and installing the dependency itself.
This creates a bottleneck at the end of the installation process and
block a thread unnecessarily.
### Details
The installation strategy in Bundler is to await for "leaf gems" to
be download/installed before the "root gem" is processed.
For instance, in this scenario:
- Gem "foo" has a dependency on "bar" (We can call this the "root gem")
- Gem "bar" has no dependency (We call cal this the "leaf gems")
- A Gemfile adds "gem 'foo'"
In this case, only a single thread will have work to do, that is
because Bundler will queue the gem "bar" to be downloaded and
installed, and only when "bar" is finished, then Bundler will queue
work for "foo".
For **pure ruby gems**, this strategy is a waste of time because
during the installation, a gem's code is not evaluated and no
"require" statement is evaluated.
For gems with native extensions, this strategy make sense. When the
`extconf.rb` of a gem is evaluated, it's possible that the extconf
requires a dependency and therefore Bundler needs to wait for those
dependencies to be installed before it can execute the extconf.
A typical example is a native extension that require 'mini_portile2'.
### Solution
From the explanation above, I'd like to split the download from
the installation of a gem.
The tricky aspect is that there is no RubyGems API to know whether
a gem has a native extension. The only way to know is after we
download the gem and read the `metadata` from the tarball.
So the solution in this patch is as follow:
1. We download all gems without doing any checks.
2. Once the gems are downloaded, we now know whether a gem has a
native extensions.
3. If a gem is a pure ruby gems, we install it without waiting.
4. If a gem has a native extension, we check whether its dependencies
are installed. If a dependency is not yet installed, we put back
the gem in the queue. It will be dequeued later on and we'll redo
this logic.
### Performance gain
The speed gain highly depends on how deep the dependency tree is.
E.g. bar depends on foo which depends on baz which depends on jane ...
Previously we'd proceed to installing gems just one by one and only
a single thread would be used.
In a freshly generated Rails application, the speed gain is not that
important. And the reason is because we are having a "tail latency"
issue. Around the end of the installation process, the remaining
gems to be installed are the one with native extensions, since we
had to wait for for their dependencies to be installed. Compiling
them is the slowest part, and since we are doing it at the end then
the speed gain is not that noticeable.
### Misc
Another advantage of this change is to be able to more easily
implement this kind of feature https://github.com/ruby/rubygems/issues/9138
to let users solely download gems, without installing them .
https://github.com/ruby/rubygems/commit/e5e8c0a507
|
|
- ### Problem
When a plugin in the Gemfile is updated to a new version, it will
be downloaded but will not be registered. The old version of the
plugin will be loaded when Bundler is invoked.
### Context
The problem is in the `Index#installed?` method that only checks for
the plugin name in the index. If it finds one, it skips the
registration.
### Solution
Check whether the registed plugin load paths matche the new plugin
one. If not, register the new plugin which will override the
previous one in the index.
https://github.com/ruby/rubygems/commit/ac65001055
|
|
This is where error handling happens in all the other options, so it's
where we'll look when we completely remove error handling for these
removed CLI flags in the next major.
https://github.com/rubygems/rubygems/commit/40d660c607
|
|
an error
https://github.com/rubygems/rubygems/commit/8bfe317e6d
|
|
It's a term from times with multiple remote sources, let's move on :)
https://github.com/rubygems/rubygems/commit/6439b8944e
|
|
https://github.com/rubygems/rubygems/commit/58e9bd9962
Notes:
Merged: https://github.com/ruby/ruby/pull/12968
|
|
https://github.com/rubygems/rubygems/commit/e891be9197
Notes:
Merged: https://github.com/ruby/ruby/pull/12968
|
|
protected folders
As long as there's nothing new to install and gems are already there.
If not, give a meaningful error about what happened.
This was how things already worked until
https://github.com/rubygems/rubygems/commit/345ec45f5a87, so this commit partially
reverts that change.
https://github.com/rubygems/rubygems/commit/794b0ecb39
|
|
directory on ruby 3.4
https://github.com/rubygems/rubygems/commit/027cdc750a
Notes:
Merged: https://github.com/ruby/ruby/pull/12568
|
|
All we need is to setup remote or local sources appropriately.
https://github.com/rubygems/rubygems/commit/3ceff46a2a
|
|
It has been supported since RubyGems 2.2.0 via https://github.com/rubygems/rubygems/commit/4525e45a4d45
Signed-off-by: Samuel Giddins <segiddins@segiddins.me>
https://github.com/rubygems/rubygems/commit/bf39c583e8
|
|
If we want to change git gems to use a proper cache, instead of using
the cache folder as the install location, so we need to keep git
information in the cache, so that when running `bundle install` or
`bundler install --local`, we are able to figure out whether the
revision that needs to be checked out is present locally in the cache or
needs to be fetched from the remote repository.
https://github.com/rubygems/rubygems/commit/607eda63eb
|
|
https://github.com/rubygems/rubygems/commit/b373b7ed0d
|
|
This affected both CLI and Gemfile installs
https://github.com/rubygems/rubygems/commit/a0d101a8df
|
|
Also bring the man page up to date.
https://github.com/rubygems/rubygems/commit/a849bd6947
|
|
Ensure only one source type is specified, and ensure options that
are only relevant to git sources are only specified with git.
https://github.com/rubygems/rubygems/commit/58b043215e
|
|
It's the exact same implementation as --git
https://github.com/rubygems/rubygems/commit/18eb2418c6
|
|
https://github.com/rubygems/rubygems/commit/5d6a8f2fb4
|
|
https://github.com/rubygems/rubygems/commit/bb66253f2c
|
|
https://github.com/rubygems/rubygems/commit/8d51390ca4
|
|
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
|
|
Plugins don't use a lockfile, so ignore frozen related settings.
https://github.com/rubygems/rubygems/commit/f17a3bb81f
|
|
from https://github.com/rubygems/rubygems/commit/72fd3dd2096af16d797ad0cd8e0d2a8869e240b3
Notes:
Merged: https://github.com/ruby/ruby/pull/7025
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6330
|
|
https://github.com/rubygems/rubygems/commit/16c3535413afebcdbab7582c6017c27b5da8a8dc
Notes:
Merged: https://github.com/ruby/ruby/pull/6326
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6054
|
|
install output
The lockfile is completely ignored in inline mode, yet the previous
output would suggest it wasn't.
https://github.com/rubygems/rubygems/commit/763125a745
|
|
https://github.com/rubygems/rubygems/commit/fe96fb6e2ac5a8b6df5e852470d11fa854301eca
Notes:
Merged: https://github.com/ruby/ruby/pull/5669
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5317
|
|
We have two representations of a source. Once used for sorting, which
should not depend on the source's state, but solely on its static
information, like remotes. Another one used for error and informational
messages, which should properly inform about the exact state of the
source when the message is printed.
This commit makes the latter be the default implementation of `to_s`, so
that error and informational messages are more accurate by default.
https://github.com/rubygems/rubygems/commit/b5f2b88957
|
|
versions
https://github.com/rubygems/rubygems/commit/9c88db949d
Notes:
Merged: https://github.com/ruby/ruby/pull/4789
|
|
it turns out that running `bundle plugin uninstall some-plugin` would remove that plugin from the list of hooks, but if the list of hooks for an event was now empty, we would serialize the empty array into yaml as an empty single bullet item. which would then get unserialized as a plugin with the name empty string. which we would then try to load and explode. 😬
https://github.com/rubygems/rubygems/commit/545ebba9a5
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4648
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4634
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4533
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4383
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4143
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3864
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3659
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3086
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2753
|
|
https://github.com/bundler/bundler/commit/876545805e
Notes:
Merged: https://github.com/ruby/ruby/pull/2366
|
|
Pick from 8dd59e3ba97eb80a599f8149f31bf40773b69dc0
|
|
https://github.com/bundler/bundler/commit/a53709556b95a914e874b22ed2116a46b0528852
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* bin/*, lib/bundler/*, lib/bundler.rb, spec/bundler, man/*:
Merge from latest stable branch of bundler/bundler repository and
added workaround patches. I will backport them into upstream.
* common.mk, defs/gmake.mk: Added `test-bundler` task for test suite
of bundler.
* tool/sync_default_gems.rb: Added sync task for bundler.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|