Thursday, June 12, 2014

Haskell build automation: alternatives to Cabal

In the previous post I've talked about issues that Cabal has. Now it is time to talk about what alternatives there are.

Existing tools: task management

Haskell can work with various task automation tools, starting with good old make. Among the tools written in Haskell nemesis and shake definitely worth mentioning.

One problem with task management tools is that one has to create work flow for them, they don't mandate anything or come with any predefined tasks. A bigger problem is that they still require `global' dependencies, so building with different versions of the same library would be as painful as it is with Cabal.

Some workaround would be to create some project-carving tool, like Jeweler or Hoe in Ruby. That would introduce a work flow and will set up important tasks, like mandatory testing, but will not help with dependencies. Well, actually the tool can incorporate dependency resolution task, but that will make it almost identical to work flow solutions discussed below.

Solutions yet to be implemented: standard work flow

More drastic approach is to implement a work flow based tool similar to Maven. Standard work flows are a great thing, especially when project needs to be packaged in a particular way, or one wants to ensure that tests are ran every time a build is done.

That also has more potential for fixing dependencies, because if fetching dependencies is part of the work flow, then they can be stored and compiled (assuming that they are distributed as source code) locally.

As a solution one can implement a Haskell plugin for an existing tool, like Maven or Gradle. That would be as hard as writing it from scratch, since those are heavily geared towards compiling to Java bytecode. Also, those tools are not implemented in Haskell, and I would like to show that Haskell is can stand up to a project like this.

So I personally really like the idea of implementing a `conventions and standard work flows' build automation tool in Haskell. I will try to give this a shot, but it will be a big effort, so we'll see what happens.

Monday, May 26, 2014

Haskell build automation: Cabal

Disclaimer

The purpose of this and the following posts is to evaluate options for build automation tools for Haskell, and propose possible solutions for improving developer experience and facilitating test-driven development.

This post is solely based on my opinion, which is affected by my experience with other tools, mostly Maven and Make. I believe that having a good build automation tool makes a big impact on developer experience and code quality. I think improving build automation is easier and more beneficial than enabling continuous integration using a faulty build tool.

I don't have an intention to criticize anyone or the software they are contributing to. I think Cabal is a great tool for creating and sharing packages, but I would like to look at it in relation to build automation.

Monday, July 6, 2009

Test test test test test