Hacker News new | ask | show | jobs
by louthy 3859 days ago
I think cabal is the primary reason why I do far less Haskell coding than I'd like. Coming back to projects to find that they've suffered from severe 'code rot', even when sandboxing. Then finding it basically impossible to recover from because some library version somewhere isn't happy, but the only thing that's reported are cryptic error messages. I've previously had to rebuild my dev environment from scratch on both OSX and Windows because of unrecoverable issues. It is frustrating in the extreme.

I'm not a hugely experienced Haskeller, so I've almost certainly made 'classic mistakes', but as a system it is so unstable that I couldn't really commit to any large projects, which is a shame, because I really, really rate Haskell as a language.

In stepped F#, and although not as nice a language Haskell, the tooling works. It would be great to see this resolved once and for all.

2 comments

Luckily, Stack [1] allays a lot of the reproducible build hell that Cabal sometimes provides. I would highly recommend trying Stack out before deciding that the Haskell package management system is a dealbreaker for you. More and more open source projects are using it - and if they aren't, perhaps that could make a good first contribution to a larger project (if you're having build trouble with vanilla Cabal, others probably are as well).

[1]: https://github.com/commercialhaskell/stack

And converting Cabal projects to Stack is really easy: at least for the simple projects I've tried Stack's automated conversion tool did all the work.
Thanks for the heads up, I will take a look :)
The developers are stack will be really, really happy to hear your thoughts, when you used stack.

(I know this because they kept following up with me a few times, until I finally got around to giving it a try.)

You might want to look into Nix for Haskell development. Nix a pure, lazy, functional DSL for describing packages and dependencies, and thus naturally attractive to Haskellers. As a result, there's good support for Haskell in the nixpkgs package collection, and helpful folks on the mailing list if you run into trouble. Stateless, deterministic builds are what nix is all about!