8000 scala 2.11.6 + Play framework 2.4.1 support · Issue #58 · sorm/sorm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Aug 31, 2022. It is now read-only.

scala 2.11.6 + Play framework 2.4.1 support #58

Open
Ranganaths opened this issue Jul 2, 2015 · 10 comments
Open

scala 2.11.6 + Play framework 2.4.1 support #58

Ranganaths opened this issue Jul 2, 2015 · 10 comments

Comments

@Ranganaths
Copy link

Hi all,
I am using scala 2.11.6 + Play framework 2.4.1 , i am getting the following errors 👎
Modules were resolved with conflicting cross-version suffixes in {file:/home/ranganaths/projects/Meetions/}root:
[error] org.scala-lang.modules:scala-xml _2.11, _2.12.0-M1
[error] org.scala-lang.modules:scala-parser-combinators _2.11, _2.12.0-M1
java.lang.RuntimeException: Conflicting cross-version suffixes in: org.scala-lang.modules:scala-xml, org.scala-lang.modules:scala-parser-combinators
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:1164)
at sbt.Classpaths$$anonfun$66.apply(Defaults.scala:1161)
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:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
error Conflicting cross-version suffixes in: org.scala-lang.modules:scala-xml, org.scala-lang.modules:scala-parser-combinators

Just wanted to checkk the compatibility with scala and play framework.

thank you,
Ranganath.S

@evansb
Copy link
evansb commented Jul 10, 2015

I also have the same conflict with scalatest.

It should go through if you remove the conflict warning.

@nikita-volkov
Copy link
Contributor

Hi Guys,

SORM is intended to be a community project. Just fork it and fix the issue. Because I'm afraid I won't have time to jump on it any time soon.

@evansb
Copy link
evansb commented Jul 10, 2015

@nikita-volkov
Just traced my dependency tree, and it seems like the cause is https://github.com/nikita-volkov/embrace

    "org.sorm-framework:sorm:0.3.18" -> "com.github.nikita-volkov:embrace:0.1.4"
    "com.github.nikita-volkov:embrace:0.1.4" -> "org.scala-lang:scala-compiler:2.12.0-M1"
    "org.scala-lang:scala-compiler:2.12.0-M1" -> "org.scala-lang.modules:scala-xml_2.12.0-M1:1.0.4"
    "org.scala-lang:scala-compiler:2.12.0-M1" -> "org.scala-lang.modules:scala-parser-combinators_2.12.0-M1:1.0.4"
     This conflicts with a lot of libraries that still uses 2.11
    "org.scalatest:scalatest_2.11:2.1.6" -> "org.scala-lang.modules:scala-xml_2.11:1.0.1"
    "org.scalatest:scalatest_2.11:2.1.6" -> "org.scala-lang.modules:scala-parser-combinators_2.11:1.0.1"

Changing from [2.10,3] to [2.10,2.11] in the pom entry of scala-xml and scala-parser-combinators should fix this issue.

I will submit a PR soon.

@nikita-volkov
Copy link
Contributor

@evansb It shouldn't be the cause. "embrace" uses a version range [2.10,3), which means that it accepts all Scala versions, which are >= 2.10 and < 3.0. So the actual version gets determined by some other item in the dependency tree.

@nikita-volkov
Copy link
Contributor

BTW guys, I suspect this might not be an issue of SORM at all. Here's a possible fix: http://stackoverflow.com/questions/16925870/using-sorm-with-play-framework-causes-reflection-exceptions-to-be-thrown

@evansb
Copy link
evansb commented Jul 10, 2015

Umm sorry I am not familiar of how transitive dependency get resolved but I actually just fixed the problem by specifying embrace's dependency manually. I double checked my graph and the 2.12 is indeed coming from embrace.

lazy val scalaLibrary = "org.scala-lang" % "scala-library" % "2.11.6"

lazy val scalaCompiler = "org.scala-lang" % "scala-compiler" % "2.11.6"

lazy val embrace = "com.github.nikita-volkov" % "embrace" % "0.1.3" intransitive

lazy val sorm = "org.sorm-framework" % "sorm" % "0.3.18" excludeAll (ExclusionRule(name = "embrace"))

@Ranganaths
Copy link
Author

hi evansb,

can you help me solve this issue.. i mean what did you do to solve this issue?

-R

@aholland
Copy link

SORM is the database of choice in the video tutorial on the front page of https://www.playframework.com, but it doesn't actually work due to this conflicting cross-version suffixes issue.

@aholland
Copy link

Evan, thank you very, very much! That solved my problem and I don't know how long it would have taken me to get there otherwise.

@evansb
Copy link
evansb commented Aug 23, 2015

@aholland You should send a pull request on Embrace. I'm no longer developing in Scala so I might not have the time to resolve this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0