- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
SBT with Scala 2.8
Sun, 2010-01-10, 12:05
Hi,
I could do with some help regarding using SBT with Scala 2.8. I set up the basic SBT (0.5.6) but found some code I have won't build and needs Scala 2.8, so I'd like to get SBT set up with Scala 2.8.x
Following the basic steps here: http://code.google.com/p/simple-build-tool/wiki/LocalScala (following nightly build steps)
I've fetched the code and notice scala 2.8.0 is already defined as 2.8.0-Beta-RC1 (in the source file project/build/CrossCompileProject.scala) which should be sufficient, but when I try to build I get some errors like this:
[info] == Simple Build Tool / compile [ 2.8.0.Beta1-RC1 ] ==
[error] /Users/chillipower_uk/dev/opensource/sbt/src/main/scala/sbt/impl/ManagedImpl.scala:59: error: type mismatch;
[error] found : java.util.List[T forSome { type T }]
[error] required: java.util.List
[error] def getProblems = emptyList
[error] ^
[error] /Users/chillipower_uk/dev/opensource/sbt/src/main/scala/sbt/impl/ManagedImpl.scala:60: error: type mismatch;
[error] found : java.util.List[T forSome { type T }]
[error] required: java.util.List
[error] def getWarns = emptyList
[error] ^
[error] /Users/chillipower_uk/dev/opensource/sbt/src/main/scala/sbt/impl/ManagedImpl.scala:61: error: type mismatch;
[error] found : java.util.List[T forSome { type T }]
[error] required: java.util.List
[error] def getErrors = emptyList
[error] ^
[error] three errors found
[info] Compiled sbt with Scala 2.8.0.Beta1-RC1 in 130.751 s
[info] == Simple Build Tool / compile [ 2.8.0.Beta1-RC1 ] ==
[info]
[info] Simple Build Tool Loader / package ...
[info]
[info] == Simple Build Tool Loader / package ==
[info] == Simple Build Tool Loader / package ==
[info]
[info] Simple Build Tool Loader / write-proguard-configuration ...
[info]
[info] == Simple Build Tool Loader / write-proguard-configuration ==
[info] == Simple Build Tool Loader / write-proguard-configuration ==
[info]
[info] Simple Build Tool Loader / proguard ...
[info]
[info] == Simple Build Tool / compile [ 2.7.7 ] ==
[error] warning: there were unchecked warnings; re-run with -unchecked for details
[error] one warning found
[info] Compiled sbt with Scala 2.7.7 in 161.809 s
[info] == Simple Build Tool / compile [ 2.7.7 ] ==
[info]
[info] Simple Build Tool / package [ 2.7.7 ] ...
[info]
[info] == Simple Build Tool / package [ 2.7.7 ] ==
[info] Packaging ./target/sbt_2.7.7-0.5.7-SNAPSHOT.jar ...
[info] Packaging complete.
[info] == Simple Build Tool / package [ 2.7.7 ] ==
[info]
[info] == Simple Build Tool Loader / proguard ==
[info] ProGuard, version 4.3
[info] Reading program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/lib_managed/compile/ivy-2.0.0.jar] (filtered)
[info] Reading program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/lib/jline-0.9.94.jar] (filtered)
[info] Reading program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/target/sbt-launcher-0.5.7-SNAPSHOT.jar]
[info] Reading program jar [/Users/chillipower_uk/dev/opensource/sbt/project/boot/scala-2.7.2/lib/scala-library.jar] (filtered)
[info] Reading library jar [/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar]
[info] Preparing output jar [/Users/chillipower_uk/dev/opensource/sbt/target/sbt-launcher-0.5.7-SNAPSHOT.jar]
[info] Copying resources from program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/lib_managed/compile/ivy-2.0.0.jar] (filtered)
[info] Copying resources from program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/lib/jline-0.9.94.jar] (filtered)
[info] Copying resources from program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/target/sbt-launcher-0.5.7-SNAPSHOT.jar]
[info] Copying resources from program jar [/Users/chillipower_uk/dev/opensource/sbt/project/boot/scala-2.7.2/lib/scala-library.jar] (filtered)
[info] == Simple Build Tool Loader / proguard ==
[error] Error running compile [ 2.8.0.Beta1-RC1 ] : Nonzero exit value (1) when calling scalac 2.8.0.Beta1-RC1 with options:
[error] -cp /Users/chillipower_uk/dev/opensource/sbt/lib_managed/2.8.0.Beta1-RC1/jsch-0.1.31.jar:/Users/chillipower_uk/dev/opensource/sbt/lib_managed/optional-2.8.0.Beta1-RC1/jetty-util-6.1.14.jar:/Users/chillipower_uk/dev/opensource/sbt/lib_managed/2.8.0.Beta1-RC1/ivy-2.0.0.jar:/Users/chillipower_uk/dev/opensource/sbt/lib_managed/optional-2.8.0.Beta1-RC1/servlet-api-2.5-6.1.14.jar:/Users/chillipower_uk/dev/opensource/sbt/target/classes-2.8.0.Beta1-RC1:/Users/chillipower_uk/dev/opensource/sbt/src/main/resources:/Users/chillipower_uk/dev/opensource/sbt/lib_managed/2.8.0.Beta1-RC1/jline-0.9.94.jar:/Users/chillipower_uk/dev/opensource/sbt/lib_managed/optional-2.8.0.Beta1-RC1/jetty-6.1.14.jar -d ./target/classes-2.8.0.Beta1-RC1
[info]
[info] Total time: 180 s
>
My current Scala version in my environment is:
Welcome to Scala version 2.8.0.Beta1-RC2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_17).
If anyone could point me in the right direction, goal is SBT working with any Scala > 2.8.0beta, RC2 or latest nightly snapshot would be fine. Maybe I'm missing something but the steps given in the SBT project might be missing a few details?
Assuming I get SBT built with the right Scala, what then needs to be done. Copy the new ./target/"launcher jar" to the ./bin and update my sbt script to point to it, and set ./project/build.properties to something like this?
#Project Properties
#Sun Jan 10 10:28:51 GMT 2010
project.name=test1
project.organization=acme
sbt.version=0.5.7-SNAPSHOT
project.version=1.0
scala.version=2.8.0.Beta1-RC1
project.initialize=false
how does SBT pick up 0.5.7-SNAPSHOT (the thing I am building), is it in the launcher jar or do I need to put some of the other jars in the same place or on the classpath to run the locally built version?
any help much appreciated!
Cheers, Louis
--
Web: www.chillipower.com
Blog: http://louisbotterill.blogspot.com/
Twitter: http://twitter.com/BinaryJunkie
LinkedIn: http://uk.linkedin.com/pub/louis-botterill/10/3b2/265
Please consider your environmental responsibility before printing this e-mail
I could do with some help regarding using SBT with Scala 2.8. I set up the basic SBT (0.5.6) but found some code I have won't build and needs Scala 2.8, so I'd like to get SBT set up with Scala 2.8.x
Following the basic steps here: http://code.google.com/p/simple-build-tool/wiki/LocalScala (following nightly build steps)
I've fetched the code and notice scala 2.8.0 is already defined as 2.8.0-Beta-RC1 (in the source file project/build/CrossCompileProject.scala) which should be sufficient, but when I try to build I get some errors like this:
[info] == Simple Build Tool / compile [ 2.8.0.Beta1-RC1 ] ==
[error] /Users/chillipower_uk/dev/opensource/sbt/src/main/scala/sbt/impl/ManagedImpl.scala:59: error: type mismatch;
[error] found : java.util.List[T forSome { type T }]
[error] required: java.util.List
[error] def getProblems = emptyList
[error] ^
[error] /Users/chillipower_uk/dev/opensource/sbt/src/main/scala/sbt/impl/ManagedImpl.scala:60: error: type mismatch;
[error] found : java.util.List[T forSome { type T }]
[error] required: java.util.List
[error] def getWarns = emptyList
[error] ^
[error] /Users/chillipower_uk/dev/opensource/sbt/src/main/scala/sbt/impl/ManagedImpl.scala:61: error: type mismatch;
[error] found : java.util.List[T forSome { type T }]
[error] required: java.util.List
[error] def getErrors = emptyList
[error] ^
[error] three errors found
[info] Compiled sbt with Scala 2.8.0.Beta1-RC1 in 130.751 s
[info] == Simple Build Tool / compile [ 2.8.0.Beta1-RC1 ] ==
[info]
[info] Simple Build Tool Loader / package ...
[info]
[info] == Simple Build Tool Loader / package ==
[info] == Simple Build Tool Loader / package ==
[info]
[info] Simple Build Tool Loader / write-proguard-configuration ...
[info]
[info] == Simple Build Tool Loader / write-proguard-configuration ==
[info] == Simple Build Tool Loader / write-proguard-configuration ==
[info]
[info] Simple Build Tool Loader / proguard ...
[info]
[info] == Simple Build Tool / compile [ 2.7.7 ] ==
[error] warning: there were unchecked warnings; re-run with -unchecked for details
[error] one warning found
[info] Compiled sbt with Scala 2.7.7 in 161.809 s
[info] == Simple Build Tool / compile [ 2.7.7 ] ==
[info]
[info] Simple Build Tool / package [ 2.7.7 ] ...
[info]
[info] == Simple Build Tool / package [ 2.7.7 ] ==
[info] Packaging ./target/sbt_2.7.7-0.5.7-SNAPSHOT.jar ...
[info] Packaging complete.
[info] == Simple Build Tool / package [ 2.7.7 ] ==
[info]
[info] == Simple Build Tool Loader / proguard ==
[info] ProGuard, version 4.3
[info] Reading program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/lib_managed/compile/ivy-2.0.0.jar] (filtered)
[info] Reading program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/lib/jline-0.9.94.jar] (filtered)
[info] Reading program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/target/sbt-launcher-0.5.7-SNAPSHOT.jar]
[info] Reading program jar [/Users/chillipower_uk/dev/opensource/sbt/project/boot/scala-2.7.2/lib/scala-library.jar] (filtered)
[info] Reading library jar [/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar]
[info] Preparing output jar [/Users/chillipower_uk/dev/opensource/sbt/target/sbt-launcher-0.5.7-SNAPSHOT.jar]
[info] Copying resources from program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/lib_managed/compile/ivy-2.0.0.jar] (filtered)
[info] Copying resources from program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/lib/jline-0.9.94.jar] (filtered)
[info] Copying resources from program jar [/Users/chillipower_uk/dev/opensource/sbt/boot/target/sbt-launcher-0.5.7-SNAPSHOT.jar]
[info] Copying resources from program jar [/Users/chillipower_uk/dev/opensource/sbt/project/boot/scala-2.7.2/lib/scala-library.jar] (filtered)
[info] == Simple Build Tool Loader / proguard ==
[error] Error running compile [ 2.8.0.Beta1-RC1 ] : Nonzero exit value (1) when calling scalac 2.8.0.Beta1-RC1 with options:
[error] -cp /Users/chillipower_uk/dev/opensource/sbt/lib_managed/2.8.0.Beta1-RC1/jsch-0.1.31.jar:/Users/chillipower_uk/dev/opensource/sbt/lib_managed/optional-2.8.0.Beta1-RC1/jetty-util-6.1.14.jar:/Users/chillipower_uk/dev/opensource/sbt/lib_managed/2.8.0.Beta1-RC1/ivy-2.0.0.jar:/Users/chillipower_uk/dev/opensource/sbt/lib_managed/optional-2.8.0.Beta1-RC1/servlet-api-2.5-6.1.14.jar:/Users/chillipower_uk/dev/opensource/sbt/target/classes-2.8.0.Beta1-RC1:/Users/chillipower_uk/dev/opensource/sbt/src/main/resources:/Users/chillipower_uk/dev/opensource/sbt/lib_managed/2.8.0.Beta1-RC1/jline-0.9.94.jar:/Users/chillipower_uk/dev/opensource/sbt/lib_managed/optional-2.8.0.Beta1-RC1/jetty-6.1.14.jar -d ./target/classes-2.8.0.Beta1-RC1
[info]
[info] Total time: 180 s
>
My current Scala version in my environment is:
Welcome to Scala version 2.8.0.Beta1-RC2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_17).
If anyone could point me in the right direction, goal is SBT working with any Scala > 2.8.0beta, RC2 or latest nightly snapshot would be fine. Maybe I'm missing something but the steps given in the SBT project might be missing a few details?
Assuming I get SBT built with the right Scala, what then needs to be done. Copy the new ./target/"launcher jar" to the ./bin and update my sbt script to point to it, and set ./project/build.properties to something like this?
#Project Properties
#Sun Jan 10 10:28:51 GMT 2010
project.name=test1
project.organization=acme
sbt.version=0.5.7-SNAPSHOT
project.version=1.0
scala.version=2.8.0.Beta1-RC1
project.initialize=false
how does SBT pick up 0.5.7-SNAPSHOT (the thing I am building), is it in the launcher jar or do I need to put some of the other jars in the same place or on the classpath to run the locally built version?
any help much appreciated!
Cheers, Louis
--
Web: www.chillipower.com
Blog: http://louisbotterill.blogspot.com/
Twitter: http://twitter.com/BinaryJunkie
LinkedIn: http://uk.linkedin.com/pub/louis-botterill/10/3b2/265
Please consider your environmental responsibility before printing this e-mail
Sun, 2010-01-10, 22:57
#2
Re: SBT with Scala 2.8
Hi Mark,
I'm up and running with this now - fantastic, thank you! the x0.6.x version is certainly a much easier way to go.
I'd not realised there was currently a dependency between the Scala version used to build/run sbt and that used to run the target application, so this new version of sbt must be a great step forward. Currently using Scala 2.8rc7, if I find any quirks if it's useful I can/should mention them here?
cheers, Louis
--
Web: www.chillipower.com
Blog: http://louisbotterill.blogspot.com/
Twitter: http://twitter.com/BinaryJunkie
LinkedIn: http://uk.linkedin.com/pub/louis-botterill/10/3b2/265
Please consider your environmental responsibility before printing this e-mail
I'm up and running with this now - fantastic, thank you! the x0.6.x version is certainly a much easier way to go.
I'd not realised there was currently a dependency between the Scala version used to build/run sbt and that used to run the target application, so this new version of sbt must be a great step forward. Currently using Scala 2.8rc7, if I find any quirks if it's useful I can/should mention them here?
cheers, Louis
--
Web: www.chillipower.com
Blog: http://louisbotterill.blogspot.com/
Twitter: http://twitter.com/BinaryJunkie
LinkedIn: http://uk.linkedin.com/pub/louis-botterill/10/3b2/265
Please consider your environmental responsibility before printing this e-mail
Mon, 2010-01-11, 01:37
#3
Re: SBT with Scala 2.8
Hi Louis,
On Sunday 10 January 2010, Louis Botterill wrote:
> Hi Mark,
>
> I'm up and running with this now - fantastic, thank you! the x0.6.x version
> is certainly a much easier way to go.
Great! It is not yet a smooth transition for 0.5.6 users, otherwise it would
be the official version.
> I'd not realised there was currently a dependency between the Scala version
> used to build/run sbt and that used to run the target application, so this
> new version of sbt must be a great step forward. Currently using Scala
> 2.8rc7, if I find any quirks if it's useful I can/should mention them here?
Yes, sbt is written in Scala and its recompilation implementation interfaces
directly with the Scala compiler. It will certainly be a nice step forward,
assuming no major issues were introduced. Bug reports are indeed welcome.
You might find the sbt mailing list[1] and issue tracker[2] more appropriate
for them.
> cheers, Louis
-Mark
[1] http://groups.google.com/group/simple-build-tool
[2] http://code.google.com/p/simple-build-tool/issues/list
Hi Louis,
The development 0.6.x series is the best way to use sbt with 2.8. It should
more or less just work with 2.8. The plan is to make it stable some time
after the 2.8 beta is released.
http://code.google.com/p/simple-build-tool/wiki/0_6_Summary
http://simple-build-tool.googlecode.com/files/xsbt-launch-0.6.9.jar
Thanks,
Mark
On Sunday 10 January 2010, Louis Botterill wrote:
> Hi,
>
> I could do with some help regarding using SBT with Scala 2.8. I set up the
> basic SBT (0.5.6) but found some code I have won't build and needs Scala
> 2.8, so I'd like to get SBT set up with Scala 2.8.x
>
> Following the basic steps here:
> http://code.google.com/p/simple-build-tool/wiki/LocalScala (following
> nightly build steps)
>
> I've fetched the code and notice scala 2.8.0 is already defined as
> 2.8.0-Beta-RC1 (in the source file project/build/CrossCompileProject.scala)
> which should be sufficient, but when I try to build I get some errors like
> this:
>
> [info] == Simple Build Tool / compile [ 2.8.0.Beta1-RC1 ] ==
> [error]
> /Users/chillipower_uk/dev/opensource/sbt/src/main/scala/sbt/impl/ManagedImp
> l.scala:59: error: type mismatch;
> [error] found : java.util.List[T forSome { type T }]
> [error] required: java.util.List
> [error] def getProblems = emptyList
> [error] ^
> [error]
> /Users/chillipower_uk/dev/opensource/sbt/src/main/scala/sbt/impl/ManagedImp
> l.scala:60: error: type mismatch;
> [error] found : java.util.List[T forSome { type T }]
> [error] required: java.util.List
> [error] def getWarns = emptyList
> [error] ^
> [error]
> /Users/chillipower_uk/dev/opensource/sbt/src/main/scala/sbt/impl/ManagedImp
> l.scala:61: error: type mismatch;
> [error] found : java.util.List[T forSome { type T }]
> [error] required: java.util.List
> [error] def getErrors = emptyList
> [error] ^
> [error] three errors found
> [info] Compiled sbt with Scala 2.8.0.Beta1-RC1 in 130.751 s
> [info] == Simple Build Tool / compile [ 2.8.0.Beta1-RC1 ] ==
> [info]
> [info] Simple Build Tool Loader / package ...
> [info]
> [info] == Simple Build Tool Loader / package ==
> [info] == Simple Build Tool Loader / package ==
> [info]
> [info] Simple Build Tool Loader / write-proguard-configuration ...
> [info]
> [info] == Simple Build Tool Loader / write-proguard-configuration ==
> [info] == Simple Build Tool Loader / write-proguard-configuration ==
> [info]
> [info] Simple Build Tool Loader / proguard ...
> [info]
> [info] == Simple Build Tool / compile [ 2.7.7 ] ==
> [error] warning: there were unchecked warnings; re-run with -unchecked for
> details
> [error] one warning found
> [info] Compiled sbt with Scala 2.7.7 in 161.809 s
> [info] == Simple Build Tool / compile [ 2.7.7 ] ==
> [info]
> [info] Simple Build Tool / package [ 2.7.7 ] ...
> [info]
> [info] == Simple Build Tool / package [ 2.7.7 ] ==
> [info] Packaging ./target/sbt_2.7.7-0.5.7-SNAPSHOT.jar ...
> [info] Packaging complete.
> [info] == Simple Build Tool / package [ 2.7.7 ] ==
> [info]
> [info] == Simple Build Tool Loader / proguard ==
> [info] ProGuard, version 4.3
> [info] Reading program jar
> [/Users/chillipower_uk/dev/opensource/sbt/boot/lib_managed/compile/ivy-2.0.
> 0.jar] (filtered)
> [info] Reading program jar
> [/Users/chillipower_uk/dev/opensource/sbt/boot/lib/jline-0.9.94.jar]
> (filtered)
> [info] Reading program jar
> [/Users/chillipower_uk/dev/opensource/sbt/boot/target/sbt-launcher-0.5.7-SN
> APSHOT.jar] [info] Reading program jar
> [/Users/chillipower_uk/dev/opensource/sbt/project/boot/scala-2.7.2/lib/scal
> a-library.jar] (filtered)
> [info] Reading library jar
> [/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes
> .jar] [info] Preparing output jar
> [/Users/chillipower_uk/dev/opensource/sbt/target/sbt-launcher-0.5.7-SNAPSHO
> T.jar] [info] Copying resources from program jar
> [/Users/chillipower_uk/dev/opensource/sbt/boot/lib_managed/compile/ivy-2.0.
> 0.jar] (filtered)
> [info] Copying resources from program jar
> [/Users/chillipower_uk/dev/opensource/sbt/boot/lib/jline-0.9.94.jar]
> (filtered)
> [info] Copying resources from program jar
> [/Users/chillipower_uk/dev/opensource/sbt/boot/target/sbt-launcher-0.5.7-SN
> APSHOT.jar] [info] Copying resources from program jar
> [/Users/chillipower_uk/dev/opensource/sbt/project/boot/scala-2.7.2/lib/scal
> a-library.jar] (filtered)
> [info] == Simple Build Tool Loader / proguard ==
> [error] Error running compile [ 2.8.0.Beta1-RC1 ] : Nonzero exit value (1)
> when calling scalac 2.8.0.Beta1-RC1 with options:
> [error] -cp
> /Users/chillipower_uk/dev/opensource/sbt/lib_managed/2.8.0.Beta1-RC1/jsch-0
> .1.31.jar:/Users/chillipower_uk/dev/opensource/sbt/lib_managed/optional-2.8
> .0.Beta1-RC1/jetty-util-6.1.14.jar:/Users/chillipower_uk/dev/opensource/sbt
> /lib_managed/2.8.0.Beta1-RC1/ivy-2.0.0.jar:/Users/chillipower_uk/dev/openso
> urce/sbt/lib_managed/optional-2.8.0.Beta1-RC1/servlet-api-2.5-6.1.14.jar:/U
> sers/chillipower_uk/dev/opensource/sbt/target/classes-2.8.0.Beta1-RC1:/User
> s/chillipower_uk/dev/opensource/sbt/src/main/resources:/Users/chillipower_u
> k/dev/opensource/sbt/lib_managed/2.8.0.Beta1-RC1/jline-0.9.94.jar:/Users/ch
> illipower_uk/dev/opensource/sbt/lib_managed/optional-2.8.0.Beta1-RC1/jetty-
> 6.1.14.jar -d ./target/classes-2.8.0.Beta1-RC1
> [info]
> [info] Total time: 180 s
>
>
>
> My current Scala version in my environment is:
>
> Welcome to Scala version 2.8.0.Beta1-RC2 (Java HotSpot(TM) 64-Bit Server
> VM, Java 1.6.0_17).
>
>
> If anyone could point me in the right direction, goal is SBT working with
> any Scala > 2.8.0beta, RC2 or latest nightly snapshot would be fine. Maybe
> I'm missing something but the steps given in the SBT project might be
> missing a few details?
>
> Assuming I get SBT built with the right Scala, what then needs to be done.
> Copy the new ./target/"launcher jar" to the ./bin and update my sbt script
> to point to it, and set ./project/build.properties to something like this?
>
> #Project Properties
> #Sun Jan 10 10:28:51 GMT 2010
> project.name=test1
> project.organization=acme
> sbt.version=0.5.7-SNAPSHOT
> project.version=1.0
> scala.version=2.8.0.Beta1-RC1
> project.initialize=false
>
> how does SBT pick up 0.5.7-SNAPSHOT (the thing I am building), is it in the
> launcher jar or do I need to put some of the other jars in the same place
> or on the classpath to run the locally built version?
>
> any help much appreciated!
>
> Cheers, Louis
>