Cooldown drops the locked version of a gem named in bundle lock --update or bundle update
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
Start with the cooldown handling for locked versions and compare the named-gem path with the full bundle lock --update behavior described in the issue, including the related context in #9619. Reproduce with the Gemfile and commands in the report; done means updating a named gem can keep its locked version when all newer candidates are within the cooldown, while still preventing it from moving to a version inside the window.
索引モデルが issue の本文から書いたものです。
説明
Describe the problem as clearly as you can
When a gem is named on the command line, cooldown removes its locked version from the candidates. If no older version meets the requirements, resolution fails, even though keeping the locked version adopts nothing new.
A full bundle lock --update unlocks the same gem and passes, because #9619 exempts lockfile versions there. #9619 kept named gems under the cooldown on purpose, so a named gem cannot move to a version inside the window. It also stops a named gem from staying where it is.
This breaks tools that name transitive gems to unlock them. Dependabot's Bundler helper builds Bundler::Definition.build(gemfile, lockfile, gems: [dependency, *subdependencies], conservative: true). Every update then fails with this error until the fresh transitive gem leaves the window.
Did you try upgrading rubygems & bundler?
Yes. It fails on Bundler 4.0.15 through 4.0.23 and on 4.1.0.beta3, with Ruby 4.0.7.
Post steps to reproduce the problem
loofah 2.25.3 and rails-html-sanitizer 1.7.2 were published on 2026-11-02, so with cooldown: 30 this reproduces until 2026-12-02.
# Gemfile
source "https://rubygems.org", cooldown: 30
gem "rails-html-sanitizer", "1.7.2" # requires loofah >= 2.25.3
BUNDLE_COOLDOWN=0 bundle lock # locks loofah 2.25.3
bundle lock --update loofah # fails
Which command did you run?
bundle lock --update loofah. bundle update loofah and --conservative fail the same way.
What were you expecting to happen?
Bundler keeps loofah 2.25.3, the locked version, and the lockfile doesn't change. The cooldown should stop a named gem from moving to a version inside the window, not from staying at the version it already has.
What happened instead?
Could not find compatible versions
Because rails-html-sanitizer >= 1.7.2 depends on loofah >= 2.25.3, < 3.A
and loofah >= 2.25.3, < 3.A could not be found in rubygems repository
https://rubygems.org/ or installed locally for any resolution platforms (...)
(1 version excluded by the cooldown setting; pass `--cooldown 0` to bypass),
rails-html-sanitizer >= 1.7.2 cannot be used.
So, because Gemfile depends on rails-html-sanitizer = 1.7.2,
version solving has failed.
Results for the same lockfile:
| Bundler | lock |
--update crass (unnamed) |
--update loofah |
--update loofah --conservative |
--update (all) |
|---|---|---|---|---|---|
| 4.0.13 | ok | ok | ok | ok | fail |
| 4.0.14 | ok | fail | fail | fail | ok |
| 4.0.15 to 4.0.23 | ok | ok | fail | fail | ok |
| 4.1.0.beta3 | ok | ok | fail | fail | ok |
Related: #9613, #9619, #9603.
- 主要言語
- Ruby
- スター
- 4k
- フォーク
- 2k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 48
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ruby/rubygems のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
メンテナーはふだん 1 日以内に返信
-
Gem::Package::TarReader silently ignores pax/GNU extension headers対応中かも @akasakariko が 5 日前に担当しました。 オープンRubyGems
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
ruby/rubygems#9988 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`Gem::Version.new`, `#bump`, and `#release` do not work in ractor対応中かも @mmporong が 9 日前に担当しました。 オープンRubyGems
難易度 3/5 半日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
`bundle install` exits 0 even when a git gem's submodules fail to clone対応中かも @mattyb が 14 日前に担当しました。 オープンBundler
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[Bug] Time search attributes lose sub-second precision, and raise NoMethodError without `require 'time'`対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
temporalio/sdk-ruby#653 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
bridgetownrb/bridgetown#1134 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
swombat/souls-house#795 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100