spray-testkit, Scala 2.10, and shapeless 2.0.0

58 views
Skip to first unread message

Amir Mohammad Saied

unread,
Feb 3, 2015, 11:59:37 AM2/3/15
to spray...@googlegroups.com
Hi,

Per spray 1.3.1 announcement email there are now two alternative builds of the `spray-routing` module.

I'm using `spray-routing-shapeless2` (because I depend on parboiled2), but it seems that `spray-testkit` is still pulling `spray-routing`, ergo there are conflicting cross-version suffixes. Is there a build of `spray-testkit` that depends on `spray-routing-shapeless2` instead of `spray-routing`? Actually, will there ever be another spray release? 

Cheers,
Amir

Johannes Rudolph

unread,
Feb 3, 2015, 12:09:53 PM2/3/15
to spray...@googlegroups.com
Hi Amir,

your observation is basically correct.

I cannot remember exactly but I think we figured that spray-testkit
should actually be binary compatible with both of spray-routing and
spray-routing-shapeless2. Since spray-testkit defines spray-routing
only as a provided dependency as far as we know everything should work
if you combine it with either of the routing dependencies.

In which way are you currently experiencing the conflict?

Johannes
> --
> You received this message because you are subscribed to the Google Groups
> "spray.io User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to spray-user+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/spray-user.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/spray-user/c8815eba-4b21-43aa-9f1c-cae6875ea607%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Johannes

-----------------------------------------------
Johannes Rudolph
http://virtual-void.net

Amir Mohammad Saied

unread,
Feb 3, 2015, 12:20:38 PM2/3/15
to spray...@googlegroups.com
Hi Johannes,

Thanks for the prompt reply. I stripped down my `build.sbt` to this:

scalaVersion := "2.10.4"

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

libraryDependencies ++= {
  val sprayV    = "1.3.2"
  Seq(
    "io.spray"        %% "spray-routing-shapeless2" % sprayV,
    "org.parboiled" %% "parboiled"                        % "2.0.1",
    "io.spray"        %% "spray-testkit"                   % sprayV % "test"
  )
}

And I'm getting:

[info] Loading global plugins from /home/amir/.sbt/0.13/plugins
[info] Set current project to foo (in build file:/tmp/foo/)
[error] Modules were resolved with conflicting cross-version suffixes in {file:/tmp/foo/}foo:
[error]    org.scalamacros:quasiquotes _2.10, _2.10.3
java.lang.RuntimeException: Conflicting cross-version suffixes in: org.scalamacros:quasiquotes
        at scala.sys.package$.error(package.scala:27)
        at sbt.ConflictWarning$.processCrossVersioned(ConflictWarning.scala:46)
        at sbt.ConflictWarning$.apply(ConflictWarning.scala:32)
        at sbt.Classpaths$$anonfun$66.apply(Defaults.scala:1128)
        at sbt.Classpaths$$anonfun$66.apply(Defaults.scala:1124)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
        at sbt.std.Transform$$anon$4.work(System.scala:63)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
        at sbt.Execute.work(Execute.scala:235)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        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:745)
[error] (*:update) Conflicting cross-version suffixes in: org.scalamacros:quasiquotes
[error] Total time: 0 s, completed Feb 3, 2015 5:17:02 PM

Cheers,
Amir

Johannes Rudolph

unread,
Feb 4, 2015, 7:07:40 AM2/4/15
to spray...@googlegroups.com
Hi Amir,

this is a known issue (I forgot about). The cause is that
spray-testkit has a dependency on specs2 which should be marked
"provided" but isn't. See the comment in
https://github.com/spray/spray/issues/947 about how to work around it
for now.

Johannes
> https://groups.google.com/d/msgid/spray-user/f1bea709-f029-42b3-9aa4-cf192e63dc65%40googlegroups.com.

Johannes Rudolph

unread,
Feb 4, 2015, 7:09:03 AM2/4/15
to spray...@googlegroups.com
Btw: The workaround is declaring the spray-testkit dependency as:

"io.spray" %% "spray-testkit" % "1.3.2" % "test" exclude("org.specs2",
"specs2_2.10")

Amir Mohammad Saied

unread,
Feb 6, 2015, 6:46:36 AM2/6/15
to spray...@googlegroups.com
Hi Johannes,

Thanks! The workaround worked.
Reply all
Reply to author
Forward
0 new messages