debug: 1.6.3 fails to install deps with ruby 3.1.3
Your environment
ruby -v:ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-darwin22]andruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]rdbg -v:rdbg 1.6.3andrdbg 1.6.2bundler --version:Bundler version 2.3.21
Describe the bug when debug-1.6.3 is installed with ruby-3.1.3 it leaves out all of its deps
To Reproduce given this:
Gemfile:
source 'https://rubygems.org'
gem 'debug'
.ruby-version
3.1.2
Gemfile.lock:
GEM
remote: https://rubygems.org/
specs:
debug (1.6.3)
irb (>= 1.3.6)
reline (>= 0.3.1)
io-console (0.5.11)
irb (1.5.1)
reline (>= 0.3.0)
reline (0.3.1)
io-console (~> 0.5)
PLATFORMS
x86_64-darwin-21
x86_64-darwin-22
DEPENDENCIES
debug
BUNDLED WITH
2.3.21
when i change .ruby-version to 3.1.3 and run bundle update all of the debug deps are removed:
diff --git a/Gemfile.lock b/Gemfile.lock
index 856ddda..01c43e4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -2,13 +2,6 @@ GEM
remote: https://rubygems.org/
specs:
debug (1.6.3)
- irb (>= 1.3.6)
- reline (>= 0.3.1)
- io-console (0.5.11)
- irb (1.5.1)
- reline (>= 0.3.0)
- reline (0.3.1)
- io-console (~> 0.5)
this then causes issues:
Downloading debug-1.6.3 revealed dependencies not in the API or the lockfile
(irb (>= 1.3.6), reline (>= 0.3.1)).
Either installing with `--full-index` or running `bundle update debug` should
fix the problem.
and neither of the solutions mentioned solved the problem.
Expected behavior
this shouldn’t happen
Additional context verified on macos and linux
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 8
- Comments: 19 (2 by maintainers)
Commits related to this issue
- Bundle install debug should fix build Re: https://github.com/ruby/debug/issues/852 — committed to openjournals/reviewers by xuanxu a year ago
- debug gemの依存関係を修正 参考: https://github.com/ruby/debug/issues/852 — committed to ha4gu/tempra by ha4gu a year ago
- Correctly bundle debug https://github.com/ruby/debug/issues/852#issuecomment-1431872261 — committed to jaynetics/gouteur by jaynetics a year ago
- Fix missing debug dependencies Bug w/ bundled debug gem on Ruby 3.1 & 3.2 Workaround from https://github.com/ruby/debug/issues/852#issuecomment-1431872261 — committed to maxfierke/resumis by maxfierke a year ago
For anyone encountering this issue again on 3.2.1 and Bundler 2.4.7, I’m also experiencing it in GitHub actions:
When I look on disk, the built-in debug-1.7.1.gemspec indeed declares no runtime dependencies and as a result my Gemfile.lock also resolved no transitive dependencies on
irborreline:@deivid-rodriguez’s workaround from https://github.com/rubygems/rubygems/issues/6082 still works, though:
gem install debugto fix the incorrect gemspec on diskgem "debug"in the Gemfilebundle installwill remove it from the lockfilegem "debug"bundle installwill add the transitive deps to the lockfileThis was the fewest steps I could figure out to get things working again.
I’m currently seeing this on 1.7.1 with Ruby 3.2.0 and Bundler 2.3.5
https://github.com/sudara/alonetone/actions/runs/3839336156/jobs/6536959125
Same happening to me on 3.2.1. I thought it was fixed with https://github.com/rubygems/rubygems/issues/6082 but it came back.
The way I fixed it was to comment out
gem "debug"from Gemfile, thenbundle, thengem install debug, then uncommenting and one lastbundle.For me, 1.7.1 fails (same way, inside CI pipeline, release version of ruby 3.2.0) even if I mention missing gems in Gemfile. 1.7.0 seems to work.
I am running into this same problem. Interestingly, everything works fine locally. However, when I try to
bundleinside of a github action, I get the problem.Seems like version 1.7.0 of debug works fine so I have had to pin it to that version to work
see https://github.com/ruby/debug/issues/898#issuecomment-1432741515
I had the same issue. I do not think it is related to the version itself but more of an issue on resolving between how
irbandrelineare installed (native gem VS gem handled by Gemfile).Clean mentions of “irb” and “reline” in Gemfile.lock. You should have only “debug (1.7.1)” line.
Check
Gemfile.lock. You should see a proper output: