I use sbt 0.10
.
I have the following setting in .sbt
file:
scalacOptions += "-usejavacp"
The problem is that when the Scala compiler get executed and the scalacOptions
is set:
[debug] Calling Scala compiler with arguments (CompilerInterface):
[debug] -usejavacp
[debug] -d
[debug] D:\project\target\scala-2.8.1.final\classes
[debug] -bootclasspath
...
the -usejavacp
parameter appears before the actual Scala jars that results in this error:
scala.collection.mutable.ListBuffer does not take type parameters
Is there a way the parameter is appended and not prepended? I also tried the ++= Array("-usejavacp")
but the result is the same.
If you look here, you'll see the following comment:
key += value
is equivalent tokey ~= (_ :+ value)
orkey <<= key(_ :+ value)
Which, curiously enough, seems to contradict the order you are seeing. I think this is worth opening an issue about, and, meanwhile, you can play with the full syntax to see if you can accomplish what you need.
To directly answer your question, the list of custom scalac options, provided by the scalacOptions
setting, are prepended to the options for controlling the classpath, output directory, and source files.
Presumably you are using -usejavacp
to use the Scala compiler or interpreter programmatically. There is an entry for this in the SBT FAQ.
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