implicit.ly

Scala software, hot off the presses

posterous-sbt 0.1.7

Updated Dispatch and knockoff dependency versions. knockoff 0.8.0-16 does not require any extra Maven repositories, so sbt-posterous will not have to anymore either. Yay!

posterous-sbt is a plug-in for Simple Build Tool that automates publishing release notes to any Posterous site.

Filed under  //   Scala 2.7.7   dispatch   knockoff   net.databinder   posterous-sbt   sbt  

sbt-coverage 0.2

Release 0.2

This is a small update to sbt-coverage: an sbt code coverage processor which uses the undercover code coverage tool.

For an explanation of how to use it see the README on github.

Update

Thanks to Robert J. Macomber for a patch to allow the reports in coberturaxml and emmaxml to be selected instead of the default HTML format. For example:

coverage report html coberturaxml

...should product both HTML and Cobertura XML format outputs.

Apologies to Robert for the time it took for me to put his code online!!

Limitations

  1. Currently the code coverage is only carried out on the unit tests not on running the code. I would like a future version to allow code coverage of any normal sbt command so that you can carry out code coverage of specific tests on their own for some kinds of debugging exercises.
  2. The undercover code coverage tool makes no special provision for Scala code so the reports tend to be overloaded with references to the many classes the Scala compiler generates from your code.
  3. Scala case classes produce 'invisible' boiler plate code which, if not exercised directly by the tests, will appear as uncovered code in the report summaries. This leads to reports that imply that code is not fully covered despite all the explicit code have been exercised by the tests. I'm looking into a fix for this.

Feedback

I encourage feedback of all kinds. Ideally start by reporting bugs on the github bug tracking tool. However, also feel free to mail me: stuart dot roebuck @ proinnovate dot com. Or tweet me at stuey.

sbt-coverage is an sbt (simple-build-tool) processor which simplifies the generation of code coverage reports of Scala / Java project unit tests using the undercover code coverage tool.

This software is Copyright © 2011, Stuart Roebuck and licensed under a standard MIT license (more specifically referred to as the Expat license). See the LICENSE.md file for details.

Filed under  //   Scala 2.7.7   com.proinnovate   processor   sbt   sbt-coverage   undercover  

sbt-coverage 0.1

First public release

This is the first public release of sbt-coverage: an sbt code coverage processor which uses the undercover code coverage tool.

Please note that this tool relies on functionality added in sbt version 0.7.5.RC0. To upgrade your project to use this version, run sbt and enter:

> set sbt.version 0.7.5.RC0
...
> reload
...

To get started, start up sbt and enter the following commands at the sbt prompt:

> *undercoverRepo at http://undercover.googlecode.com/svn/maven/repository/
...
> *coverage is com.proinnovate sbt-coverage 0.1

This tells sbt where to find the undercover library and then loads the sbt-coverage processor and calls it coverage. From now onwards you should be able to run coverage within any sbt project on your machine. In other words, because it is an sbt processor (rather than a plugin) you do not need to install it into each project or make any changes to the configuration of the project.

So, if you now enter:

> coverage

This should run all your unit tests and produce a report that looks a bit like this and also drills down to listings of your source code with each line highlighted and with frequency counts on each line.

Example screen shot

Why use a code coverage tool

The code coverage tool instruments the class files of your Java and Scala code causing them to record which parts of the code are used when you run your unit tests. The report provides a top level report of which parts of your code where touched by the tests right down to listings of all your source with lines highlighted to indicate which lines were used and how many times they were used.

If you are trying to optimise your code the information on the number of times lines of your code are called can be one helpful input into the performance optimisation mix. The general readability of these reports and the quick and easy way of producing them makes this particularly attractive.

Limitations

Currently the code coverage is only carried out on the unit tests not on running the code. Also, at present, the undercover code coverage tool makes no special provision for Scala code so the reports tend to be overloaded with references to the many classes the Scala compiler generates from your code. I hope to offer some patches soon to tidy this up a bit.

Feedback

I encourage feedback of all kinds so please mail me: stuart dot roebuck @ proinnovate dot com. Or tweet me at stuey.

sbt-coverage is an sbt (simple-build-tool) processor which simplifies the generation of code coverage reports of Scala / Java project unit tests using the undercover code coverage tool.

This software is Copyright © 2011, Stuart Roebuck and licensed under a standard MIT license (more specifically referred to as the Expat license). See the LICENSE.md file for details.

Filed under  //   Scala 2.8.1   com.proinnovate   processor   sbt   sbt-coverage   undercover  

posterous-sbt 0.1.6

  • Duplicate checking contributed by softprops, to prevent the all too easy double-announcement.
  • check-publish-notes action checks that all conditions for publishing are satisfied, e.g. not a duplicate
  • Move utility functions outside of trait, into object to avoid collisions

posterous-sbt is a plug-in for Simple Build Tool that automates publishing release notes to any Posterous site.

Filed under  //   Scala 2.7.7   dispatch   knockoff   net.databinder   posterous-sbt   sbt  

posterous-sbt 0.1.5

Enhancements:

  • Tag preview contributed by softprops
  • changelog action contributed by bmc

Dependency updates:

posterous-sbt is a plug-in for Simple Build Tool that automates publishing release notes to any Posterous site.

Filed under  //   Scala 2.7.7   dispatch   knockoff   net.databinder   posterous-sbt   sbt  

posterous-sbt 0.1.4

Depends on the Knockoff 0.6.1-9 artifact for compatibility with Java 1.5 VMs.

posterous-sbt is a plug-in for Simple Build Tool that automates publishing release notes to any Posterous site.

Filed under  //   Scala 2.7.7   dispatch   knockoff   net.databinder   posterous-sbt   sbt  

posterous-sbt 0.1.3

  • Wrap "about" boilerplate in a div of class "about"
  • Include basic stylesheet in preview html to render about in italics

posterous-sbt is a plug-in for simple-build-tool that automates publishing release notes to any Posterous site.

Filed under  //   Scala 2.7.7   dispatch   knockoff   net.databinder   posterous-sbt   sbt   sbt-plugin  

posterous-sbt 0.1.2

  • Fix: about.markdown was looked for in the wrong directory; it should be found under notes/.
  • Made publishCurrentNotes a def so it won't (redundantly) appear in the actions list.

posterous-sbt is a plug-in for simple-build-tool that automates publishing release notes to any Posterous site.

Filed under  //   Scala 2.7.7   dispatch   knockoff   net.databinder   posterous-sbt   sbt  

posterous-sbt 0.1.1

  • Strip any -SNAPSHOT suffix from the current version when looking for release notes
  • Ability to specify notes for a project version other than the current
  • Depend on release version of Dispatch 0.7.0
  • Include title in notes preview

Version specifiers are optional, default is current version with any -SNAPSHOT suffix removed:

> preview-notes
> preview-notes 0.1.0
> publish-notes
> publish-notes 0.1.0

posterous-sbt is a plug-in for simple-build-tool that automates publishing release notes to any Posterous site.

Filed under  //   Scala 2.7.7   dispatch   knockoff   net.databinder   posterous-sbt   sbt  

posterous-sbt 0.1.0

Initial release:

  • Publication of current release notes from notes/
  • Append notes/about.markdown for linking back to project home
  • Preview release notes in a browser
  • Check publishing credentials
  • Handle a lot of error conditions with helpful messages!

posterous-sbt is a plug-in for simple-build-tool that automates publishing release notes to any Posterous site.

Filed under  //   Scala 2.7.7   dispatch   knockoff   net.databinder   posterous-sbt   sbt