gpt4 book ai didi

scala - Sbt 测试在使用 Scalaz 时抛出 IncompatibleClassChangeError

转载 作者:行者123 更新时间:2023-12-01 12:32:45 26 4
gpt4 key购买 nike

Sbt 测试抛出

java.lang.IncompatibleClassChangeError: 找到类 scalaz.Memo,但需要接口(interface)

当 scalaz 是依赖项时。

sbt 依赖图:

[info] Loading global plugins from /Users/ixaxaar/.sbt/0.13/plugins
[info] Loading project definition from /Users/ixaxaar/src/cerebro/project
[info] Set current project to cerebro (in build file:/Users/ixaxaar/src/cerebro/)
[info] Updating {file:/Users/ixaxaar/src/cerebro/}cerebro...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] default:cerebro_2.10:1.0 [S]
[info] +-ch.qos.logback:logback-classic:1.1.3
[info] | +-ch.qos.logback:logback-core:1.1.3
[info] | +-org.slf4j:slf4j-api:1.7.12
[info] | +-org.slf4j:slf4j-api:1.7.7 (evicted by: 1.7.12)
[info] |
[info] +-com.github.tototoshi:scala-csv_2.10:1.2.1 [S]
[info] +-com.h2database:h2:1.4.187
[info] +-com.typesafe.akka:akka-actor_2.10:2.3.6 [S]
[info] | +-com.typesafe:config:1.2.1 (evicted by: 1.3.0)
[info] | +-com.typesafe:config:1.3.0
[info] |
[info] +-com.typesafe:config:1.3.0
[info] +-com.typesafe:scalalogging-slf4j_2.10:1.1.0
[info] | +-org.scala-lang:scala-reflect:2.10.3 (evicted by: 2.10.5)
[info] | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] | +-org.slf4j:slf4j-api:1.7.12
[info] | +-org.slf4j:slf4j-api:1.7.5 (evicted by: 1.7.12)
[info] |
[info] +-edu.stanford.nlp:stanford-corenlp:3.5.2
[info] | +-com.googlecode.efficient-java-matrix-library:ejml:0.23
[info] | +-com.io7m.xom:xom:1.2.10
[info] | | +-xalan:xalan:2.7.0
[info] | | | +-xml-apis:xml-apis:1.3.03
[info] | | | +-xml-apis:xml-apis:2.0.2 (evicted by: 1.3.03)
[info] | | |
[info] | | +-xerces:xercesImpl:2.8.0
[info] | | | +-xml-apis:xml-apis:1.3.03
[info] | | |
[info] | | +-xml-apis:xml-apis:1.3.03
[info] | |
[info] | +-de.jollyday:jollyday:0.4.7
[info] | | +-javax.xml.bind:jaxb-api:2.2.7
[info] | | +-joda-time:joda-time:2.1 (evicted by: 2.8)
[info] | | +-joda-time:joda-time:2.8
[info] | |
[info] | +-javax.json:javax.json-api:1.0
[info] | +-joda-time:joda-time:2.1 (evicted by: 2.8)
[info] | +-joda-time:joda-time:2.8
[info] |
[info] +-edu.stanford.nlp:stanford-parser:3.5.2
[info] | +-com.googlecode.efficient-java-matrix-library:ejml:0.23
[info] |
[info] +-io.spray:spray-can_2.10:1.3.2 [S]
[info] | +-io.spray:spray-http_2.10:1.3.2 [S]
[info] | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | | +-org.parboiled:parboiled-scala_2.10:1.1.6 [S]
[info] | | +-org.parboiled:parboiled-core:1.1.6
[info] | |
[info] | +-io.spray:spray-io_2.10:1.3.2 [S]
[info] | | +-io.spray:spray-http_2.10:1.3.2 [S]
[info] | | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | | | +-org.parboiled:parboiled-scala_2.10:1.1.6 [S]
[info] | | | +-org.parboiled:parboiled-core:1.1.6
[info] | | |
[info] | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | |
[info] | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] |
[info] +-io.spray:spray-routing_2.10:1.3.2 [S]
[info] | +-com.chuusai:shapeless_2.10:1.2.4 [S]
[info] | +-io.spray:spray-http_2.10:1.3.2 [S]
[info] | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | | +-org.parboiled:parboiled-scala_2.10:1.1.6 [S]
[info] | | +-org.parboiled:parboiled-core:1.1.6
[info] | |
[info] | +-io.spray:spray-httpx_2.10:1.3.2 [S]
[info] | | +-io.spray:spray-http_2.10:1.3.2 [S]
[info] | | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | | | +-org.parboiled:parboiled-scala_2.10:1.1.6 [S]
[info] | | | +-org.parboiled:parboiled-core:1.1.6
[info] | | |
[info] | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | | +-org.jvnet.mimepull:mimepull:1.9.4
[info] | |
[info] | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] |
[info] +-mysql:mysql-connector-java:5.1.36
[info] +-org.apache.lucene:lucene-analyzers-common:5.2.1
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] |
[info] +-org.apache.lucene:lucene-backward-codecs:5.2.1
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] |
[info] +-org.apache.lucene:lucene-codecs:5.2.1
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] |
[info] +-org.apache.lucene:lucene-core:5.2.1
[info] +-org.apache.lucene:lucene-facet:5.2.1
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] | +-org.apache.lucene:lucene-queries:5.2.1
[info] |
[info] +-org.apache.lucene:lucene-queryparser:5.2.1
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] | +-org.apache.lucene:lucene-queries:5.2.1
[info] | +-org.apache.lucene:lucene-sandbox:5.2.1
[info] |
[info] +-org.apache.lucene:lucene-suggest:5.2.1
[info] | +-org.apache.lucene:lucene-analyzers-common:5.2.1
[info] | | +-org.apache.lucene:lucene-core:5.2.1
[info] | |
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] | +-org.apache.lucene:lucene-misc:5.2.1
[info] | +-org.apache.lucene:lucene-queries:5.2.1
[info] |
[info] +-org.hsqldb:hsqldb:2.3.2
[info] +-org.json4s:json4s-native_2.10:3.2.4 [S]
[info] | +-org.json4s:json4s-core_2.10:3.2.4 [S]
[info] | +-com.thoughtworks.paranamer:paranamer:2.5.2
[info] | +-org.json4s:json4s-ast_2.10:3.2.4 [S]
[info] | +-org.scala-lang:scalap:2.10.0
[info] | +-org.scala-lang:scala-compiler:2.10.0 [S]
[info] | +-org.scala-lang:scala-reflect:2.10.0 [S] (evicted by: 2.10.5)
[info] | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] |
[info] +-org.scalaz:scalaz-core_2.10:7.2.0-M2 [S]
[info] +-org.scalikejdbc:scalikejdbc-config_2.10:2.2.7 [S]
[info] | +-com.typesafe:config:1.2.1 (evicted by: 1.3.0)
[info] | +-com.typesafe:config:1.3.0
[info] | +-org.scalikejdbc:scalikejdbc-core_2.10:2.2.7 [S]
[info] | | +-commons-dbcp:commons-dbcp:1.4
[info] | | | +-commons-pool:commons-pool:1.5.4
[info] | | |
[info] | | +-joda-time:joda-time:2.8
[info] | | +-org.joda:joda-convert:1.7
[info] | | +-org.slf4j:slf4j-api:1.7.12
[info] | | +-org.slf4j:slf4j-api:1.7.7 (evicted by: 1.7.12)
[info] | |
[info] | +-org.slf4j:slf4j-api:1.7.12
[info] |
[info] +-org.scalikejdbc:scalikejdbc_2.10:2.2.7 [S]
[info] | +-org.scalikejdbc:scalikejdbc-core_2.10:2.2.7 [S]
[info] | | +-commons-dbcp:commons-dbcp:1.4
[info] | | | +-commons-pool:commons-pool:1.5.4
[info] | | |
[info] | | +-joda-time:joda-time:2.8
[info] | | +-org.joda:joda-convert:1.7
[info] | | +-org.slf4j:slf4j-api:1.7.12
[info] | | +-org.slf4j:slf4j-api:1.7.7 (evicted by: 1.7.12)
[info] | |
[info] | +-org.scalikejdbc:scalikejdbc-interpolation_2.10:2.2.7 [S]
[info] | +-org.scalikejdbc:scalikejdbc-core_2.10:2.2.7 [S]
[info] | | +-commons-dbcp:commons-dbcp:1.4
[info] | | | +-commons-pool:commons-pool:1.5.4
[info] | | |
[info] | | +-joda-time:joda-time:2.8
[info] | | +-org.joda:joda-convert:1.7
[info] | | +-org.slf4j:slf4j-api:1.7.12
[info] | | +-org.slf4j:slf4j-api:1.7.7 (evicted by: 1.7.12)
[info] | |
[info] | +-org.scalikejdbc:scalikejdbc-interpolation-macro_2.10:2.2.7 [S]
[info] | | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] | | +-org.scalikejdbc:scalikejdbc-core_2.10:2.2.7 [S]
[info] | | +-commons-dbcp:commons-dbcp:1.4
[info] | | | +-commons-pool:commons-pool:1.5.4
[info] | | |
[info] | | +-joda-time:joda-time:2.8
[info] | | +-org.joda:joda-convert:1.7
[info] | | +-org.slf4j:slf4j-api:1.7.12
[info] | | +-org.slf4j:slf4j-api:1.7.7 (evicted by: 1.7.12)
[info] | |
[info] | +-org.slf4j:slf4j-api:1.7.12
[info] | +-org.slf4j:slf4j-api:1.7.7 (evicted by: 1.7.12)
[info] |
[info] +-org.slf4j:slf4j-simple:1.7.12
[info] +-org.slf4j:slf4j-api:1.7.12
[info]

sbt 关于:

[info] Loading global plugins from /Users/ixaxaar/.sbt/0.13/plugins
[info] Loading project definition from /Users/ixaxaar/src/cerebro/project
[info] Set current project to cerebro (in build file:/Users/ixaxaar/src/cerebro/)
[info] Updating {file:/Users/ixaxaar/src/cerebro/}cerebro...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] This is sbt 0.13.0
[info] The current project is {file:/Users/ixaxaar/src/cerebro/}cerebro 1.0
[info] The current project is built against Scala 2.10.4
[info] Available Plugins: net.virtualvoid.sbt.graph.Plugin, sbtassembly.Plugin, com.github.retronym.SbtOneJar
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.2

sbt 测试:

[info] Loading global plugins from /Users/ixaxaar/.sbt/0.13/plugins
[info] Loading project definition from /Users/ixaxaar/src/cerebro/project
[info] Set current project to cerebro (in build file:/Users/ixaxaar/src/cerebro/)
java.lang.IncompatibleClassChangeError: Found class scalaz.Memo, but interface was expected
at org.specs2.main.Extract$class.$init$(Arguments.scala:460)
at org.specs2.main.Arguments$.<init>(Arguments.scala:112)
at org.specs2.main.Arguments$.<clinit>(Arguments.scala)
at org.specs2.runner.SbtRunner.<init>(SbtRunner.scala:49)
at org.specs2.runner.Specs2Framework.runner(SbtRunner.scala:25)
at org.specs2.runner.Specs2Framework.runner(SbtRunner.scala:21)
at sbt.Defaults$$anonfun$createTestRunners$1.apply(Defaults.scala:478)
at sbt.Defaults$$anonfun$createTestRunners$1.apply(Defaults.scala:473)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.immutable.Map$Map3.foreach(Map.scala:154)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at sbt.Defaults$.createTestRunners(Defaults.scala:473)
at sbt.Defaults$.allTestGroupsTask(Defaults.scala:484)
at sbt.Defaults$$anonfun$testTasks$4.apply(Defaults.scala:361)
at sbt.Defaults$$anonfun$testTasks$4.apply(Defaults.scala:361)
at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:35)
at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
at sbt.std.Transform$$anon$4.work(System.scala:64)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (test:executeTests) java.lang.IncompatibleClassChangeError: Found class scalaz.Memo, but interface was expected
[error] Total time: 2 s, completed 18 Aug, 2015 4:25:37 PM

编辑:sbt test:dependencyGraph:

[info]   +-ch.qos.logback:logback-classic:1.1.3
[info] | +-ch.qos.logback:logback-core:1.1.3
[info] | +-org.slf4j:slf4j-api:1.7.12
[info] | +-org.slf4j:slf4j-api:1.7.7 (evicted by: 1.7.12)
[info] |
[info] +-com.github.tototoshi:scala-csv_2.10:1.2.1 [S]
[info] +-com.h2database:h2:1.4.187
[info] +-com.typesafe.akka:akka-actor_2.10:2.3.6 [S]
[info] | +-com.typesafe:config:1.2.1 (evicted by: 1.3.0)
[info] | +-com.typesafe:config:1.3.0
[info] |
[info] +-com.typesafe.akka:akka-testkit_2.10:2.3.6 [S]
[info] | +-com.typesafe.akka:akka-actor_2.10:2.3.6 [S]
[info] | +-com.typesafe:config:1.2.1 (evicted by: 1.3.0)
[info] | +-com.typesafe:config:1.3.0
[info] |
[info] +-com.typesafe:config:1.2.1 (evicted by: 1.3.0)
[info] +-com.typesafe:config:1.3.0
[info] +-com.typesafe:scalalogging-slf4j_2.10:1.1.0
[info] | +-org.scala-lang:scala-reflect:2.10.3 (evicted by: 2.10.5)
[info] | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] | +-org.slf4j:slf4j-api:1.7.12
[info] | +-org.slf4j:slf4j-api:1.7.5 (evicted by: 1.7.12)
[info] |
[info] +-edu.stanford.nlp:stanford-corenlp:3.5.2
[info] | +-com.googlecode.efficient-java-matrix-library:ejml:0.23
[info] | +-com.io7m.xom:xom:1.2.10
[info] | | +-xalan:xalan:2.7.0
[info] | | | +-xml-apis:xml-apis:1.3.03
[info] | | | +-xml-apis:xml-apis:2.0.2 (evicted by: 1.3.03)
[info] | | |
[info] | | +-xerces:xercesImpl:2.8.0
[info] | | | +-xml-apis:xml-apis:1.3.03
[info] | | |
[info] | | +-xml-apis:xml-apis:1.3.03
[info] | |
[info] | +-de.jollyday:jollyday:0.4.7
[info] | | +-javax.xml.bind:jaxb-api:2.2.7
[info] | | +-joda-time:joda-time:2.1 (evicted by: 2.8)
[info] | | +-joda-time:joda-time:2.8
[info] | |
[info] | +-javax.json:javax.json-api:1.0
[info] | +-joda-time:joda-time:2.1 (evicted by: 2.8)
[info] | +-joda-time:joda-time:2.8
[info] |
[info] +-edu.stanford.nlp:stanford-parser:3.5.2
[info] | +-com.googlecode.efficient-java-matrix-library:ejml:0.23
[info] |
[info] +-io.spray:spray-can_2.10:1.3.2 [S]
[info] | +-io.spray:spray-http_2.10:1.3.2 [S]
[info] | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | | +-org.parboiled:parboiled-scala_2.10:1.1.6 [S]
[info] | | +-org.parboiled:parboiled-core:1.1.6
[info] | |
[info] | +-io.spray:spray-io_2.10:1.3.2 [S]
[info] | | +-io.spray:spray-http_2.10:1.3.2 [S]
[info] | | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | | | +-org.parboiled:parboiled-scala_2.10:1.1.6 [S]
[info] | | | +-org.parboiled:parboiled-core:1.1.6
[info] | | |
[info] | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | |
[info] | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] |
[info] +-io.spray:spray-routing_2.10:1.3.2 [S]
[info] | +-com.chuusai:shapeless_2.10:1.2.4 [S]
[info] | +-io.spray:spray-http_2.10:1.3.2 [S]
[info] | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | | +-org.parboiled:parboiled-scala_2.10:1.1.6 [S]
[info] | | +-org.parboiled:parboiled-core:1.1.6
[info] | |
[info] | +-io.spray:spray-httpx_2.10:1.3.2 [S]
[info] | | +-io.spray:spray-http_2.10:1.3.2 [S]
[info] | | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | | | +-org.parboiled:parboiled-scala_2.10:1.1.6 [S]
[info] | | | +-org.parboiled:parboiled-core:1.1.6
[info] | | |
[info] | | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | | +-org.jvnet.mimepull:mimepull:1.9.4
[info] | |
[info] | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] |
[info] +-io.spray:spray-testkit_2.10:1.3.2 [S]
[info] | +-com.typesafe.akka:akka-testkit_2.10:2.3.6 [S]
[info] | | +-com.typesafe.akka:akka-actor_2.10:2.3.6 [S]
[info] | | +-com.typesafe:config:1.2.1 (evicted by: 1.3.0)
[info] | | +-com.typesafe:config:1.3.0
[info] | |
[info] | +-io.spray:spray-util_2.10:1.3.2 [S]
[info] | +-org.specs2:specs2_2.10:2.3.10 [S]
[info] | +-junit:junit:4.11
[info] | | +-org.hamcrest:hamcrest-core:1.3
[info] | |
[info] | +-org.hamcrest:hamcrest-core:1.3
[info] | +-org.mockito:mockito-core:1.9.5
[info] | | +-org.hamcrest:hamcrest-core:1.1 (evicted by: 1.3)
[info] | | +-org.hamcrest:hamcrest-core:1.3
[info] | | +-org.objenesis:objenesis:1.0
[info] | |
[info] | +-org.pegdown:pegdown:1.2.1
[info] | | +-org.parboiled:parboiled-java:1.1.4
[info] | | +-org.ow2.asm:asm-analysis:4.1
[info] | | | +-org.ow2.asm:asm-tree:4.1
[info] | | | +-org.ow2.asm:asm:4.1
[info] | | |
[info] | | +-org.ow2.asm:asm-tree:4.1
[info] | | | +-org.ow2.asm:asm:4.1
[info] | | |
[info] | | +-org.ow2.asm:asm-util:4.1
[info] | | | +-org.ow2.asm:asm-tree:4.1
[info] | | | +-org.ow2.asm:asm:4.1
[info] | | |
[info] | | +-org.ow2.asm:asm:4.1
[info] | | +-org.parboiled:parboiled-core:1.1.4 (evicted by: 1.1.6)
[info] | | +-org.parboiled:parboiled-core:1.1.6
[info] | |
[info] | +-org.scala-lang:scala-compiler:2.10.3 [S]
[info] | | +-org.scala-lang:scala-reflect:2.10.3 (evicted by: 2.10.5)
[info] | | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] | |
[info] | +-org.scala-lang:scala-reflect:2.10.3 (evicted by: 2.10.5)
[info] | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] | +-org.scalacheck:scalacheck_2.10:1.11.3 [S]
[info] | | +-org.scala-sbt:test-interface:1.0
[info] | |
[info] | +-org.scalamacros:quasiquotes_2.10.3:2.0.0-M3 [S]
[info] | | +-org.scala-lang:scala-reflect:2.10.3 (evicted by: 2.10.5)
[info] | | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] | |
[info] | +-org.scalaz:scalaz-concurrent_2.10:7.0.6 [S]
[info] | | +-org.scalaz:scalaz-core_2.10:7.0.6 (evicted by: 7.2.0-M2)
[info] | | +-org.scalaz:scalaz-core_2.10:7.2.0-M2 [S]
[info] | | +-org.scalaz:scalaz-effect_2.10:7.0.6 [S]
[info] | | +-org.scalaz:scalaz-core_2.10:7.0.6 (evicted by: 7.2.0-M2)
[info] | | +-org.scalaz:scalaz-core_2.10:7.2.0-M2 [S]
[info] | |
[info] | +-org.scalaz:scalaz-core_2.10:7.0.6 (evicted by: 7.2.0-M2)
[info] | +-org.scalaz:scalaz-core_2.10:7.2.0-M2 [S]
[info] | +-org.specs2:classycle:1.4.3
[info] |
[info] +-mysql:mysql-connector-java:5.1.36
[info] +-org.apache.lucene:lucene-analyzers-common:5.2.1
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] |
[info] +-org.apache.lucene:lucene-backward-codecs:5.2.1
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] |
[info] +-org.apache.lucene:lucene-codecs:5.2.1
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] |
[info] +-org.apache.lucene:lucene-core:5.2.1
[info] +-org.apache.lucene:lucene-facet:5.2.1
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] | +-org.apache.lucene:lucene-queries:5.2.1
[info] |
[info] +-org.apache.lucene:lucene-queryparser:5.2.1
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] | +-org.apache.lucene:lucene-queries:5.2.1
[info] | +-org.apache.lucene:lucene-sandbox:5.2.1
[info] |
[info] +-org.apache.lucene:lucene-suggest:5.2.1
[info] | +-org.apache.lucene:lucene-analyzers-common:5.2.1
[info] | | +-org.apache.lucene:lucene-core:5.2.1
[info] | |
[info] | +-org.apache.lucene:lucene-core:5.2.1
[info] | +-org.apache.lucene:lucene-misc:5.2.1
[info] | +-org.apache.lucene:lucene-queries:5.2.1
[info] |
[info] +-org.hsqldb:hsqldb:2.3.2
[info] +-org.json4s:json4s-native_2.10:3.2.4 [S]
[info] | +-org.json4s:json4s-core_2.10:3.2.4 [S]
[info] | +-com.thoughtworks.paranamer:paranamer:2.5.2
[info] | +-org.json4s:json4s-ast_2.10:3.2.4 [S]
[info] | +-org.scala-lang:scalap:2.10.0
[info] | +-org.scala-lang:scala-compiler:2.10.0 [S] (evicted by: 2.10.3)
[info] | | +-org.scala-lang:scala-reflect:2.10.0 [S] (evicted by: 2.10.5)
[info] | | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] | |
[info] | +-org.scala-lang:scala-compiler:2.10.3 [S]
[info] | +-org.scala-lang:scala-reflect:2.10.3 (evicted by: 2.10.5)
[info] | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] |
[info] +-org.scalatest:scalatest_2.10:2.1.4 [S]
[info] | +-org.scala-lang:scala-reflect:2.10.3 (evicted by: 2.10.5)
[info] | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] |
[info] +-org.scalaz:scalaz-core_2.10:7.0.6 (evicted by: 7.2.0-M2)
[info] +-org.scalaz:scalaz-core_2.10:7.2.0-M2 [S]
[info] +-org.scalikejdbc:scalikejdbc-config_2.10:2.2.7 [S]
[info] | +-com.typesafe:config:1.2.1 (evicted by: 1.3.0)
[info] | +-com.typesafe:config:1.3.0
[info] | +-org.scalikejdbc:scalikejdbc-core_2.10:2.2.7 [S]
[info] | | +-commons-dbcp:commons-dbcp:1.4
[info] | | | +-commons-pool:commons-pool:1.5.4
[info] | | |
[info] | | +-joda-time:joda-time:2.8
[info] | | +-org.joda:joda-convert:1.7
[info] | | +-org.slf4j:slf4j-api:1.7.12
[info] | |
[info] | +-org.slf4j:slf4j-api:1.7.12
[info] |
[info] +-org.scalikejdbc:scalikejdbc-test_2.10:2.2.7 [S]
[info] | +-org.scalikejdbc:scalikejdbc_2.10:2.2.7 [S]
[info] | | +-org.scalikejdbc:scalikejdbc-core_2.10:2.2.7 [S]
[info] | | | +-commons-dbcp:commons-dbcp:1.4
[info] | | | | +-commons-pool:commons-pool:1.5.4
[info] | | | |
[info] | | | +-joda-time:joda-time:2.8
[info] | | | +-org.joda:joda-convert:1.7
[info] | | | +-org.slf4j:slf4j-api:1.7.12
[info] | | |
[info] | | +-org.scalikejdbc:scalikejdbc-interpolation_2.10:2.2.7 [S]
[info] | | +-org.scalikejdbc:scalikejdbc-core_2.10:2.2.7 [S]
[info] | | | +-commons-dbcp:commons-dbcp:1.4
[info] | | | | +-commons-pool:commons-pool:1.5.4
[info] | | | |
[info] | | | +-joda-time:joda-time:2.8
[info] | | | +-org.joda:joda-convert:1.7
[info] | | | +-org.slf4j:slf4j-api:1.7.12
[info] | | |
[info] | | +-org.scalikejdbc:scalikejdbc-interpolation-macro_2.10:2.2.7 [S]
[info] | | | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] | | | +-org.scalikejdbc:scalikejdbc-core_2.10:2.2.7 [S]
[info] | | | +-commons-dbcp:commons-dbcp:1.4
[info] | | | | +-commons-pool:commons-pool:1.5.4
[info] | | | |
[info] | | | +-joda-time:joda-time:2.8
[info] | | | +-org.joda:joda-convert:1.7
[info] | | | +-org.slf4j:slf4j-api:1.7.12
[info] | | |
[info] | | +-org.slf4j:slf4j-api:1.7.12
[info] | |
[info] | +-org.slf4j:slf4j-api:1.7.12
[info] |
[info] +-org.scalikejdbc:scalikejdbc_2.10:2.2.7 [S]
[info] | +-org.scalikejdbc:scalikejdbc-core_2.10:2.2.7 [S]
[info] | | +-commons-dbcp:commons-dbcp:1.4
[info] | | | +-commons-pool:commons-pool:1.5.4
[info] | | |
[info] | | +-joda-time:joda-time:2.8
[info] | | +-org.joda:joda-convert:1.7
[info] | | +-org.slf4j:slf4j-api:1.7.12
[info] | |
[info] | +-org.scalikejdbc:scalikejdbc-interpolation_2.10:2.2.7 [S]
[info] | +-org.scalikejdbc:scalikejdbc-core_2.10:2.2.7 [S]
[info] | | +-commons-dbcp:commons-dbcp:1.4
[info] | | | +-commons-pool:commons-pool:1.5.4
[info] | | |
[info] | | +-joda-time:joda-time:2.8
[info] | | +-org.joda:joda-convert:1.7
[info] | | +-org.slf4j:slf4j-api:1.7.12
[info] | |
[info] | +-org.scalikejdbc:scalikejdbc-interpolation-macro_2.10:2.2.7 [S]
[info] | | +-org.scala-lang:scala-reflect:2.10.5 [S]
[info] | | +-org.scalikejdbc:scalikejdbc-core_2.10:2.2.7 [S]
[info] | | +-commons-dbcp:commons-dbcp:1.4
[info] | | | +-commons-pool:commons-pool:1.5.4
[info] | | |
[info] | | +-joda-time:joda-time:2.8
[info] | | +-org.joda:joda-convert:1.7
[info] | | +-org.slf4j:slf4j-api:1.7.12
[info] | |
[info] | +-org.slf4j:slf4j-api:1.7.12
[info] |
[info] +-org.slf4j:slf4j-simple:1.7.12
[info] +-org.slf4j:slf4j-api:1.7.12

最佳答案

当代码使用一个版本的 scalaz 编译并针对另一个不兼容的版本运行时,就会发生这种情况。

备忘录确实从 trait in 7.1 改变了到 abstract class in 7.2 .因为这是在测试期间发生的,所以您应该检查 sbt test:dependencyGraph 而不是 sbt dependencyGraph。我猜如果你运行它,你会发现 specs2 依赖于 scalaz 7.1,这与你对 scalaz 7.2 的依赖不兼容

关于scala - Sbt 测试在使用 Scalaz 时抛出 IncompatibleClassChangeError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32070494/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com