pronto
pronto copied to clipboard
ArgumentError while running pronto run in Ruby 2.5.0
Hi,
My environment:
$ ruby -v
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17]
$ bundle | grep 'pronto'
Using pronto 0.9.5
Using pronto-rubocop 0.9.0
$ bundle | grep 'rubocop'
Using rubocop 0.52.1
Using guard-rubocop 1.3.0
Using pronto-rubocop 0.9.0
I am in my local branch, all changes has been committed and pushed to remote branch. When I try to run pronto, it gives me:
$ pronto run
Traceback (most recent call last):
27: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:15:in `<main>'
26: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:15:in `eval'
25: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/bin/pronto:23:in `<main>'
24: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/bin/pronto:23:in `load'
23: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-0.9.5/bin/pronto:6:in `<top (required)>'
22: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
21: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
20: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
19: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
18: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-0.9.5/lib/pronto/cli.rb:60:in `run'
17: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-0.9.5/lib/pronto/cli.rb:60:in `chdir'
16: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-0.9.5/lib/pronto/cli.rb:61:in `block in run'
15: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-0.9.5/lib/pronto.rb:64:in `run'
14: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-0.9.5/lib/pronto/runners.rb:13:in `run'
13: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-0.9.5/lib/pronto/runners.rb:13:in `each'
12: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-0.9.5/lib/pronto/runners.rb:20:in `block in run'
11: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `run'
10: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `map'
9: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `block in run'
8: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:38:in `inspect'
7: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:38:in `map'
6: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:40:in `block in inspect'
5: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-0.9.5/lib/pronto/git/patch.rb:29:in `added_lines'
4: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/pronto-0.9.5/lib/pronto/git/patch.rb:22:in `lines'
3: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/rugged-0.26.0/lib/rugged/patch.rb:38:in `hunks'
2: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/rugged-0.26.0/lib/rugged/patch.rb:38:in `to_a'
1: from /Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/rugged-0.26.0/lib/rugged/patch.rb:38:in `each'
/Users/giedriusr/.rvm/gems/ruby-2.5.0/gems/rugged-0.26.0/lib/rugged/patch.rb:38:in `each_hunk': wrong number of arguments (given 6, expected 0) (ArgumentError)
With ruby 2.4.1 it works.
$ rvm use ruby-2.4.1
$ pronto run
Unknown file type: rake, defaulting to ruby
app/models/model.rb:48 W: Similar code found in attribute.rb:48, product.rb:74 (mass = 60)
Not sure if it is only ruby related or is there anything else. Anyone else is having similar thing?
Update: in TravisCI I see that there is no Ruby 2.5 support. Any plans to support it?
I ran up against the same issue when I tried upgrading to Ruby 2.5 while using Pronto. It's fixed upstream here, but they haven't rolled a new release yet: https://github.com/libgit2/rugged/pull/730