Skip to content

Decode content-addressable tuples in spec fetcher - #184

Draft
girachawda wants to merge 14 commits into
gc/ca-cooldownfrom
gc/ca-spec-fetcher-decode
Draft

Decode content-addressable tuples in spec fetcher#184
girachawda wants to merge 14 commits into
gc/ca-cooldownfrom
gc/ca-spec-fetcher-decode

Conversation

@girachawda

Copy link
Copy Markdown

Summary

  • decode content-addressable remote tuples in the shared spec fetcher path after dependency filtering
  • reuse the shared decoder from query/dependency remote flows
  • preserve content-address metadata on fetched remote specs so downloads use CA filenames
  • add focused spec fetcher tests and command-level coverage for fetch, update, and dependency --remote

Tests

  • ruby -Ilib:test test/rubygems/test_gem_spec_fetcher.rb
  • ruby -Ilib:test test/rubygems/test_gem_source.rb
  • ruby -Ilib:test test/rubygems/test_gem_commands_fetch_command.rb
  • ruby -Ilib:test test/rubygems/test_gem_commands_dependency_command.rb
  • ruby -Ilib:test test/rubygems/test_gem_commands_update_command.rb
  • ruby -Ilib:test test/rubygems/test_gem_commands_list_command.rb
  • ruby -Ilib:test test/rubygems/test_gem_commands_info_command.rb
  • ruby -Ilib:test test/rubygems/test_gem_commands_search_command.rb

OughtPuts and others added 14 commits August 24, 2026 16:47
Allow `gem build --ruby-abi X.Y` to build a gem that only supports a
single Ruby ABI (a skinny gem) with a content addressable file name of
the form <name>-<version>-<sha8>.gem, where the suffix is derived from
the SHA-256 digest of the gem contents.

The gem is built in memory and validated against the requested Ruby
ABI. If required_ruby_version is unset it is derived from the ABI; the
passed-in spec is only updated once the build succeeds.

Co-authored-by: Jenny Shen <jenny.shen@shopify.com>
Co-authored-by: Jenny Shen <jenny.shen@shopify.com>
- Parse compact-index suffix as content address when hex + platform:=
  requirement present; carry content_address through resolver.
- Prefer content-addressed gems in resolver when platform specificity ties.
- Download and install SHA-named gem archives; fetch SHA-named gemspecs
  for development dependencies.
- Preserve distinct resolver candidates by content_address in ==/hash.
- Update BasicSpecification.content_address? calls to
  Gem::ContentAddress.match? (PR #172 refactor).

Assisted-By: devx/fff388fa-6f3f-4c7a-8385-6e602f16830e
Assisted-By: devx/5f8c508e-3e50-4812-b2c3-84379e7c3fce
Assisted-By: devx/ce8ef461-c04c-4d00-8751-1b2488fe8a4b
Assisted-By: devx/ce8ef461-c04c-4d00-8751-1b2488fe8a4b
Assisted-By: devx/ce8ef461-c04c-4d00-8751-1b2488fe8a4b
Co-authored-by: Harriet Oughton <harriet.oughton@shopify.com>
Assisted-By: devx/be89c912-a11a-418c-92be-1893963a909c
Append platform to content-addressable gems entries in lockfile

Support content addressable gems in lockfile and local cache
…ects instead of parallel array/hash manipulation
Assisted-By: devx/3250d709-a0a0-4417-8f2f-83669ac9e685
Assisted-By: devx/54c45e18-0bd1-4563-826a-f8cbc21a3b90
Assisted-By: devx/f74059f6-45c7-47f1-a873-89ef1aa1a5ae
@girachawda
girachawda force-pushed the gc/ca-cooldown branch 10 times, most recently from 4eb1517 to b58c675 Compare August 28, 2026 11:42
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.

3 participants