etorreborre / specs2

Software Specifications for Scala
http://specs2.org
Other
734 stars 215 forks source link

Support scalaCheck 1.14.0 #652

Closed ppurang closed 6 years ago

ppurang commented 6 years ago

We use both specs2 and scalacheck and would love to move to scalacheck 1.14.0 especially because of "Issues with test reporting when running sbt in forked mode."

scalacheck 1.14.0 is Binary incompatible with earlier versions.

Using specs2 4.1.0 with scalacheck 1.14.0 results in the following stacktrace.


Exception in thread "specs2-4" java.lang.NoSuchMethodError: org.scalacheck.util.Pretty$.strBreak(Ljava/lang/String;)Ljava/lang/Object;
    at org.specs2.scalacheck.ScalaCheckPropertyCheck.$anonfun$prettyResult$1(ScalaCheckPropertyCheck.scala:102)
    at org.scalacheck.util.Pretty$$anon$1.apply(Pretty.scala:34)
    at org.specs2.scalacheck.ScalaCheckPropertyCheck.check(ScalaCheckPropertyCheck.scala:28)
    at org.specs2.scalacheck.ScalaCheckPropertyCheck.check$(ScalaCheckPropertyCheck.scala:26)
    at com.spotcap.risk.domain.AverageDataSpec.check(AverageDataSpec.scala:9)
    at org.specs2.scalacheck.ScalaCheckPropertyCheck.checkProperties(ScalaCheckPropertyCheck.scala:19)
    at org.specs2.scalacheck.ScalaCheckPropertyCheck.checkProperties$(ScalaCheckPropertyCheck.scala:15)
    at com.spotcap.risk.domain.AverageDataSpec.checkProperties(AverageDataSpec.scala:9)
    at org.specs2.scalacheck.AsResultProp$$anon$2.asResult(AsResultProp.scala:59)
    at org.specs2.execute.AsResult$.apply(AsResult.scala:32)
    at org.specs2.specification.core.AsExecution$$anon$1.$anonfun$execute$1(AsExecution.scala:15)
    at org.specs2.execute.ResultExecution.execute(ResultExecution.scala:23)
    at org.specs2.execute.ResultExecution.execute$(ResultExecution.scala:21)
    at org.specs2.execute.ResultExecution$.execute(ResultExecution.scala:118)
    at org.specs2.execute.Result$$anon$11.asResult(Result.scala:246)
    at org.specs2.execute.AsResult$.apply(AsResult.scala:32)
    at org.specs2.execute.AsResult$.$anonfun$safely$1(AsResult.scala:40)
    at org.specs2.execute.ResultExecution.execute(ResultExecution.scala:23)
    at org.specs2.execute.ResultExecution.execute$(ResultExecution.scala:21)
    at org.specs2.execute.ResultExecution$.execute(ResultExecution.scala:118)
    at org.specs2.execute.AsResult$.safely(AsResult.scala:40)
    at org.specs2.specification.core.Execution$.$anonfun$result$1(Execution.scala:305)
    at org.specs2.specification.core.Execution$.$anonfun$withEnvSync$3(Execution.scala:323)
    at org.specs2.execute.ResultExecution.execute(ResultExecution.scala:23)
    at org.specs2.execute.ResultExecution.execute$(ResultExecution.scala:21)
    at org.specs2.execute.ResultExecution$.execute(ResultExecution.scala:118)
    at org.specs2.execute.Result$$anon$11.asResult(Result.scala:246)
    at org.specs2.execute.AsResult$.apply(AsResult.scala:32)
    at org.specs2.execute.AsResult$.$anonfun$safely$1(AsResult.scala:40)
    at org.specs2.execute.ResultExecution.execute(ResultExecution.scala:23)
    at org.specs2.execute.ResultExecution.execute$(ResultExecution.scala:21)
    at org.specs2.execute.ResultExecution$.execute(ResultExecution.scala:118)
    at org.specs2.execute.AsResult$.safely(AsResult.scala:40)
    at org.specs2.specification.core.Execution$.$anonfun$withEnvSync$2(Execution.scala:323)
    at org.specs2.specification.core.Execution.$anonfun$startExecution$3(Execution.scala:135)
    at scala.util.Success.$anonfun$map$1(Try.scala:251)
    at scala.util.Try$.apply(Try.scala:209)
    at scala.util.Success.map(Try.scala:251)
    at scala.concurrent.Future.$anonfun$map$1(Future.scala:289)
    at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)
    at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
etorreborre commented 6 years ago

We are currently working on that. ScalaCheck 1.14.0 also brings the possibility to set a specific seed to permit to re-run a test which is great. The only issue at the moment is that a few tests involving filtering xxx ==> yyy don't pass anymore and we need to understand why.

ppurang commented 6 years ago

sorry, clicked the wrong button here :)

Thanks, looking forward to the release.

etorreborre commented 6 years ago

Done. Will publish as 4.2.0 ASAP