Skip to content

Conversation

@simi
Copy link
Contributor

@simi simi commented Feb 6, 2026

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 install here) to be able to use Compact Index API only when present. The change is simple, Compact Index API /info/:gem endpoint 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 basic gem install tests 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 install with empty GEM_HOME makes gem install 5s faster locally on my Linux (Fedora) computer.

@simi simi force-pushed the compact-gem-install branch 3 times, most recently from dc193a0 to 4e508a1 Compare February 6, 2026 22:21
@simi simi force-pushed the compact-gem-install branch from 4e508a1 to fc0f6af Compare February 6, 2026 22:33
##
# Minimal CompactIndex implementation for tests.
# This is a simplified version that only implements what's needed for test fixtures.
module CompactIndexBuilder
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant