4
votes

Firing up the SBT console it reads :

[info] Building project AYLIEN 1.0 against Scala 2.8.1
[info]    using MyProject with sbt 0.7.4 and Scala 2.7.7

How can I make it use MyProject with sbt 0.7.4 and Scala 2.8.1 ? Please pay attenetion that I'm not asking about the Scala version that is used to build my project (it is the 2.8.1 as you can see), but I rather want to make sbt use MyProject with Scala 2.8.1. Apparently sbt uses it's own scala version to work with project definition (MyProject here) which is different than one it uses to actually build the project! or perhaps I'm missing something ... ?

2
You are right. But what difference it makes which version it runs on?pedrofurla
You are right. I was mistakenly under the impression that some problems were rooted in this sbt/scala conversioning thing but I was wrong.Ashkan Kh. Nazary

2 Answers

6
votes

SBT 0.7.* won't work with Scala 2.8.* for your project definition. Mark Harrah is currently working on the next version of SBT which will work with 2.8.*. This means that you can't use any Scala features or functionality that was added after Scala 2.7.7 in your project definition or plugins. Your project itself is free to use 2.8.*.

7
votes

I can see your concern about SBT still using 2.7.7 internally, but it doesn't really matter since SBT downloads that version on its own. You do not have to install 2.7.7 or anything, just forget about it and pretend your environment is pure Scala 2.8.

The configuration file that holds the SBT version setting is: project/build.properties. The content looks like this:

project.organization=com.ab.web 
project.name=cool_proj 
sbt.version=0.7.4
project.version=1.0
build.scala.versions=2.8.0
project.initialize=false

When you want to move up to the next SBT version, just change 0.7.4 to that version and SBT will update itself. Eventually SBT will use some other Scala version internally, but this will not matter to the user.