implicit.ly

Scala software, hot off the presses

Simple Build Tool 0.11.2

sbt 0.11.2 is a bug fix release. See Changes for details.

An important change is that the local Maven repository has been removed from the launcher's list of default repositories, which is used for obtaining sbt and Scala dependencies. This is motivated by the high probability that including this repository was causing the problems some users have with the launcher not finding some dependencies.

sbt is a Scala build tool.

Filed under  //   Scala 2.9.1   Simple Build Tool   org.scala-tools.sbt  

Simple Build Tool 0.11.1

sbt 0.11.1 contains mainly bug fixes and minor features. There are some notable changes:

  • New Getting Started Guide and wiki reorganization
  • Task interruption using ctrl+c
  • Finer 'update' logging is on by default.
  • Improved memory usage and performance of incremental recompilation using an approached based on signature hashes.
  • Improved correctness of incremental recompilation, 'update' related caching, and transitive plugin dependencies.
  • Added inline API for excluding dependencies.
  • Improved functionality for advanced build manipulations, including inter-project dependency modification by a setting.

For task interruption, tasks must respond to the main thread being interrupted. In particular, a task must not ignore InterruptedException and must interrupt any threads it has started.

The previous behavior for 'update' logging may be enabled by setting 'ivyLoggingLevel := UpdateLogging.Quiet'.

See Changes for details.

sbt is a Scala build tool.

Filed under  //   Scala 2.9.1   Simple Build Tool   org.scala-tools.sbt  
Posted November 6, 2011 by harrah 

Simple Build Tool 0.11.0

Major Improvements:

  • Move to 2.9.1 for project definitions and plugins
  • Drop support for 2.7
  • Settings overhaul, mainly to make API documentation more usable
  • Support using native libraries in run and test (but not console, for example)
  • Automatic plugin cross-versioning. Use

    addSbtPlugin("group" % "name" % "version")

    in project/plugins.sbt instead of libraryDependencies += ... See Plugins for details

Fixes and Improvements:

  • Display all undefined settings at once, instead of only the first one
  • Deprecate separate classpathFilter, defaultExcludes, and sourceFilter keys in favor of includeFilter and excludeFilter explicitly scoped by unmanagedSources, unmanagedResources, or unmanagedJars as appropriate (Indrajit)
  • Default to using shared boot directory in ~/.sbt/boot/
  • Can put contents of project/plugins/ directly in project/ instead. Will likely deprecate plugins/ directory
  • Key display is context sensitive. For example, in a single project, the build and project axes will not be displayed
  • #114, #118, #121, #132, #135, #157: Various settings and error message improvements
  • #115: Support configuring checksums separately for publish and update
  • #118: Add about command
  • #118, #131: Improve last command. Aggregate last <task> and display all recent output for last
  • #120: Support read-only external file projects (Fred)
  • #128: Add skip setting to override recompilation change detection
  • #139: Improvements to pom generation (Indrajit)
  • #140, #145: Add standard manifest attributes to binary and source jars (Indrajit)
  • Allow sources used for doc generation to be different from sources for compile
  • #156: Made package an alias for package-bin
  • #162: handling of optional dependencies in pom generation

sbt is a Scala build tool.

Filed under  //   Scala 2.9.1   Simple Build Tool   org.scala-tools.sbt  

Simple Build Tool 0.10.1

  • Support "provided" as a valid configuration for inter-project dependencies #53
  • Try out some better error messages for build.sbt in a few common situations #58
  • Drop "Incomplete tasks ..." line from error messages. #32
  • Better handling of javac logging. #74
  • Warn when reload discards session settings
  • Cache failing classifiers, making 'update-classifiers' a practical replacement for withSources()
  • Global settings may be provided in ~/.sbt/build.sbt #52
  • No need to define "sbtPlugin := true" in project/plugins/ or ~/.sbt/plugins/
  • Provide statistics and list of evicted modules in UpdateReport
  • Scope use of 'transitive-classifiers' by 'update-sbt-classifiers' and 'update-classifiers' for separate configuration.
  • Default project ID includes a hash of base directory to avoid collisions in simple cases.
  • 'extra-loggers' setting to make it easier to add loggers
  • Associate ModuleID, Artifact and Configuration with a classpath entry (moduleID, artifact, and configuration keys). #41
  • Put httpclient on Ivy's classpath, which seems to speed up 'update'.

sbt is a Scala build tool.

Filed under  //   Scala 2.8.1   Simple Build Tool   org.scala-tools.sbt  
Posted July 14, 2011 by harrah 

Simple Build Tool 0.7.4

Fixes

  • Fixed issue with using 2.8.0.RC1 (or later) compiler in tests.
  • Fix FileUtilities.unzip to be tail-recursive again.
  • Honor -Xfatal-warnings option added to compiler in 2.8.0.RC2.
  • Derive Java source file from name of class file when no SourceFile attribute is present in the class file. Improves tracking when -g:none option is used.
  • Properly support sftp/ssh repositories using key-based authentication. See the updated section of the Resolvers page.

Improvements

  • Prefix continuous compilation with the run number. This useful when the logging level is 'warn', for example.
  • Added pomRepositoryFilter(repo: MavenRepository): Boolean that can be overridden to exclude repositories from the pom generated by make-pom
  • Added pomPostProcess(pom: Node): Node to make advanced manipulation of the default pom easier (pomExtra already covers basic cases).
  • Added reset command to reset JLine terminal. This needs to be run after suspending and then resuming sbt.
  • More accurate detection of invalid test names. Invalid test names now generate an error and prevent the test action from running instead of just logging a warning.
  • Precompile compiler interface against 2.8.0.RC2
  • Add consoleOptions for specifying options to the console. It defaults to compileOptions.
  • New section in launcher configuration [ivy] with a single label cache-directory. Specify this to change the cache location used by the launcher.
  • Added method ivyUpdateLogging to control logging level when running update. Override it to be UpdateLogging.DownloadOnly, Full, or Quiet. The default is DownloadOnly. Full will log metadata resolution and provide a final summary. Quiet only logs problems.
  • Make scaladocTask a fileTask so that it runs only when index.html is older than some input source.
  • Sort input source files for consistency, addressing scalac's issues with source file ordering.
  • offline property for disabling checking for newer dynamic revisions (like -SNAPSHOT). This allows working offline with remote snapshots. Not honored for plugins yet.

New Feature

  • Commands for working with history. Run ! to see history command help.

Compatibility

  • Plugins can now only be Scala sources. BND should be usable in a plugin now.

Simple Build Tool is a build tool for Scala projects that aims to do the basics well.

Filed under  //   Scala 2.7.7   Simple Build Tool   org.scala-tools.sbt  
Posted May 16, 2010 by harrah 

Simple Build Tool 0.7.3

Fixes

  • Fixed issue with scala.library.jar not being on javac's classpath.
  • Fixed buffered logging for parallel execution.
  • Fixed test-* tab completion being permanently set on first completion.
  • Works with Scala 2.8 trunk again (including the latest 2.8.0-SNAPSHOT).
  • The latest launcher should fix issues with retrieving Scala 2.8.0-SNAPSHOT versions.
  • sxr sources
  • Maven local repository excluded when the Scala version is a snapshot. This should fix issues with out of date Scala snapshots.

Improvements

  • Merged Seth's patch to invoke javac in the same jvm when tools.jar is on the classpath. Macs include tools.jar by default, Linux and Windows users would need to add it to their sbt startup script or explicitly add it to compileClasspath.
  • The compiler interface is precompiled against common Scala versions (for this release, 2.7.7 and 2.8.0.Beta1).
  • There have been some new methods added to Path and PathFinder recently, such as PathFinder.distinct
  • Running multiple commands at once at the interactive prompt is now supported. Prefix each command with ';'.
  • Run and return the output of a process as a String with !! or as a (blocking) Stream[String] with lines.

New Feature

  • Java tests + Annotation detection
  • Test frameworks can now specify annotation fingerprints. Specify the names of annotations and sbt discovers classes with the annotations on it or one of its methods. Use version 0.5 of the test-interface.
  • Detect subclasses and annotations in Java sources (really, their class files).

Compatibility

This section is important for users that work with the TestDefinition, AnalysisCallback, or CompileConfiguration classes in sbt.

  • Discovered is new root of hierarchy representing discovered subclasses + annotations. TestDefinition no longer fulfills this role.
  • TestDefinition is modified to be name+Fingerprint and represents a runnable test. It need not be Discovered and could be file-based in the future, for example.
  • Replaced testDefinitionClassNames method with fingerprints in CompileConfiguration.
  • Added foundAnnotation to AnalysisCallback.
  • Added Runner2, Fingerprint, AnnotationFingerprint, and SubclassFingerprint to the test-interface. Existing test frameworks should still work. Implement Runner2 to use fingerprints other than SubclassFingerprint.

Simple Build Tool is a build tool for Scala projects that aims to do the basics well.

Filed under  //   Scala 2.7.7   Simple Build Tool   org.scala-tools.sbt  
Posted April 6, 2010 by harrah 

Simple Build Tool 0.7.2

Fixes

  • Process.apply no longer uses CommandParser. This should fix issues with the android-plugin.
  • 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.
  • Fixed logging level behavior on subprojects.

Improvements

  • Added sbt.impl.Arguments for parsing a command like a normal action (for 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.
  • Can now use Launcher externally, including launching sbt outside of the official jar. This means a Project can now be created from tests.
  • 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 in a single github repository. Instructions for building from source have been updated.
  • Added webappUnmanaged: PathFinder method to DefaultWebProject. Paths 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" ***)

Simple Build Tool is a build tool for Scala projects that aims to do the basics well.

Filed under  //   Scala 2.7.7   Simple Build Tool   org.scala-tools.sbt  
Posted March 23, 2010 by harrah 

Simple Build Tool 0.7.1

Fixes

  • Fixed Jetty 7 support to work with JRebel
  • Fixed make-pom to generate valid repositories section

Simple Build Tool is a build tool for Scala projects that aims to do the basics well.

Filed under  //   Scala 2.7.7   Simple Build Tool   org.scala-tools.sbt  

Simple Build Tool 0.7.0

Major Features

  • Batch and interactive commands are now unifed. All commands that can be executed at the interactive prompt can be run from the command line. To run commands and then enter interactive prompt, make the last command 'shell'.
  • Scala version handling has been overhauled.

    • The version of Scala used to run sbt (currently 2.7.7) is decoupled from the version used to build the project
    • Easily change between Scala versions with ++<version>
    • Improved cross-building: project definition is only compiled against 2.7.7 instead of every Scala version cross-built against
    • Works with Scala 2.8.0.Beta1; however, classpath handling in Scala 2.8 trunk is changing and sbt currently cannot use 2.8 trunk to build projects until this settles
    • Using a local version of Scala is easier now.
  • Dependency management improvements:

    • make-pom task now uses custom pom generation code instead of Ivy's pom writer

      • Writes Maven-style repositories to the pom by default
      • Override the 'pomExtra' method to provide XML (scala.xml.NodeSeq) to insert directly into the generated pom
    • sbt's Ivy interface can be used directly (useful for implementing certain tasks)
  • Test framework support is now done through a uniform test interface. Implications:

    • New versions of specs, ScalaCheck, and ScalaTest are supported as soon as they are released
    • Stefan Zeiger has written an implementation for running JUnit
    • Support is better, since the test framework authors are the ones providing the implementation
    • Arguments can be passed to the test framework. In the simplest case: test-only your.test -- -a -b -c
  • Generalized the launcher to be able to launch Scala applications, not just sbt

    • Provide a configuration file to the launcher and it can download the application and its dependencies from a repository and run it
    • sbt's configuration can be customized. For example,

      • The default values used to create a new project can be changed
      • The repositories used to fetch sbt and its dependencies, including Scala, can be configured
      • The location that sbt is retrieved to is configurable. For example, instead of project/boot, /home/user/.ivy2/sbt/
      • Configurable method of project searching (previously configurable by system property)

Other Improvements

  • Jetty 7 support (doesn't work with JRebel at this time)
  • Control traces with 'on' 'off', 'nosbt', <level> (Thanks to Tony Sloane.)
  • New action 'test-run' method that is analogous to 'run', but for test classes.
  • New action 'clean-plugins' task that clears built plugins (useful for plugin development).
  • Can provide commands from a file with <file command (file is the name of the file to read from)
  • Can provide commands over loopback interface with <port command (port is the number to read commands from)
  • Launcher is allowed in root directory or lib/ directory (jar name must match 'sbt-launch.jar' and will be kept off classpath by default)
  • Compilation properly tracks certain types of synthetic classes (for comprehension with >30 clauses, for example)
  • Can provide custom task start and end delimiters by defining the system properties sbt.start.delimiter and sbt.end.delimiter

Migrating from 0.5.6

  • Get the 0.7.0 launcher and set it up as usual
  • In your project/build.properties

    • Rename scala.versionto build.scala.versions. If you previously overrode crossScalaVersions, just put the versions in build.scala.versions separated by whitespace.
    • Set sbt.version to 0.7.0
  • Check the compatibility section below

Compatibility with 0.5.6

  • Artifact IDs (like your project's jar and ID for publishing to repositories) and output paths (like target/ and lib_managed/) now have _ appended. To keep the old way, override def disableCrossPaths = true.
  • 'reboot' is gone, 'reload' now covers 'reboot'
  • Properties need to be declared lazy val instead of just val.
  • The way to fork run has changed due to reworking the Scala version handling. See Forking for details. Forking the compiler is no longer supported.
  • The project definition is always compiled against the version of Scala running sbt (currently, 2.7.7). It was previously the same as the version used to build the project.
  • The Ivy interface has been broken out into its own subproject and reworked. All functional tests pass, but please report any issues you encounter.
  • updateOptions has been replaced by overriding the appropriate methods directly. Some other advanced configuration options have changed- documentation pending.
  • Web application support was reworked. Please report any issues you encounter.
  • Test framework support is now done through the uniform test interface. If you manually manage your test dependencies, you will need the test-compat implementation of this interface. The earliest releases of test frameworks supported are:

    • specs: 1.6.1
    • ScalaCheck: 1.5
    • ScalaTest: 1.0

Other Notes

  • A message like 'compiler-interface' not compiled for '2.7.7' is sbt adapting to your build Scala version (and Java version). It takes 5-20s depending on your machine and is a one time compilation for a given Scala/Java version combination.
  • Version control is now done with git and the source code is hosted on Github. See the instructions for building it locally. Issue tracking and documentation are still on Google Code.
  • Reports of performance degradation or improvement in 0.7.0 are useful.
  • Regular documentation has been updated. API Documentation is pending.
  • Now using the posterous-sbt plugin to generate and publish release notes to http://implicit.ly/.

Simple Build Tool is a build tool for Scala projects that aims to do the basics well.

Filed under  //   Scala 2.7.7   Simple Build Tool   org.scala-tools.sbt