-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Build on JRuby again #1383
Build on JRuby again #1383
Conversation
This reverts commit e349710.
(I made edits to the title and description, to account for the J of JRuby.) |
Thanks, I did that PR a bit too quickly :/ |
This PR also lends itself to perhaps (either alongside or simultaneously), removing appveyor and getting circleci to build windows. That's where the failures are most prevalent, JRuby and windows. |
Note: this may definitelly not be the best way to proceed, but the long term idea is to drop the `step` nesting, so spending time fixing this issue would be lost.
Note: I disabled one of the scenario to make this work ( I also had to tweak a bit one test. If seems that Ruby does not set |
Getting the build running on CircleCI/Windows (and removing AppVeyor) is planned yes, but not in this PR. |
It's failing for russian letters being converted somewhere. The good news is all of the main scenarios pass. It's the language specific ones that come up smelly fishy |
Ok, I've spent a fair amount of time on trying to figure out why this fails but don't get anywhere. If anyone has a deeper knowledge of JRuby and/or why this may happen, have fun :) The only way I add to get it working was to replace content of Given('я ввожу число {int}') do |number|
calc.push number
end
Given('затем ввожу число {int}') do |number|
calc.push number
end
When('нажимаю {string}') do |operation|
calc.send operation
end
When('я нажимаю {string}') do |operation|
calc.send operation
end
Then('результатом должно быть число {float}') do |expected|
calc.result.should == expected
end
Given('я сложил {int} и {int}') do |first_number, second_number|
calc.push first_number
calc.push second_number
calc.send '+'
end But that's definitely cheating :/ |
Oh and if someone want to figure that out, bumping to |
Remove useless reference to protobuf gem for JRuby
Ok, this I've disabled a few examples for i18n and JRuby (namely 'ru', 'uk' and 'uz') as we can't define step definitions there (note that Greek or Japanese work). I think it's more an issue with JRuby than with Cucumber. I was thinking about adding a file under 'docs/jruby-limitations.md' (which would be linked from the README) telling that we can not use keywords as step definitions for those languages (in the ruby code, the features files still support those) Would that be enough to merge this PR ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Co-Authored-By: Olle Jonsson <[email protected]>
Co-Authored-By: Olle Jonsson <[email protected]>
Thanks for the corrections :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we document 9.2 but run CI against 9.1?? I don't use JRuby so there may be an obvious reason
end | ||
|
||
def jruby_disabled_examples?(lang) | ||
return unless RUBY_PLATFORM == 'java' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rubocop will flag this. Linespace after guard clause.
README.md
Outdated
@@ -28,7 +28,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for info on contributing to Cucumber. | |||
* Ruby 2.5 | |||
* Ruby 2.4 | |||
* Ruby 2.3 | |||
* JRuby 9.1 | |||
* JRuby 9.1 (with [some limitations](https://github.com/cucumber/cucumber-ruby/blob/master/docs/jruby-limitations.md)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps "JRuby 9.1, 9.2"?
* JRuby 9.1 (with [some limitations](https://github.com/cucumber/cucumber-ruby/blob/master/docs/jruby-limitations.md)) | |
* JRuby 9.1, JRuby 9.2 (with [some limitations](https://github.com/cucumber/cucumber-ruby/blob/master/docs/jruby-limitations.md)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be worth checking it still build with JRuby 9.1, but that's just a task to add to CircleCI, should not be much of a trouble.
I'll add that :)
docs/jruby-limitations.md
Outdated
@@ -1,6 +1,6 @@ | |||
# Cucumber and JRuby limitations | |||
|
|||
`cucumber` can be executed on `JRuby` (tested with `9.2.8.0`), although some of the features | |||
`cucumber` can be executed on `JRuby` (tested with `9.1`and `9.2`), although some of the features |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`cucumber` can be executed on `JRuby` (tested with `9.1`and `9.2`), although some of the features | |
`cucumber` can be executed on `JRuby` (tested with `9.1` and `9.2`), although some of the features |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, it seems we have even more problems with JRuby 9.1 (apparently it's failing with language he
).
I guess it's safer to just indicate 9.2
I bumped to 9.2 but forgot to update the documentation (which is done now). |
Summary
Thanks to the generation of Protobuffers in pure Ruby, we should be able to build cucumber on JRuby again.
Details
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: