5b6c6414cf (master): [ruby/rubygems] Add a new Bundler config to control how many specs are fetched:

0 views
Skip to first unread message

Edouard CHIN

unread,
Mar 3, 2026, 9:25:19 PM (10 hours ago) Mar 3
to ruby...@g.ruby-lang.org
Edouard CHIN 2026-03-02 23:29:23 +0000 (Mon, 02 Mar 2026)

New Revision: 5b6c6414cf

https://github.com/ruby/ruby/commit/5b6c6414cf

Log:
[ruby/rubygems] Add a new Bundler config to control how many specs are fetched:

- ### Problem

In #9071, I increased the API_REQUEST_SIZE constants to fetch 100
specifications at once instead of 50.
Worth to remember that this codepath is exclusively used for servers
that don't implement the compact index API and where Bundler has to
fallback on the `/v1/dependencies` endpoint.

Fetching 100 gems at once seems not supported by some gem servers.
See https://github.com/ruby/rubygems/issues/9345

### Solution

I'd like to provide a new Bundler configuration
`BUNDLE_API_REQUEST_SIZE` to let users of those servers control how
many dependencies should be fetched at once.

### Alternatives

The other alternative is to revert #9071 and always fetch 50 specs.
I tried the number 100 on a single rubygem registry (cloudsmith),
and I don't have data point to know whether this value is supported
by most registries.

https://github.com/ruby/rubygems/commit/1a3bace42e

Modified files:
lib/bundler/fetcher/dependency.rb
lib/bundler/man/bundle-config.1
lib/bundler/man/bundle-config.1.ronn
spec/bundler/bundler/fetcher/dependency_spec.rb
Reply all
Reply to author
Forward
0 new messages