Building Leiningen and Circumspec from Trunk

It’s always the way that when you start learning a new technology you spend your entire time running into problems out of your comfort zone.  Getting Circumspec up and running was a particular challenge.  There’s two big problems:

  • Circumspec uses Clojure 1.2.0, which isn’t finished.
  • Worse, to lein repl, you need to compile Leiningen from trunk as well.
  • It doesn’t actually work on Windows.

These are solvable problems.  But it’s a bit of a nightmare.  First step, you’re going to need my modified lein.ps1 script.  If you’ve been following this thread, you’ll already have it, but I’ve fixed yet more problems with it (I can’t quite believe how much time I’ve spent on this thing.)

Compiling Leiningen from Trunk

So, from your root OSS folder (mine is d:juliandocumentsprojectsoss) type the following

git clone http://github.com/technomancy/leiningen.git
cd leiningen
lein deps
lein compile
lein uberjar

You should now see a file called leiningen-standalone.jar.  We need this for circumspec.

Compiling Circumspec from Trunk

Circumspec trunk doesn’t actually work under Windows.  So you’ll need to use my fix.

cd ..
git clone git://github.com/JulianBirch/circumspec.git
cd circumspec
lein deps
lein compile
lein jar
lein repl -clojureJar ..leiningenlibclojure-1.2.0-master-20100528.120302-79.jar -verbose -leinJar ..leiningenleiningen-standalone.jar

That last line is why you need the modified ps1 script.  You’ll now be in a Clojure trunk repl.

Now type (use ‘circumspec.watch)(watch).  You should see circumspec run its own tests.  You’ll also see that the colourizing code isn’t working, but that’s a problem for another time.

Technorati Tags: ,,

Published by

Julian Birch

Full time dad, does a bit of coding on the side.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s