From d5b0071eeb1505b6a2f4e05b5da5cca36b11688d Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Fri, 26 Mar 2010 07:51:56 -0400 Subject: [PATCH 1/3] release notes for 0.7.2 --- sbt/notes/0.7.2.markdown | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sbt/notes/0.7.2.markdown b/sbt/notes/0.7.2.markdown index 6af580fad..e193f9081 100644 --- a/sbt/notes/0.7.2.markdown +++ b/sbt/notes/0.7.2.markdown @@ -3,17 +3,15 @@ * Arguments are passed to javac using an argument file (@). This should fix errors on Windows caused by long command lines. * Fixed `console-project` for custom subprojects * Works with Scala 2.8 trunk again. -* API Documentation is up again. +* [API Documentation](http://simple-build-tool.googlecode.com/svn/artifacts/latest/api/index.html) is up again. * Fixed logging level behavior on subprojects. ### Improvements -* Added `sbt.impl.Arguments` for parsing a command like a normal action (for [http://code.google.com/p/simple-build-tool/wiki/Processors Processors]) -* `Processor` split into `Processor`/`BasicProcessor`. `Processor` provides a high level of integration with command processing. `BasicProcessor` operates on a `Project` but does not affect command processing. See the API documentation for the signature change. +* Added `sbt.impl.Arguments` for parsing a command like a normal action (for [Processors](http://code.google.com/p/simple-build-tool/wiki/Processors)) +* `Processor` split into `Processor`/`BasicProcessor`. `Processor` provides a high level of integration with command processing. `BasicProcessor` operates on a `Project` but does not affect command processing. See the [API documentation](http://simple-build-tool.googlecode.com/svn/artifacts/latest/api/sbt/processor$package.html) for the signature change. * Can now use Launcher externally, including launching sbt outside of the official jar. This means a `Project` can now be created from tests. -* Added `webappUnmanaged: PathFinder` method to `DefaultWebProject`. `Path`s selected by this `PathFinder` will not be pruned by `prepare-webapp` and will not be packaged by package. For example, to exclude the GAE datastore directory: -{{{ - override def webappUnmanaged = - (temporaryWarPath / "WEB-INF" / "appengine-generated" ***) -}}} * Added some String generation methods to `PathFinder`: `toString` for debugging and `absString` and `relativeString` for joining the absolute (relative) paths by the platform separator. -* All sbt code is now at http://github.com/harrah/xsbt in one project. Instructions for building from source have been updated. \ No newline at end of file +* All sbt code is now in a [single github repository](http://github.com/harrah/xsbt). Instructions for building from source have been updated. +* Added `webappUnmanaged: PathFinder` method to `DefaultWebProject`. `Path`s selected by this `PathFinder` will not be pruned by `prepare-webapp` and will not be packaged by package. For example, to exclude the GAE datastore directory: + + override def webappUnmanaged = (temporaryWarPath / "WEB-INF" / "appengine-generated" ***) \ No newline at end of file From 27816f32f62537aff4590cecf4e2eb07fba84cc0 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Fri, 26 Mar 2010 07:55:02 -0400 Subject: [PATCH 2/3] Jason's patch to work with latest changes to CompilerCommand --- LICENSE | 2 +- NOTICE | 2 +- compile/NOTICE | 2 +- compile/interface/Command.scala | 23 +++++++++++++++++++++++ compile/interface/CompilerInterface.scala | 5 +++-- compile/interface/ScaladocInterface.scala | 4 ++-- 6 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 compile/interface/Command.scala diff --git a/LICENSE b/LICENSE index 27b5d6df2..7b09b8ec6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2008, 2009, 2010 Mark Harrah +Copyright (c) 2008, 2009, 2010 Mark Harrah, Jason Zaugg All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/NOTICE b/NOTICE index 27a575311..4dd573949 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Simple Build Tool (xsbt) -Copyright 2008, 2009, 2010 Mark Harrah +Copyright 2008, 2009, 2010 Mark Harrah, Jason Zaugg Licensed under BSD-style license (see LICENSE) Portions based on code from the Scala compiler. Portions of the Scala diff --git a/compile/NOTICE b/compile/NOTICE index 8d681ea2e..8b92ad19e 100644 --- a/compile/NOTICE +++ b/compile/NOTICE @@ -1,3 +1,3 @@ Simple Build Tool: Compile Component -Copyright 2009, 2010 Mark Harrah +Copyright 2009, 2010 Mark Harrah, Jason Zaugg Licensed under BSD-style license (see LICENSE) \ No newline at end of file diff --git a/compile/interface/Command.scala b/compile/interface/Command.scala new file mode 100644 index 000000000..d42b64ec3 --- /dev/null +++ b/compile/interface/Command.scala @@ -0,0 +1,23 @@ +/* sbt -- Simple Build Tool + * Copyright 2010 Jason Zaugg + */ +package xsbt + + import scala.tools.nsc.{CompilerCommand, Settings} + +object Command +{ + /** + * Construct a CompilerCommand using reflection, to be compatible with Scalac before and after + * r21274 + */ + def apply(arguments: List[String], settings: Settings): CompilerCommand = { + def constr(params: Class[_]*) = classOf[CompilerCommand].getConstructor(params: _*) + try { + constr(classOf[List[_]], classOf[Settings]).newInstance(arguments, settings) + } catch { + case e: NoSuchMethodException => + constr(classOf[List[_]], classOf[Settings], classOf[Function1[_, _]], classOf[Boolean]).newInstance(arguments, settings, error _, false.asInstanceOf[AnyRef]) + } + } +} \ No newline at end of file diff --git a/compile/interface/CompilerInterface.scala b/compile/interface/CompilerInterface.scala index 04ce28417..b41a5fe75 100644 --- a/compile/interface/CompilerInterface.scala +++ b/compile/interface/CompilerInterface.scala @@ -11,13 +11,14 @@ class CompilerInterface { def run(args: Array[String], callback: AnalysisCallback, maximumErrors: Int, log: Logger) { - import scala.tools.nsc.{CompilerCommand, Global, Settings} + import scala.tools.nsc.{Global, Settings} debug(log, "Interfacing (CompilerInterface) with Scala compiler " + scala.tools.nsc.Properties.versionString) val reporter = new LoggerReporter(maximumErrors, log) val settings = new Settings(reporter.error) - val command = new CompilerCommand(args.toList, settings, error, false) + + val command = Command(args.toList, settings) val phasesSet = new scala.collection.mutable.HashSet[Any] // 2.7 compatibility object compiler extends Global(command.settings, reporter) diff --git a/compile/interface/ScaladocInterface.scala b/compile/interface/ScaladocInterface.scala index 9c3bb66c9..2e541c8d5 100644 --- a/compile/interface/ScaladocInterface.scala +++ b/compile/interface/ScaladocInterface.scala @@ -12,10 +12,10 @@ class ScaladocInterface } private class Runner(args: Array[String], maximumErrors: Int, log: Logger) { - import scala.tools.nsc.{doc, CompilerCommand, Global} + import scala.tools.nsc.{doc, Global} val reporter = new LoggerReporter(maximumErrors, log) val docSettings: doc.Settings = new doc.Settings(reporter.error) - val command = new CompilerCommand(args.toList, docSettings, error, false) + val command = Command(args.toList, docSettings) import forScope._ def run() From d13520b164958f999833a7eb8aa975f937acc686 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Fri, 26 Mar 2010 08:19:39 -0400 Subject: [PATCH 3/3] clarification in NOTICE --- NOTICE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NOTICE b/NOTICE index 4dd573949..63326efeb 100644 --- a/NOTICE +++ b/NOTICE @@ -1,4 +1,4 @@ -Simple Build Tool (xsbt) +Simple Build Tool (xsbt components other than sbt/) Copyright 2008, 2009, 2010 Mark Harrah, Jason Zaugg Licensed under BSD-style license (see LICENSE)