deivid-rodriguez/pry-byebug

Test failures: NoMethodError: undefined method `binding_stack' for nil:NilClass

Apteryks opened this issue · 2 comments

When attempting to run the test suite, most tests fails with the error NoMethodError: undefined method binding_stack' for nil:NilClass`. Here's the two last test failures:

[...]
 33) Error:
ContinueCommandWithALineArgument#test_advances_until_the_specified_line:
NoMethodError: undefined method `binding_stack' for nil:NilClass
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry.rb:97:in `block in <class:Pry>'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/pry-byebug/control_d_handler.rb:8:in `block in <top (required)>'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:262:in `handle_line'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:243:in `block (2 levels) in eval'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:242:in `catch'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:242:in `block in eval'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:241:in `catch'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:241:in `eval'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:77:in `block in repl'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:67:in `loop'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:67:in `repl'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:38:in `block in start'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/input_lock.rb:61:in `__with_ownership'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/input_lock.rb:79:in `with_ownership'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:38:in `start'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:13:in `start'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_class.rb:192:in `start'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:117:in `block in resume_pry'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:30:in `block (2 levels) in run'
    /gnu/store/90jsxdmvlg6d4s2a1ks6aci1wk7vdrs7-ruby-byebug-9.0.6/lib/ruby/vendor_ruby/gems/byebug-9.0.6/lib/byebug/helpers/eval.rb:92:in `allowing_other_threads'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:30:in `block in run'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:29:in `catch'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:29:in `run'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:113:in `resume_pry'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:65:in `at_line'
    /gnu/store/90jsxdmvlg6d4s2a1ks6aci1wk7vdrs7-ruby-byebug-9.0.6/lib/ruby/vendor_ruby/gems/byebug-9.0.6/lib/byebug/context.rb:96:in `at_line'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/examples/stepping.rb:8:in `<top (required)>'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/commands/stepping_test.rb:156:in `load'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/commands/stepping_test.rb:156:in `block in setup'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/test_helper.rb:21:in `redirect_pry_io'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/commands/stepping_test.rb:156:in `setup'

 34) Error:
Up command#test_0001_shows current line:
NoMethodError: undefined method `binding_stack' for nil:NilClass
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry.rb:97:in `block in <class:Pry>'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/pry-byebug/control_d_handler.rb:8:in `block in <top (required)>'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:262:in `handle_line'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:243:in `block (2 levels) in eval'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:242:in `catch'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:242:in `block in eval'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:241:in `catch'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_instance.rb:241:in `eval'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:77:in `block in repl'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:67:in `loop'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:67:in `repl'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:38:in `block in start'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/input_lock.rb:61:in `__with_ownership'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/input_lock.rb:79:in `with_ownership'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:38:in `start'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/repl.rb:13:in `start'
    /gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby/gems/pry-0.11.3/lib/pry/pry_class.rb:192:in `start'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:117:in `block in resume_pry'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:30:in `block (2 levels) in run'
    /gnu/store/90jsxdmvlg6d4s2a1ks6aci1wk7vdrs7-ruby-byebug-9.0.6/lib/ruby/vendor_ruby/gems/byebug-9.0.6/lib/byebug/helpers/eval.rb:92:in `allowing_other_threads'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:30:in `block in run'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:29:in `catch'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:29:in `run'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:113:in `resume_pry'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/lib/byebug/processors/pry_processor.rb:72:in `at_return'
    /gnu/store/90jsxdmvlg6d4s2a1ks6aci1wk7vdrs7-ruby-byebug-9.0.6/lib/ruby/vendor_ruby/gems/byebug-9.0.6/lib/byebug/context.rb:128:in `at_return'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/examples/frames.rb:13:in `method_b'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/examples/frames.rb:8:in `method_a'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/examples/frames.rb:16:in `<top (required)>'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/commands/frames_test.rb:18:in `load'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/commands/frames_test.rb:18:in `block (3 levels) in <class:FramesTest>'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/test_helper.rb:21:in `redirect_pry_io'
    /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/test/commands/frames_test.rb:18:in `block (2 levels) in <class:FramesTest>'
SimpleCov failed with exit 1
41 runs, 9 assertions, 0 failures, 34 errors, 0 skips
Coverage report generated for Unit Tests to /tmp/guix-build-ruby-pry-byebug-3.9.0.drv-0/source/coverage. 486 / 715 LOC (67.97%) covered.
rake aborted!
Command failed with status (1): [ruby -I"lib:test" -I"/gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib" "/gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/rake_test_loader.rb" "test/base_test.rb" "test/breakpoints_test.rb" "test/commands/breakpoints_test.rb" "test/commands/frames_test.rb" "test/commands/stepping_test.rb" "test/processor_test.rb" "test/pry_ext_test.rb" "test/pry_remote_ext_test.rb" "test/thread_lock_test.rb" ]

Tasks: TOP => test

This is using GNU Guix. The build happens in a container where GEM_PATH is defined as:

environment variable `GEM_PATH' set to `/gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/vendor_ruby:/gnu/store/fdl7grr1fmh3zl7rlp4ws104mwys3i7j-ruby-chandler-0.9.0/lib/ruby/vendor_ruby:/gnu/store/9g7wz8c9c4aq688w42x75rgg1wz68c7k-ruby-rubocop-0.77.0/lib/ruby/vendor_ruby:/gnu/store/g4j6y2yzv1wradw9ba3pmbw7dh503fih-ruby-simplecov-0.17.1/lib/ruby/vendor_ruby:/gnu/store/90jsxdmvlg6d4s2a1ks6aci1wk7vdrs7-ruby-byebug-9.0.6/lib/ruby/vendor_ruby:/gnu/store/k2ni4ym6miilkkyrprgsxf70vwjm9x85-ruby-pry-0.11.3/lib/ruby/vendor_ruby:/gnu/store/6h4a72lal1x8hcg3g1c07kivfvac7zmz-ruby-octokit-4.18.0/lib/ruby/vendor_ruby:/gnu/store/5dpwvsi0v7did5xxbc3zfk6972hf6hdl-ruby-netrc-0.11.0/lib/ruby/vendor_ruby:/gnu/store/z597mhhf03h5j0znqhmc8flv0ym4cmn6-ruby-unicode-display-width-1.6.0/lib/ruby/vendor_ruby:/gnu/store/k6nnd3dcbx8a6z8c808krgnz9xdrlq03-ruby-jaro-winkler-1.5.4/lib/ruby/vendor_ruby:/gnu/store/vqi1x2qi7bpvs5illgkbwzcsiwqyyvih-ruby-parallel-1.13.0/lib/ruby/vendor_ruby:/gnu/store/5pgqgfk5jcbgj1zkdvgy43r00klhj88x-ruby-progressbar-1.10.1/lib/ruby/vendor_ruby:/gnu/store/h327645g4pd1lz1bchxvs3jakync458i-ruby-rainbow-3.0.0/lib/ruby/vendor_ruby:/gnu/store/ki9nz54fn0f71rcbf3aw4v3zabk840vx-ruby-powerpack-0.1.2/lib/ruby/vendor_ruby:/gnu/store/88abgnr2s9d76mfvzayl0q9bc40wk4s8-ruby-parser-2.6.0.0/lib/ruby/vendor_ruby:/gnu/store/pb603qr81qf0372y4y2qyhdr7829mh1p-ruby-simplecov-html-0.10.2/lib/ruby/vendor_ruby:/gnu/store/w5x0wn7lbyvhk829a1i53s76944hgs3f-ruby-docile-1.1.5/lib/ruby/vendor_ruby:/gnu/store/mp0h1q71b6w9h0i23kzrpxw8rd9v88w8-ruby-json-2.1.0/lib/ruby/vendor_ruby:/gnu/store/yhjm6lrj8gyn7s81vxhzy67ly0kix1ar-ruby-method-source-0.9.0/lib/ruby/vendor_ruby:/gnu/store/14c4yw3jz0d4w5jyvx07drlr9xcrjh32-ruby-coderay-1.1.2/lib/ruby/vendor_ruby:/gnu/store/4n9rv78swsccwfw48h9y3pj5dd76dha0-ruby-sawyer-0.8.2/lib/ruby/vendor_ruby:/gnu/store/czjn5gjkar8396p61plk5srfhc3bvhqa-ruby-faraday-0.15.4/lib/ruby/vendor_ruby:/gnu/store/shfii0ncsi0phyi7dd4cw260pb73admv-ruby-ast-2.4.0/lib/ruby/vendor_ruby:/gnu/store/mm48k9gc7fivr5j87h64cnjzsvjylsqw-ruby-addressable-2.7.0/lib/ruby/vendor_ruby:/gnu/store/mik5kslvj8xwrmgs3gy6x2k01f81da8m-ruby-multipart-post-2.0.0/lib/ruby/vendor_ruby:/gnu/store/76k15pcdqwb35wybjkrlwgm51iya06df-ruby-public-suffix-4.0.1/lib/ruby/vendor_ruby'

Byebug 9 is old. I think current pry-byebug needs something newer.

Thanks for the prompt reply. I've updated byebug to 11.1.3 and now the test suite runs fine.