Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SBT Scala Version Warning

Tags:

scala

sbt

I started seeing the following warning messages when doing sbt build:

[warn] Scala version was updated by one of library dependencies:
[warn]  * org.scala-lang:scala-library:(2.11.1, 2.11.7, 2.11.2, 2.11.6, 2.11.5, 2.11.0) -> 2.11.8
[warn] To force scalaVersion, add the following:
[warn]  ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }
[warn] Run 'evicted' to see detailed eviction warnings

Why is this? I'm on sbt 0.13.11!

Did something change with the sbt version? I guess I was on 0.13.5 before and did not see any warning of this sort!

like image 888
joesan Avatar asked Apr 27 '16 16:04

joesan


1 Answers

It means your project defines a Scala version smaller than 2.11.8, but sbt decided to increase it to 2.11.8 because one of the dependencies uses that version. It shouldn't matter because these versions are binary compatible. I guess it warns you because you might have deliberately used a smaller version because of some regression, and in that case you would need to force a smaller Scala version using the explanation. In other cases, just ignore the warning or increase your project's Scala version to the latest (2.11.8).

like image 86
0__ Avatar answered Nov 01 '22 07:11

0__