Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gherkin/parser seems to be missing #160

Closed
majormoses opened this issue Sep 23, 2018 · 9 comments
Closed

gherkin/parser seems to be missing #160

majormoses opened this issue Sep 23, 2018 · 9 comments

Comments

@majormoses
Copy link

Summary

It looks like the gherkin parser was moved from a standalone gem to something in cucumber mono repo but looks like something may not have been updated properly.

/home/travis/.rvm/gems/ruby-2.3.7/gems/cucumber-core-3.2.0/lib/cucumber/core/gherkin/parser.rb:2:in `require': cannot load such file -- gherkin/parser (LoadError)
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/cucumber-core-3.2.0/lib/cucumber/core/gherkin/parser.rb:2:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/cucumber-core-3.2.0/lib/cucumber/core.rb:3:in `require'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/cucumber-core-3.2.0/lib/cucumber/core.rb:3:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/foodcritic-7.1.0/lib/foodcritic.rb:2:in `require'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/foodcritic-7.1.0/lib/foodcritic.rb:2:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/foodcritic-7.1.0/bin/foodcritic:2:in `require_relative'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/foodcritic-7.1.0/bin/foodcritic:2:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.3.7/bin/foodcritic:23:in `load'
	from /home/travis/.rvm/gems/ruby-2.3.7/bin/foodcritic:23:in `<main>'
	from /home/travis/.rvm/gems/ruby-2.3.7/bin/ruby_executable_hooks:24:in `eval'
	from /home/travis/.rvm/gems/ruby-2.3.7/bin/ruby_executable_hooks:24:in `<main>'

Expected Behavior

Run without failure

Current Behavior

/home/travis/.rvm/gems/ruby-2.3.7/gems/cucumber-core-3.2.0/lib/cucumber/core/gherkin/parser.rb:2:in `require': cannot load such file -- gherkin/parser (LoadError)
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/cucumber-core-3.2.0/lib/cucumber/core/gherkin/parser.rb:2:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/cucumber-core-3.2.0/lib/cucumber/core.rb:3:in `require'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/cucumber-core-3.2.0/lib/cucumber/core.rb:3:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/foodcritic-7.1.0/lib/foodcritic.rb:2:in `require'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/foodcritic-7.1.0/lib/foodcritic.rb:2:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/foodcritic-7.1.0/bin/foodcritic:2:in `require_relative'
	from /home/travis/.rvm/gems/ruby-2.3.7/gems/foodcritic-7.1.0/bin/foodcritic:2:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.3.7/bin/foodcritic:23:in `load'
	from /home/travis/.rvm/gems/ruby-2.3.7/bin/foodcritic:23:in `<main>'
	from /home/travis/.rvm/gems/ruby-2.3.7/bin/ruby_executable_hooks:24:in `eval'
	from /home/travis/.rvm/gems/ruby-2.3.7/bin/ruby_executable_hooks:24:in `<main>'

It fails to find the library/file.

Possible Solution

Temp work around add ~> 5.1 to your Gemfile or gemspec while waiting for a fix.

Steps to Reproduce (for bugs)

I experienced this issue with running foodcritic

Your Environment

@aslakhellesoy
Copy link
Contributor

It sounds like you have somehow ended up with gherkin 6.0.10 installed, which is backwards incompatible.

cucumber-ruby does specify ~> 5.1, so I'm not sure why 6.0.10 was pulled in?

@majormoses
Copy link
Author

majormoses commented Sep 23, 2018

This is where foodcritic pulls it in: https://github.com/Foodcritic/foodcritic/blob/v14.1.0/foodcritic.gemspec#L22 which is not safe

@majormoses
Copy link
Author

We can probably trace it, I don't have the time right now but maybe a little later this evening I will: https://rubygems.org/gems/gherkin/reverse_dependencies

@majormoses
Copy link
Author

According to https://rubygems.org/gems/cucumber-core/versions/3.2.0 its pulling in >= 5.0.0 not ~> 5.1.0

@majormoses
Copy link
Author

majormoses commented Sep 23, 2018

So the released gem specifies it as ☝️ https://github.com/cucumber/cucumber-ruby-core/blob/v3.2.0/cucumber-core.gemspec#L17 but the master has it pessemistically pinned. I can put together a PR to pin it, wait to have it released, then we should be able to release a v4 that pulls in the new dependency as ~> 6.0 as that is a breaking change. How does that sound?

@aslakhellesoy
Copy link
Contributor

That sounds great @majormoses! Thanks for digging into this. If you find other dangerously permissive dependencies, feel free to fix those too.

@aslakhellesoy
Copy link
Contributor

Upgrading to v6 is underway btw: cucumber/cucumber-ruby#1313

@xtrasimplicity
Copy link
Member

Given a few people have experienced this today, and there's likely to be more over the coming days, I've released v3.2.1 (with just the pessimistic version change). :)

@lock
Copy link

lock bot commented Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants