The build.sbt already set
scalaVersion := "2.11.7"
However, whenever i run sbt where the build.sbt resides, I always get this error
org.scala-lang#scala-library;2.10.5: configuration not found in
org.scala-lang#scala-library;2.10.5: 'master(compile)'. Missing
configuration: 'compile'. It was required from org.scalaz#scalaz-
effect_2.10;7.1.0 compile
At the start, it's actually getting the version 2.10.5
Getting Scala 2.10.5 (for sbt)...
Now I cannot proceed. I am running in my macbook.
sbt and your application (managed by sbt) have different requirements for Scala. They both Scala applications so they surely need a Scala runtime.
sbt uses a fixed version of Scala and all the plugins you could ever install in your project should be compatible to that particular Scala version. You cannot change the Scala version for sbt. It's "burried" in the code and not something users should change.
Your Scala/sbt projects can however use whatever they want for Scala. It's a separate concern. You can use build.sbt
and scalaVersion
to set your Scala version.
Having said that, at the very beginning, sbt will always download its own internal dependencies, Scala including. It is then saved in ~/.sbt/boot
.
➜ $ ls -l ~/.sbt/boot
total 424
-rw-r--r-- 1 jacek staff 0 13 sie 20:22 sbt.boot.lock
drwxr-xr-x 4 jacek staff 136 6 wrz 2015 scala-2.10.4
drwxr-xr-x 4 jacek staff 136 2 wrz 2015 scala-2.10.5
drwxr-xr-x 4 jacek staff 136 31 sty 2016 scala-2.10.6
drwxr-xr-x 4 jacek staff 136 3 lis 2015 scala-2.11.5
-rw-r--r-- 1 jacek staff 217029 20 lip 10:37 update.log
Depending on the sbt version you use, you may see different Scala versions being downloaded but they are internal to sbt. You should not be concerned with that. Just accept it :)
p.s. The versions of Scala used by sbt internally are not at all different from the ones you may have downloaded already for your Scala/sbt projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With