-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Consider cucumber-java8 for deprecation #2174
Comments
@mpkorstanje what should be used as an alternative to cucumber-java8 to run on later versions of the JDK? |
You can still use |
@mpkorstanje I'm a bit thick today. That means that going forward we won't be able to use cucumber-java-8 for any java version (12+ and less than 12)? |
Currently v6 of Unless something changes the following will be true at some point in the future:
So if you wish to upgrade to Java 12 (presently) or Cucumber v8 (at some point in the future) you can not use |
With jhalterman/typetools#66 released we can hold off on deprecation until #2279 is resolved. Deprecation is still considered to ensure all step definition are static. |
One positive aspect of lambda step definitions is that you can bundle them in several methods and that it's a loss less verbose. You need half as much space for them and if you have a couple of them that group together but not enough to put them into their own classes just put them into a method that's called from the constructor. |
Hello typetool 0.6.3 contains the fix for java12+. Is this bug still relevant ? |
|
Ok I kind of understand the motivation for removal. That's unfortunate because I prefer that DSL.
|
Once cucumber-java8 is deprecated, users will have to migrate to (most likely) cucumber-java. Perhaps a tool like OpenRewrite & rewrite-testing-frameworks can be used to convert users automatically. I have some experience with the tool, but can't commit much time to it yet due to travel plans. Thought to mention it here in case anyone wants to make a head start. |
I wrote a (kinda hacky) IntelliJ plugin to convert a couple of thousand step definitions from lambda to methods. I might be able to provide the code although it's mostly IntelliJ specific. |
Implemented a migration recipe through OpenRewrite here: https://github.com/openrewrite/rewrite-testing-frameworks/tree/main/src/main/java/org/openrewrite/java/testing/cucumber It has some limitations currently around method references and data tables that I didn't include yet, but should be possible to add those still. Anyone welcome to join the effort, as I don't have an immediate need for those migrations. Applied successfully to migrate 20 work projects, and think this approach will scale to accommodate users when cucumber-java8 is indeed deprecated. I intend to write this up into a company blogpost, but imagine it would fit in well with the release notes and migration guide here as well. Let me know if any help in that area is required. |
Quick update here: the migration recipes will move to cucumber/cucumber-jvm-migration#1 |
Update: With jhalterman/typetools#66 released we can hold off on deprecation until #2279 is resolved. Deprecation is still considered to ensure all step definition are static.
Original:
cucumber-java8
does not work on OpenJDK 12+. The Cucumber team does not have the time and people available to makecucumber-java8
work on OpenJDK 12+ so we are deprecating the module for removal.This will also result in the removal of
ScenarioScoped
glue which will allow us to improve the caching mechanism used to match steps to regular expressions (#2035).The text was updated successfully, but these errors were encountered: