Why do I get conflicting cross-version in sbt on one environment but not another?

后端 未结 1 1606
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-19 09:40

I have an sbt project with these dependencies:

libraryDependencies ++= Seq(
  \"org.scalatra\"           %% \"scalatra\"          % ScalatraVersion,
  \"org.         


        
相关标签:
1条回答
  • 2020-12-19 10:34

    Given the pom for com.github.nikita-volkov:embrace, I'm guessing it's due to the use of version ranges combined with caching:

    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-compiler</artifactId>
      <version>[2.10,3)</version>
      <scope>compile</scope>
    </dependency>
    

    Particularly given that Scala 2.12.0-M1 was release yesterday:

    • http://www.scala-lang.org/news/2.12.0-M1

    To fix the inconsistency you want to clear your ivy cache:

    rm -r ~/.ivy2/cache
    

    However you also want to fix the version of scala-compiler use, and you want it to match your configured scalaVersion:

    dependencyOverrides += "org.scala-lang" % "scala-compiler" % scalaVersion.value
    

    See more details in the Overriding a version section of the Library Management docs.

    0 讨论(0)
提交回复
热议问题