2015-01-14 24 views
5

Vì vậy, tôi đã cố gắng dùng parboiled2 trong vài tuần gần đây, có thể là phụ thuộc khó khăn nhất để thêm vào bản dựng I đã đi qua trong toàn bộ cuộc đời của tôi. lỗi hiện tại của tôi là một biên dịch sbt assembly) lỗi:Parboiled2 khiến phát hiện phụ thuộc bị thiếu hoặc không hợp lệ trong khi tải tệp lớp 'Prepender.class' "

[error] missing or invalid dependency detected while loading class file 'Prepender.class'. 
[error] Could not access type PrependAux in package shapeless, 
[error] because it (or its dependencies) are missing. Check your build definition for 
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.) 
[error] A full rebuild may help if 'Prepender.class' was compiled against an incompatible version of shapeless. 
[error] .../Main.scala:56: could not find implicit value for parameter prepender: spray.routing.Prepender[shapeless.HNil,shapeless.::[String,shapeless.HNil]] 
[error]  path(searchSegment/Segment)(title => get(responder(complete(
[error]      ^

Dường như nó chỉ đơn giản là không thể thực hiện Spray và Parboiled2 chơi đẹp với nhau.

Tôi đã thử sbt clean và xóa các thư mục target của mình. xây dựng tập tin của tôi là về cơ bản này:

resolvers ++= Seq(
    "spray repo" at "http://repo.spray.io" 
) 

val akkaV = "2.3.6" 
val sprayV = "1.3.2" 

libraryDependencies ++= Seq(
    // If I comment this line, everything works fine. 
    "org.parboiled" %% "parboiled" % "2.0.1" withSources() withJavadoc(), 
    // 
    "org.scalacheck" %% "scalacheck" % "1.12.1" % "test" withSources() withJavadoc(), 
    "org.specs2" %% "specs2-core" % "2.4.15" % "test" withSources() withJavadoc(), 
    "org.specs2" %% "specs2-scalacheck" % "2.4.15" % "test" withSources() withJavadoc(), 
    "org.scalaz" %% "scalaz-core" % "7.1.0" withSources() withJavadoc(), 
    // 
    "io.spray" %% "spray-json" % "1.3.1" withSources() withJavadoc(), 
    "io.spray" %% "spray-can" % sprayV withSources() withJavadoc(), 
    "io.spray" %% "spray-routing" % sprayV withSources() withJavadoc(), 
    "io.spray" %% "spray-testkit" % sprayV % "test" withSources() withJavadoc(), 
    // 
    "com.typesafe.akka" %% "akka-actor" % akkaV withSources() withJavadoc(), 
    "com.typesafe.akka" %% "akka-testkit" % akkaV % "test" withSources() withJavadoc() 
) 

scalaVersion := "2.11.4" 

javaOptions ++= Seq("-target", "1.8", "-source", "1.8") 

sbtVersion tôi là 0.13.6, và phiên bản sbt-assembly của tôi là 0.12.0

Trước khi nâng cấp lên 2.11 và nâng cấp phụ thuộc specs2 của tôi tôi nhận: parboiled2 and Spray cause conflicting cross-version suffixes

Trả lời

Các vấn đề liên quan