I’ve been updating the libraries and tools that I use for my project lately.
Initially this started with upgrades to Scala 2.8. I haven’t explored it much other than the use of default values in method parameters, but it’s nice to be on the latest and greatest — especially since I’m told that 2.8 .class files are not compatable with 2.7.
I had lift 2.0 working briefly, but am now on Lift 2.1. I’m not using Lift extensively enough yet to notice much difference between 1.x and 2.x (with one exception noted below), but again it’s nice just to be using the latest versions, as it will hopefully mean less difficulty keeping up with this family of technology down the road.
The upgrade to Lift 2.0 co-occurred with the move to SBT 0.7.4 from maven. The continuous ~jetty-run and ~compile frequently result in out of memory exceptions, but triggering those actions on demand is quick enough. I much prefer sbt’s LiftProject.scala to maven’s pom.xml.
Following the best practices I found in other sbt projects, I’ve adopted TDD / BDD via the specs 1.6.5 library. I like the English-like syntax for making assertions, though I don’t fully grok the setup/teardown flow of the test harness. I’ll figure this out eventually. I also don’t understand how to log during testing without resorting to printing to stdout or some other file that I manage myself.
I’ve had difficulty getting the scala Eclipse plugin to work as well as I want, so I actually had gone back to emacs 22.3.1 (carbon version 1.6.0) on mac os x as my editor. At least it was fast if not fully language aware. I’ve seen a lot of references to emacs in scala-related discussions, so I figured I was in good company.
The biggest change of all, as far as I’m concerned, is a discovery from last weekend, which I originally noticed from a David Pollack tweet: ensime 2.8.1-SNAPSHOT-0.3.2. There’s a video demo available:
The author is maintaining a blog in the subject as well. I wasn’t aware that Scala’s “presentation compiler” was this powerful. I haven’t taken a good hard look into it, but it makes me wonder what’s left for a GUI IDE to implement. Ensime pretty much does everything I need an IDE to do. Some features aren’t as “ambiently findable” as they would be with a GUI tool, but this is par for the course for emacs. But given the zippiness of the editor, I think this is a reasonable tradeoff. I hope Ensime will have many years of continued evolution.
Note: I have encountered a mysterious “missing dependency” problem when using Ensime to edit my Lift project that started as a Lift 1.x site. I narrowed the problem down to my snippet’s
toList(redraw: () => JsCmd)(html: NodeSeq): NodeSeq methods — which I had originally modelled after some sample code on the lift site — but have not yet determined what is is about them that gives Ensime problems.