jonatas / fast

Find in AST - Search and refactor code directly in Abstract Syntax Tree as you do with grep for strings

Home Page:https://jonatas.github.io/fast/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`parser` as a runtime dependency?

zverok opened this issue · comments

Just trying gem install ffast; fast '(something)' something.rb gives 'require': cannot load such file -- parser (LoadError). Which probably should not be this way ;)

Another one, related to the parser:

$ fast '(something)' something.rb
warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.5-compliant syntax, but you are running 2.3.3.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.

Probably should be tuned up/suppressed somehow (I mean, when using fast executable, which I am currently playing with, you totally can grep through Ruby 2.5 files from Ruby 2.1 executable, probably, and vice versa).

I am getting a similar issue, but with coderay:

$ gem install ffast
Fetching: ffast-0.0.1.gem (100%)
Successfully installed ffast-0.0.1
1 gem installed
$ fast '(something)' some_file.rb
warning: parser/current is loading parser/ruby21, which recognizes
warning: 2.1.10-compliant syntax, but you are running 2.1.6.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
$HOME/.rvm/gems/ruby-2.1.6/gems/ffast-0.0.1/bin/fast:6:in `require': cannot load such file -- coderay (LoadError)
	from $HOME/.rvm/gems/ruby-2.1.6/gems/ffast-0.0.1/bin/fast:6:in `<top (required)>'
	from $HOME/.rvm/gems/ruby-2.1.6/bin/fast:23:in `load'
	from $HOME/.rvm/gems/ruby-2.1.6/bin/fast:23:in `<main>'
	from $HOME/.rvm/gems/ruby-2.1.6/bin/ruby_executable_hooks:15:in `eval'
	from $HOME/.rvm/gems/ruby-2.1.6/bin/ruby_executable_hooks:15:in `<main>'

Sorry for the delay. For some reason, I was not watching my own project.

It's a recurrent issue also with rubocop and I'll try to figure out. I don't want to force any specific Ruby version. Let me try to at least suppress the warning.

Fixed @zverok. Thanks for reporting.