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

Plugin does not work with Cucumber 2.0 #60

Closed
jhansche opened this issue Jun 22, 2015 · 7 comments · Fixed by #61
Closed

Plugin does not work with Cucumber 2.0 #60

jhansche opened this issue Jun 22, 2015 · 7 comments · Fixed by #61

Comments

@jhansche
Copy link

$ bundle exec yardoc
[warn]: Error loading plugin 'yard-cucumber'
[warn]: Error loading plugin 'yard-cucumber'

The plugin can't work with a Cucumber 2.0 dependency. There are some bugs in Cucumber 1.3 that have only been fixed in 2.0 and later.

@mattwynne
Copy link

Can someone be specific about the issues? A backtrace would give us a place to start, but a failing automated test would be ideal. We can either make changes to Cucumber's API or help fix this plugin or both. But we need more information! 😄

@jhansche
Copy link
Author

jhansche commented Jul 2, 2015

That's all the information that I can see... I don't know how to make yardoc print a backtrace for why there was an error loading the plugin. Once I find out how to get more information, I'll try to report that here

@akostadinov
Copy link

Let me paste that here as well. Unfortunately yard does not print backtrace of plugins that failed to load (too bad IMO). By modifying the gem I managed to get to the issue (by modifying gem to stop requiring version 1.3):

[2] pry(main)> require 'yard-cucumber'
LoadError: cannot load such file -- cucumber/parser/gherkin_builder
from /home/avalon/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'

That's from lib/yard-cucumber.rb. @mattwynne, is that helpful?

And here's reply from @mattwynne from the other issue:

That file is gone, and has been replaced by https://github.com/cucumber/cucumber-ruby-core/blob/master/lib/cucumber/core/gherkin/ast_builder.rb

I think if yard-cucumber is going that deep, it's going to need some fundamental changes in order to work with 2.0.

I'm happy to support that effort, but it will need to be done in the yard-cucumber repo.

@pghalliday
Copy link
Contributor

Hmm, I don't know how this is usually tested (there are no tests). However, I just commented out the offending require, updated the cucumber dependency to ~>2.0 and ran the rake task to build and serve the examples directory

bundle exec rake server

Everything seemed to run just fine without the require :s

I then rolled the dependency back to ~>1.3 and it still works fine! Does anyone know what this require 'cucumber/parser/gherkin_builder' is for?

There don't seem to be any references to GherkinBuilder in the source

@azohra
Copy link

azohra commented Nov 26, 2015

@pghalliday , I pushed your changes to ruby-gems as a band-aid solution for folks who want to use yard in their projects still, without building from github.

https://rubygems.org/gems/yard-cucumber2

@pghalliday
Copy link
Contributor

@tk8817 cool, thanks

@nadimdiazramzi
Copy link

Maybe this could help someone... https://cookingcode.wordpress.com/2016/10/09/how-to-install-yard-cucumber-windows/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants