我想将我的Scala
项目升级为该语言的2.11.1
版本。
当我更新我的build.sbt
文件并尝试编译项目时,我得到了
[error] Modules were resolved with conflicting cross-version suffixes in {file:somePathTo}SomeProject:
[error] org.parboiled:parboiled-scala _2.11, _2.10
java.lang.RuntimeException: Conflicting cross-version suffixes in: org.parboiled:parboiled-scala
at scala.sys.package$.error(package.scala:27)
at sbt.ConflictWarning$.processCrossVersioned(ConflictWarning.scala:47)
at sbt.ConflictWarning$.apply(ConflictWarning.scala:30)
at sbt.Classpaths$$anonfun$60.apply(Defaults.scala:1090)
at sbt.Classpaths$$anonfun$60.apply(Defaults.scala:1090)
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$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
[error] (*:update) Conflicting cross-version suffixes in: org.parboiled:parboiled-scala
起初我认为这是因为我对Spray
库的依赖还取决于parboiled
所以我在他们的用户列表中发布了一个问题:https://groups.google.com/forum/#!topic/spray-user/XY7ceh7a9t0他们建议我尝试查看我的项目的依赖图。
似乎parboiled不仅被Spray
库使用,而且被Cypher编译器使用(由于我对Spraing Data Neo4j
的依赖,我依赖它。)
2.0
和2.1
版本都使用parboiled
进行scala 2.10
。
http://mvnrepository.com/artifact/org.neo4j/neo4j-cypher-compiler-2.0/2.0.3 http://mvnrepository.com/artifact/org.neo4j/neo4j-cypher-compiler-2.1/2.1.2
我想知道是否可以安全地删除此版本的parboiled
库(http://www.scala-sbt.org/0.13.5/docs/Detailed-Topics/Library-Management.html#exclude-transitive-dependencies)的传递依赖,并将2.11
添加到我的类路径中。
如果来自Neo4j
团队的人能够判断是否有计划发布针对Scala parboiled
针对2.11
编译的Cypher编译器版本,我将不胜感激。
这里的完整性只是我build.sbt
的依赖部分:
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % AkkaVersion,
"com.typesafe.akka" %% "akka-slf4j" % AkkaVersion,
"com.typesafe.akka" %% "akka-testkit" % AkkaVersion % "test",
"com.typesafe.akka" %% "akka-persistence-experimental" % AkkaVersion,
"io.spray" %% "spray-can" % SprayVersion,
"io.spray" %% "spray-routing" % SprayVersion,
"io.spray" %% "spray-testkit" % SprayVersion % "test",
"io.spray" %% "spray-json" % SprayJsonVersion,
"ch.qos.logback" % "logback-classic" % LogbackVersion,
"org.specs2" %% "specs2" % Specs2Version,
"org.springframework.data" % "spring-data-neo4j" % SDNVersion,
"org.springframework.data" % "spring-data-neo4j-rest" % SDNVersion,
"javax.validation" % "validation-api" % ValidationAPIVersion,
"com.github.nscala-time" %% "nscala-time" % NscalaTimeVersion,
"org.neo4j" % "neo4j-kernel" % Neo4jVersion % "test" classifier "tests",
"org.mockito" % "mockito-all" % MockitoVersion,
"com.typesafe.scala-logging" %% "scala-logging" % ScalaLoggingVersion,
"io.kamon" %% "kamon-core" % KamonVersion,
"io.kamon" %% "kamon-spray" % KamonVersion,
"io.kamon" %% "kamon-statsd" % KamonVersion,
"org.aspectj" % "aspectjweaver" % AspectjVersion
)
答案 0 :(得分:3)
肯定有计划更新到更新版本的Scala,并且还更新了诸如parboiled之类的依赖项。但是,Neo4j是一个复杂的数据库系统,具有大量的依赖关系,这种性质的任何变化都需要在迁移和测试方面付出巨大努力。因此,此时,没有可用于此类更改的ETA。
答案 1 :(得分:2)
Neo4j 2.3支持scala 2.11,您可以通过下载和使用latest milestone of 2.3获得潜行峰值。