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

Compatibility with the gherkin gem 4 #66

Open
zw963 opened this issue Jun 19, 2016 · 6 comments
Open

Compatibility with the gherkin gem 4 #66

zw963 opened this issue Jun 19, 2016 · 6 comments

Comments

@zw963
Copy link

zw963 commented Jun 19, 2016

https://github.com/michaelklishin/cucumber.el/blob/master/support/find_step.rb

It not worked at all.

thanks

@michaelklishin
Copy link
Owner

@zw963 can you please be more specific than "it doesn't work at all"? "at all" is not a specific problem that can be fixed.

@michaelklishin michaelklishin changed the title cucumber.el not worked with gherkin version 4. Compatibility with the gherkin gem 4 Jun 19, 2016
@zw963
Copy link
Author

zw963 commented Jun 19, 2016

Sorry, I hard to say the difference between 2.x and 4.x

following is 4.0.0 gherkin installed in ruby 2.2.3, it seem like not need native extension anymore.

.
└── gherkin
    ├── ast_builder.rb
    ├── ast_node.rb
    ├── dialect.rb
    ├── errors.rb
    ├── gherkin-languages.json
    ├── gherkin_line.rb
    ├── parser.rb
    ├── pickles
    │   └── compiler.rb
    ├── token_formatter_builder.rb
    ├── token_matcher.rb
    ├── token.rb
    └── token_scanner.rb

Version 2.12.2 is different.

.
├── gherkin
│   ├── c_lexer.rb
│   ├── formatter
│   │   ├── ansi_escapes.rb
│   │   ├── argument.rb
│   │   ├── escaping.rb
│   │   ├── filter_formatter.rb
│   │   ├── hashable.rb
│   │   ├── json_formatter.rb
│   │   ├── line_filter.rb
│   │   ├── model.rb
│   │   ├── pretty_formatter.rb
│   │   ├── regexp_filter.rb
│   │   ├── step_printer.rb
│   │   ├── tag_count_formatter.rb
│   │   └── tag_filter.rb
│   ├── i18n.json
│   ├── i18n.rb
│   ├── json_parser.rb
│   ├── lexer
│   │   ├── ar.rb
│   │   ├── bg.rb
│   │   ├── bm.rb
│   │   ├── ca.rb
│   │   ├── cs.rb
│   │   ├── cy_gb.rb
│   │   ├── da.rb
│   │   ├── de.rb
│   │   ├── el.rb
│   │   ├── en_au.rb
│   │   ├── encoding.rb
│   │   ├── en_lol.rb
│   │   ├── en_old.rb
│   │   ├── en_pirate.rb
│   │   ├── en.rb
│   │   ├── en_scouse.rb
│   │   ├── en_tx.rb
│   │   ├── eo.rb
│   │   ├── es.rb
│   │   ├── et.rb
│   │   ├── fa.rb
│   │   ├── fi.rb
│   │   ├── fr.rb
│   │   ├── gl.rb
│   │   ├── he.rb
│   │   ├── hi.rb
│   │   ├── hr.rb
│   │   ├── hu.rb
│   │   ├── i18n_lexer.rb
│   │   ├── id.rb
│   │   ├── is.rb
│   │   ├── it.rb
│   │   ├── ja.rb
│   │   ├── kn.rb
│   │   ├── ko.rb
│   │   ├── lt.rb
│   │   ├── lu.rb
│   │   ├── lv.rb
│   │   ├── nl.rb
│   │   ├── no.rb
│   │   ├── pa.rb
│   │   ├── pl.rb
│   │   ├── pt.rb
│   │   ├── ro.rb
│   │   ├── ru.rb
│   │   ├── sk.rb
│   │   ├── sr_cyrl.rb
│   │   ├── sr_latn.rb
│   │   ├── sv.rb
│   │   ├── th.rb
│   │   ├── tl.rb
│   │   ├── tr.rb
│   │   ├── tt.rb
│   │   ├── uk.rb
│   │   ├── uz.rb
│   │   ├── vi.rb
│   │   ├── zh_cn.rb
│   │   └── zh_tw.rb
│   ├── listener
│   │   ├── event.rb
│   │   └── formatter_listener.rb
│   ├── native
│   │   ├── java.rb
│   │   ├── null.rb
│   │   └── therubyracer.rb
│   ├── native.rb
│   ├── parser
│   │   ├── meta.txt
│   │   ├── parser.rb
│   │   ├── root.txt
│   │   └── steps.txt
│   ├── platform.rb
│   ├── README.md
│   ├── rubify.rb
│   └── tag_expression.rb
├── gherkin_lexer_ar.so
├── gherkin_lexer_bg.so
├── gherkin_lexer_bm.so
├── gherkin_lexer_ca.so
├── gherkin_lexer_cs.so
├── gherkin_lexer_cy_gb.so
├── gherkin_lexer_da.so
├── gherkin_lexer_de.so
├── gherkin_lexer_el.so
├── gherkin_lexer_en_au.so
├── gherkin_lexer_en_lol.so
├── gherkin_lexer_en_old.so
├── gherkin_lexer_en_pirate.so
├── gherkin_lexer_en_scouse.so
├── gherkin_lexer_en.so
├── gherkin_lexer_en_tx.so
├── gherkin_lexer_eo.so
├── gherkin_lexer_es.so
├── gherkin_lexer_et.so
├── gherkin_lexer_fa.so
├── gherkin_lexer_fi.so
├── gherkin_lexer_fr.so
├── gherkin_lexer_gl.so
├── gherkin_lexer_he.so
├── gherkin_lexer_hi.so
├── gherkin_lexer_hr.so
├── gherkin_lexer_hu.so
├── gherkin_lexer_id.so
├── gherkin_lexer_is.so
├── gherkin_lexer_it.so
├── gherkin_lexer_ja.so
├── gherkin_lexer_kn.so
├── gherkin_lexer_ko.so
├── gherkin_lexer_lt.so
├── gherkin_lexer_lu.so
├── gherkin_lexer_lv.so
├── gherkin_lexer_nl.so
├── gherkin_lexer_no.so
├── gherkin_lexer_pa.so
├── gherkin_lexer_pl.so
├── gherkin_lexer_pt.so
├── gherkin_lexer_ro.so
├── gherkin_lexer_ru.so
├── gherkin_lexer_sk.so
├── gherkin_lexer_sr_cyrl.so
├── gherkin_lexer_sr_latn.so
├── gherkin_lexer_sv.so
├── gherkin_lexer_th.so
├── gherkin_lexer_tl.so
├── gherkin_lexer_tr.so
├── gherkin_lexer_tt.so
├── gherkin_lexer_uk.so
├── gherkin_lexer_uz.so
├── gherkin_lexer_vi.so
├── gherkin_lexer_zh_cn.so
├── gherkin_lexer_zh_tw.so
└── gherkin.rb

Many file is different, and not exist anymore.

So, maybe should update the emacs package to use new 4.x ?

Thanks

@wvxvw
Copy link

wvxvw commented Sep 19, 2017

I can confirm: there is no way this code can work with gherkin 4.1.3 (I didn't try other versions).

@michaelklishin
Copy link
Owner

@wvxvw @zw963 feel free to submit a PR that upgrades to Gherkin 4.x.

@zw963
Copy link
Author

zw963 commented Oct 25, 2018

After two years, find_step.rb still not worked with cucumber 3.x, today, i try to hack it, but no luck.

Dont't know where to found old parser = Gherkin::Parser.Parser.new(extractor, true, 'root', false, iso_code) equivalent in new version cucumber.

@Apteryks
Copy link

Apteryks commented Apr 3, 2020

Sadly, the last 3.x release of Gherkin is 3.2.0, and it doesn't work with a current Ruby (2.5.X):

irb(main):001:0> require 'gherkin'
Traceback (most recent call last):
        4: from /home/maxim/.guix-profile/bin/irb:11:in `<main>'
        3: from (irb):1
        2: from /gnu/store/2m1d7g5nkyg5dy79xgvx7w16ykzl80ss-ruby-2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        1: from /gnu/store/2m1d7g5nkyg5dy79xgvx7w16ykzl80ss-ruby-2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
LoadError (cannot load such file -- gherkin)

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

No branches or pull requests

4 participants