java.lang.IncompatibleClassChangeError: Implementing class with ScalaCheck and ScalaTest

前端 未结 1 649
青春惊慌失措
青春惊慌失措 2021-01-07 18:03

I\'m facing a nasty exception when trying to write a test using ScalaCheck and ScalaTest. Here\'s my dependencies:

libraryDependencies ++= Seq(
  \"org.scala         


        
1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-07 18:26

    ScalaTest 2.2.6 is incompatible with ScalaCheck 1.13.0. Downgrading to "scalacheck" % "1.12.5" helps.

    This was reported as https://github.com/rickynils/scalacheck/issues/217. The issue is closed with following resolution:

    All current releases of ScalaTest (2.2.6, 3.0.0 etc) are built against ScalaCheck 1.12.1 (see https://github.com/scalatest/scalatest/blob/master/project/scalatest.scala#L134). Therefore, there are no guarantees that you can simply swap out ScalaCheck 1.12.x for 1.13.y. ScalaCheck only maintains binary compatibility within the same minor version series (1.12.1, 1.12.2, 1.12.3 etc).

    0 讨论(0)
提交回复
热议问题