[Content Addressable Gems] Replace hash/array manipulation with named classes
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、Gem::CompactIndexClient::InfoRow と Gem::QueryUtils::VersionPlatforms を、その呼び出し元を通して追跡します。これには、並列ハッシュを渡す 6 つのメソッドも含まれます。INFO_* との互換性と、Bundler とともに配布された古いクライアントのサポートを維持しながら、issue で説明されている名前付きインターフェースを導入します。完了の条件は、対応するパラメーターと、ネストされたハッシュを繰り返し走査する処理が削除されていることです。
索引モデルが issue の本文から書いたものです。
説明
Context
In (ruby/rubygems#9773), there was a suggestion giving some of the hashes and arrays names — i.e. making concrete classes with names.
The branch has a lot of pre exisiting hash and array manipulation: positional rows indexed by magic constants, composite array keys, and parallel nested hashes threaded through long method chains. Two ideas to start:
1. Gem::CompactIndexClient::InfoRow
Compact index info rows are 5-element arrays indexed via INFO_NAME = 0 … INFO_REQS = 4. Wrap them in a Struct with named accessors (#version, #suffix, #ruby_requirement, #platform_requirement, #created_at) and convert at the consumption boundary via InfoRow.wrap, so older Bundler-shipped copies of the client (which return plain arrays behind the load guard) keep working. Parser hot path is unchanged; INFO_* constants stay for compatibility.
2. Gem::QueryUtils::VersionPlatforms
gem list/search/info build two parallel auto-vivifying hashes (platforms and platform_ruby_abis) and pass them together through six methods. Replace both with one presenter exposing #versions, #platforms_for(version), #ruby_abis_for(version, platform), and #ruby_abi_metadata?, dropping the paired parameters and the repeated values.any? { .values.any?(&:any?) } crawls.
There are more candidates (e.g. the throwaway row arrays and composite keys in Gem::Source#decode_content_addressable_tuples, the stub-target: hash in StubSpecification), which can follow the same pattern later.
- 主要言語
- Ruby
- スター
- 4k
- フォーク
- 2k
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 59
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ruby/rubygems のほかの issue
-
Cooldown drops the locked version of a gem named in bundle lock --update or bundle update対応中かも @senid231 が 8 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
Profiling `require "bundler/setup"` in a 450-gem app: 13 findings, a series of small PRs対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
メンテナーはふだん 1 日以内に返信
-
Gem::Package::TarReader silently ignores pax/GNU extension headers対応中かも @akasakariko が 12 日前に担当しました。 オープンRubyGems
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
ruby/rubygems#9988 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`Gem::Version.new`, `#bump`, and `#release` do not work in ractor対応中かも @mmporong が 15 日前に担当しました。 オープンRubyGems
難易度 3/5 半日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
Gem.load_plugins loads same plugin multiple times from different Gem.path entries対応中かも @sourya2704 が 17 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
ruby/rubygems#9945 · コメント 4 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
Websockify heartbeat for vnc_container対応中かも @robinkar が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
needs verification
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 7 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
akitaonrails/ai-book-2026#13 ·
-
Mend: dependency security vulnerability
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信