How can I solve conflicting cross version suffixes in SBT?
Asked Answered
G

1

9

I have a Play project that uses a library that has recently been ported to Scala 2.11.1.

I have also updated Play to Scala 2.11.1.

When I try to run the project, I get:

[error] Modules were resolved with conflicting cross-version suffixes in {file:/...}:
[error]    org.scalaz:scalaz-core _2.11, _2.10
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) Conflicting cross-version suffixes in: org.scalaz:scalaz-core

I tried to detect which is the library that uses scalaz-core-2.10 using sbt-dependency-graph plugin. However, in the dependency graph tree, there is only one appearance of scalaz-core:

info]   | +-org.scalaz:scalaz-core_2.11:7.0.6

So I am not sure which is the library that uses scalaz-core_2.10...How can I detect it?

I have seen here that once I detect it, I could exclude it, but my problem is how to detect which is dependency that I have to exclude.

Gauge answered 8/7, 2014 at 15:36 Comment(2)
I recently had the same problem with Akka, it turned out I had put % instead of %% in the Spray dependency. Fixing that fixed the problem. I would check my build.sbt and check that all Scala libraries have %%Nordrheinwestfalen
Does last *:update say something useful? Maybe you can share a library name, unless it's your private library.Regalado
B
7

Under target/resolution-cache/reports/ are Ivy's resolution report for each configuration. Look for *-compile.xml and *-test.xml and see if you have

<module organisation="org.scalaz" name="scalaz-core_2.10">
   ....
</module>

This should tell you the caller of the module.

Broadcast answered 9/1, 2015 at 9:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.