Let gem install use Compact Index API only when present.#9314
Open
simi wants to merge 3 commits intoruby:masterfrom
Open
Let gem install use Compact Index API only when present.#9314simi wants to merge 3 commits intoruby:masterfrom
simi wants to merge 3 commits intoruby:masterfrom
Conversation
dc193a0 to
4e508a1
Compare
4e508a1 to
fc0f6af
Compare
simi
commented
Feb 6, 2026
| ## | ||
| # Minimal CompactIndex implementation for tests. | ||
| # This is a simplified version that only implements what's needed for test fixtures. | ||
| module CompactIndexBuilder |
Contributor
Author
There was a problem hiding this comment.
I tried to use compact_index gem, but it is not possible to load external dependency on ruby-core CI. For now I have provided minimal implementation for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While I was working on publishing some gems in private repositories, I have realized bundler already uses Compact Index API only when present, but gem commands sometimes not.
This is first change in chain to update gem commands (
gem installhere) to be able to use Compact Index API only when present. The change is simple, Compact Index API/info/:gemendpoint already provides all info needed to provide gemspec stub needed to resolve dependencies.I have added also (in separate commit) infrastructure for simple stub of Compact Index API (reusing same API as
spec_fetcher) and in last commit I have ported some basicgem installtests to use Compact Index API (as new default option).As a side-effect it is also faster. Running simple command like
GEM_HOME=/tmp/gem_test gem installwith empty GEM_HOME makes gem install 5s faster locally on my Linux (Fedora) computer.