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

Scala 2.12 compatibility #1091

Closed

Conversation

paoloambrosio
Copy link
Member

@paoloambrosio paoloambrosio commented Jan 15, 2017

Summary

Fix cucumber-scala compatibility with Scala 2.12.

Details

  • cucumber-scala_2.12 is compiled as Java 8 bytecode, along with scala-calculator (and cucumber-java8)
  • Scala version has been upgraded to the latest 2.12.1, using Manifest instead of Java reflection
  • @aslakhellesoy should probably verify the code, given that it's a variation on something that previously was found not to work (see his comment removed on ScalaDsl)

Motivation and Context

Issue #1087.

How Has This Been Tested?

Existing tests and Scala example passing.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Using latest working Scala version: 2.12.0-M1
Normalised some imports
Kept compatibility with 2.10
No other refactoring to limit changes
Downgraded Scala version in scala-calculator example
Include cucumber-scala_2.12 only on Java 8
@zarthross
Copy link

zarthross commented Jan 18, 2017

It would appear as though functions of arity0 do not work if you add an empty argument. These worked before this PR.

When("""^I multiply x \* y$""") { () =>  // <-- if you take out the '() =>' it works fine.
    z = x * y
}

in https://github.com/lewismj/cucumber/blob/master/cucumber-plugin-example/src/test/scala/com/waioeka/sbt/MultiplicationSteps.scala

The surprising behavior is that the step 'runs' according to the runner output, but the function isn't actually executed.

@darthvadrismydad
Copy link

Any chance this could be resolved/merged soon?

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Jul 7, 2017

This PR has become a bit messy. I'm going to clean this up from scratch in #1171.

@mpkorstanje mpkorstanje closed this Jul 7, 2017
mpkorstanje added a commit that referenced this pull request Jul 8, 2017
 - cucumber-scala_2.12 and scala-calculator are compiled to java8 byte code
 - Scala versions have been updated
   - 2.12.0-M1 to 2.12.2
   - 2.11.8    to 2.11.11
 - Manifest is used instead of Java reflection to provide type information

Related issues:
 - #1087
 - #1091

Fixes #1087
mpkorstanje added a commit that referenced this pull request Jul 8, 2017
 - cucumber-scala_2.12 and scala-calculator are compiled to java8 byte code
 - Scala versions have been updated
   - 2.12.0-M1 to 2.12.2
   - 2.11.8    to 2.11.11
 - Manifest is used instead of Java reflection to provide type information

Related issues:
 - #1087
 - #1091

Fixes #1087
@lock
Copy link

lock bot commented Oct 25, 2018

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 Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants