Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala 2.11 + Neo4j - parboiled dependency of Cypher compiler

Tags:

scala

sbt

neo4j

I wanted to upgrade my Scala project to 2.11.1 version of the language.

When I updated my build.sbt file and tried to compile project I got

[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

at first I was thinking that it is because of my dependency on Spray library which also depends on parboiled so I posted a question on their user list: https://groups.google.com/forum/#!topic/spray-user/XY7ceh7a9t0 and they suggested I try view dependency graph for my project.

It seems that parboiled is used not only by Spray library but also by Cypher compiler (which I am depending because of my dependence on Spraing Data Neo4j).

Both 2.0 and 2.1 versions are using parboiled for 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

I am wondering if it would be possible/considered safe to remove transitive dependency on this version of parboiled library (http://www.scala-sbt.org/0.13.5/docs/Detailed-Topics/Library-Management.html#exclude-transitive-dependencies) and just add 2.11 to my classpath.

Also I would be grateful if someone from Neo4j team could tell if there are any plans to release a version of Cypher compiler that is compiled against parboiled for Scala 2.11.

Just for the completeness here is dependency part of my 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
)
like image 572
Andna Avatar asked Jul 05 '14 15:07

Andna


2 Answers

There are definitely plans to update to more recent versions of Scala and also update dependencies such as parboiled. However, Neo4j, being a complex database system, has a large number of dependencies and any change of this nature requires significant effort in migration and testing. Thus, at this time, there is no ETA available for such a change.

like image 57
Chris Leishman Avatar answered Sep 29 '22 07:09

Chris Leishman


Neo4j 2.3 supports scala 2.11, you can have a sneak peak by downloading and using the latest milestone of 2.3.

like image 41
Stefan Plantikow Avatar answered Sep 29 '22 08:09

Stefan Plantikow