Some instructions for those wishing to contribute to ducttape development:
To get a local copy of ducttape:
git clone git:github.com/jhclark/ducttape.git
First, download the correct version of Eclipse (3.6 Helios seems to fair better than 3.7 Indigo as of April 2012) and the version of the Scala IDE plug-in for Scala 2.9. The newest version of Eclipse isn't always supported, so you might end up with multiple versions of Eclipse on your machine. See http://scala-ide.org/download/current.html. We recommend using a fresh Eclipse directory (without any other plug-ins) and a fresh workspace for your Scala projects.
mkdir workspace # The directory to be used by your Scala Eclipse
cd workspace
git clone git:github.com/jhclark/ducttape.git
mkdir ducttape/lib
cp /path/to/scalatest-1.7.1.jar ducttape/lib
Now, open Eclipse using the workspace you just created. Perform File..Import..General..Existing Projects into Workspace. Select workspace as the root directory of the project to import, make sure that the ducttape project is selected, then click Finish. Eclipse should now compile the code. Once Eclipse has completed building the workspace, exit Eclipse. Re-open Eclipse, and you should be good to go. To verify, open ducttape.scala in the scala directory, and select Run As..Scala Application.
Now import the project into the workspace from GitHub. Right click in the Package Explorer and select Import. In the Import dialog, select Git -> Projects from Git. Next, select URI. In the Source Git Repository tab, fill out the following:
- Under Location -> URI, type https://$[email protected]/jhclark/ducttape.git. Where $USER is your github username. The Host and Repository path fields will be automatically filled out for you.
- Protocol is https
- Don't change the user or password
Finally, select Import existing projects.
If you wish to develop from the command line, you should use either the emacs or vi syntax highlighting mode that is distributed with Scala. Ducttape requires Scala 2.10 and the Zinc compiler to be installed on your system (see https://github.com/typesafehub/zinc).
To build ducttape from the command line, use:
./build-support/build.sh
This will build a minimized JAR file called ducttape.jar.
Use the following commands to test:
./build-support/test-unit.sh
./build-support/test-regression.sh
We recommend reading this guide as a starting place for Scala stype: http://davetron5000.github.com/scala-style/
Ducttape code should wrap after no more than 120 characters. If you can't fit more than 80 characters wide on your screen, please buy a new monitor. Generally, functions should fit within about 40-50 lines (aka, a screenfull). Shorter is usually better. There's plenty of ducttape code that breaks this rule. When possible, fix.
Source code should be commented using ScalaDoc standards. See https://wiki.scala-lang.org/display/SW/Scaladoc.
./build-support/sbt compile
./build-support/jar.sh
This will produce ducttape.jar.
To generate the tutorial documentation as doc/doc.pdf:
./build-support/doc.sh
To generate scaladoc:
./build-support/scaladoc.sh
To test low level data structures, run:
TODO (Currently Eclipse JUnit is used)
To test high-level functionality, run:
./test-regression.sh
This will run all of the example files associated with the tutorial, which also serve as regression tests.