In a perfect world it would take decidedly less than that!
% sbt -scala-version 2.10.0+54a84a36d5
is more like it. Although this still sets the "perfect world" bar pretttttty low.
Is this a trick question? Isn't it "yes" for most values of this?
I imagine what I was complaining about is the amazing difficulty I had getting sbt to use the scala-reflect.jar which went with the library and compiler jars, which I never did figure out how to make work.
// demonstration build.sbt
name := "proj"
scalaVersion := "2.10.0-RC5"
scalaHome := Some(file("/scala/inst/scala-2.10.1-20121210-141937-7fe7d25379"))
logLevel in Global := Level.Debug
libraryDependencies <++= (scalaVersion)(sv =>
Seq(
"org.scala-lang" % "scala-reflect" % sv,
"org.scala-lang" % "scala-compiler" % sv
)
)
If you use this to compile something, the debug output shows the classpath:
// [debug] Calling Scala compiler with arguments (CompilerInterface):
// [debug] -d
// [debug] /project/Dec14-06PM/target/scala-2.10/classes
// [debug] -bootclasspath
// [debug] <snip jdk classes>:/scala/inst/scala-2.10.1-20121210-141937-7fe7d25379/lib/scala-library.jar
// [debug] -classpath <see below>
// Placed on individual lines for readability
/project/Dec14-06PM/target/scala-2.10/classes
/Users/paulp/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.10.0-RC5.jar
/scala/inst/scala-2.10.1-20121210-141937-7fe7d25379/lib/scala-compiler.jar
So it's custom library, custom compiler, and stock reflect jar, despite my handling reflect and compiler identically and also despite the fact that scala-compiler depends on scala-reflect (in real life: I don't know if that's true in the mind of sbt.) Setting scalaVersion to that exact version only leads to it failing to find any scala-reflect.jar.