- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: Building Scala with SBT
Thu, 2010-07-29, 11:34
Cool stuff!
Unfortunately it does not work with non-svn checkouts (many people work with git-svnthese days). I guess it's for getting the revision number? You could just set it to "0" when the "svn info" command fails.
Thanks: Lukas
lucmac:git luc$ sbt build[info] Building project scala 2.8.0 against Scala 2.7.7 [info] using ScalaSBTBuilder with sbt 0.7.4 and Scala 2.7.7svn: '.' is not a working copyUnableToGetRevisionNumberException at SVN.getRevisionNumber(SVN.scala:26) at ScalaSBTBuilder.getRevision$1(ScalaSBTBuilder.scala:41) at ScalaSBTBuilder.versionNumber(ScalaSBTBuilder.scala:44) at ScalaSBTBuilder$LockerLayer.<init>(ScalaSBTBuilder.scala:64) at ScalaSBTBuilder$$anonfun$locker$1.apply(ScalaSBTBuilder.scala:56) at ScalaSBTBuilder$$anonfun$locker$1.apply(ScalaSBTBuilder.scala:56) at sbt.Project$class.project(Project.scala:169) at ScalaSBTBuilder.project(ScalaSBTBuilder.scala:8) at ScalaSBTBuilder.locker(ScalaSBTBuilder.scala:56) at ScalaSBTBuilder.dependencies(ScalaSBTBuilder.scala:9) at sbt.Dag$$anonfun$topologicalSort$1.apply(Dag.scala:10) at sbt.Dag$$anonfun$topologicalSort$1.apply(Dag.scala:10) at sbt.Dag$.visit$1(Dag.scala:23) at sbt.Dag$.topologicalSort(Dag.scala:28) at sbt.Dag$class.topologicalSort(Dag.scala:10) at ScalaSBTBuilder.topologicalSort(ScalaSBTBuilder.scala:8) at sbt.Project$class.deep(Project.scala:79) at sbt.Project$class.deepTasks(Project.scala:75)
On Thu, Jul 29, 2010 at 12:25, Moix Gregory <gregory.moix@epfl.ch> wrote:
Unfortunately it does not work with non-svn checkouts (many people work with git-svnthese days). I guess it's for getting the revision number? You could just set it to "0" when the "svn info" command fails.
Thanks: Lukas
lucmac:git luc$ sbt build[info] Building project scala 2.8.0 against Scala 2.7.7 [info] using ScalaSBTBuilder with sbt 0.7.4 and Scala 2.7.7svn: '.' is not a working copyUnableToGetRevisionNumberException at SVN.getRevisionNumber(SVN.scala:26) at ScalaSBTBuilder.getRevision$1(ScalaSBTBuilder.scala:41) at ScalaSBTBuilder.versionNumber(ScalaSBTBuilder.scala:44) at ScalaSBTBuilder$LockerLayer.<init>(ScalaSBTBuilder.scala:64) at ScalaSBTBuilder$$anonfun$locker$1.apply(ScalaSBTBuilder.scala:56) at ScalaSBTBuilder$$anonfun$locker$1.apply(ScalaSBTBuilder.scala:56) at sbt.Project$class.project(Project.scala:169) at ScalaSBTBuilder.project(ScalaSBTBuilder.scala:8) at ScalaSBTBuilder.locker(ScalaSBTBuilder.scala:56) at ScalaSBTBuilder.dependencies(ScalaSBTBuilder.scala:9) at sbt.Dag$$anonfun$topologicalSort$1.apply(Dag.scala:10) at sbt.Dag$$anonfun$topologicalSort$1.apply(Dag.scala:10) at sbt.Dag$.visit$1(Dag.scala:23) at sbt.Dag$.topologicalSort(Dag.scala:28) at sbt.Dag$class.topologicalSort(Dag.scala:10) at ScalaSBTBuilder.topologicalSort(ScalaSBTBuilder.scala:8) at sbt.Project$class.deep(Project.scala:79) at sbt.Project$class.deepTasks(Project.scala:75)
On Thu, Jul 29, 2010 at 12:25, Moix Gregory <gregory.moix@epfl.ch> wrote:
I'm happy to announce that the possibility to build Scala with SBT has now been added into trunk. There is now a "project/" directory that contains the SBT project definition.
Remarks :1) The project definition is still in development stage.2) There may be bugs and performance issues. 3) It uses SBT support for partial recompilation.4) The project definition isn't yet able to do everything Ant is capable of. It can : - build all layers (library, actors, dbc, swing, compiler, salap and partest are compiled) - create palo and pack - generates the Scaladoc - generates the binaries files The following functionalities are not yet implemented : - partest running and stability testing - cleaning tasks - distribution creation
Feedback is highly appreciated.
More informations and usage instruction are available at http://lampsvn.epfl.ch/trac/scala/wiki/SBT
Grégory
Thu, 2010-07-29, 18:47
#2
Re: Building Scala with SBT
On Thu, Jul 29, 2010 at 12:34:09PM +0200, Lukas Rytz wrote:
> Unfortunately it does not work with non-svn checkouts (many people
> work with git-svn these days). I guess it's for getting the revision
> number? You could just set it to "0" when the "svn info" command
> fails.
No settling for revision 0! We are not 0-class citizens! I fixed this
(hopefully without breaking any of the four combinations of
git/svn/ant/sbt) in r22649.
Thu, 2010-07-29, 18:57
#3
Re: Building Scala with SBT
On 07/29/10 12:38 PM, Paul Phillips wrote:
> On Thu, Jul 29, 2010 at 12:34:09PM +0200, Lukas Rytz wrote:
>> Unfortunately it does not work with non-svn checkouts (many people
>> work with git-svn these days). I guess it's for getting the revision
>> number? You could just set it to "0" when the "svn info" command
>> fails.
>
> No settling for revision 0! We are not 0-class citizens! I fixed this
> (hopefully without breaking any of the four combinations of
> git/svn/ant/sbt) in r22649.
>
We're number 0! We're number 0!
Eric
Thu, 2010-07-29, 19:07
#4
Re: Building Scala with SBT
On Thu, Jul 29, 2010 at 12:48:05PM -0500, Eric Christeson wrote:
> We're number 0! We're number 0!
I would suppose russ is not on scala-internals (nor would I suggest it
be otherwise) but this comedy was not wasted.
Thu, 2010-08-26, 15:07
#5
Re: Building Scala with SBT
Great job!
I think it would be useful to add a task called 'test' which triggers test
process on files located in /test/files/scalacheck .
This could allow to only run a small subset of test files and will speed
up TDD development cycle.
What do you think ?
Lucien
Le 29/07/2010 12:25, Moix Gregory a écrit :
I think it would be useful to add a task called 'test' which triggers test
process on files located in /test/files/scalacheck .
This could allow to only run a small subset of test files and will speed
up TDD development cycle.
What do you think ?
Lucien
Le 29/07/2010 12:25, Moix Gregory a écrit :
E127E571-7FC7-4865-8089-86E30DAFB47C [at] epfl [dot] ch" type="cite"> I'm happy to announce that the possibility to build Scala with SBT has now been added into trunk. There is now a "project/" directory that contains the SBT project definition.
Remarks : 1) The project definition is still in development stage. 2) There may be bugs and performance issues. 3) It uses SBT support for partial recompilation. 4) The project definition isn't yet able to do everything Ant is capable of. It can : - build all layers (library, actors, dbc, swing, compiler, salap and partest are compiled) - create palo and pack - generates the Scaladoc - generates the binaries files The following functionalities are not yet implemented : - partest running and stability testing - cleaning tasks - distribution creation
Feedback is highly appreciated.
More informations and usage instruction are available at http://lampsvn.epfl.ch/trac/scala/wiki/SBT
Grégory
Fri, 2010-09-24, 12:37
#6
Re: Building Scala with SBT
On 2010-07-29 12:25, Moix Gregory wrote:
> I'm happy to announce that the possibility to build Scala with SBT has
> now been added into trunk.
> There is now a "project/" directory that contains the SBT project
> definition.
I just did my first Scala build with this and found it really
straight-forward for an sbt user. Here are some things I noticed about
the build process and the wiki page
http://lampsvn.epfl.ch/trac/scala/wiki/SBT from my experience with
building Scala trunk (from git) on Windows (Win 7 with JDK 6u21 64-bit
HotSpot server VM):
- Subversion is not listed as a prerequisite. I was unable to start the
sbt project until I added svn to the path.
- The wiki suggests -Xmx1024M for sbt. I was able to build with that
setting but it's slow. Increasing the heap size to 1.5G brought the
build time for quick down from ~440s to ~250s. Increasing it further had
no noticeable effect. (I did not compare build times for the other stages)
- ExternalTaskRunner cannot start sbt.bat on Windows as "sbt" even
though it is on the path and can be launched that way from the command
line. Here's a quick and dirty fix:
diff --git a/project/build/ExternalTaskRunner.scala
b/project/build/ExternalTaskRunner.scala
index b99af1b..21c0042 100644
Remarks :1) The project definition is still in development stage.2) There may be bugs and performance issues.3) It uses SBT support for partial recompilation.4) The project definition isn't yet able to do everything Ant is capable of. It can : - build all layers (library, actors, dbc, swing, compiler, salap and partest are compiled) - create palo and pack - generates the Scaladoc - generates the binaries files The following functionalities are not yet implemented : - partest running and stability testing - cleaning tasks - distribution creation
Feedback is highly appreciated.
More informations and usage instruction are available at http://lampsvn.epfl.ch/trac/scala/wiki/SBT
Grégory