FlexTradeUKLtd / jfixture-scala

Customisations for JFixture to make it more useful when writing Scala
3 stars 4 forks source link

JFixture-Scala cannot be used with Scala 2.12 #14

Closed Rocketeer007 closed 5 years ago

Rocketeer007 commented 5 years ago

Currently, this project only builds for Scala 2.11. It also has a dependency on ScalaTest which specifies exactly that it's the Scala 2.11 version.

This means that if you try and include this in a Scala 2.12 project, you have the following possibilities: "com.flextrade.jfixture" %% "jfixture-scala" % "1.0.0" % "test" => unresolved dependency: com.flextrade.jfixture#jfixture-scala_2.12;1.0.0: not found "com.flextrade.jfixture" % "jfixture-scala" % "1.0.0" % "test" => Conflicting cross-version suffixes in: org.scalatest:scalatest, org.scala-lang.modules:scala-xml

Ideally, we'd cross-compile this project for multiple versions of Scala - there are some notes about how to do this here: https://github.com/davidB/scala-maven-plugin/issues/177

Alternatively, a simple fix appears to be correcting the ScalaTest dependency to be "test" scope

Rocketeer007 commented 5 years ago

Obvious workaround... however, this only seems to work for compile time; when running the code that uses JFixture-Scala, I get runtime errors. Probably does need to be properly compiled against Scala 2.12 to be used in a Scala 2.12 project.

"com.flextrade.jfixture" % "jfixture-scala" % "1.0.0" % "test" exclude("org.scalatest", "scalatest_2.11")
Rocketeer007 commented 5 years ago

Fixed in release v1.1.0