LoCo Day 10

Today’s roadblock came courtesy of the aeson package, or one of its recursive dependencies. I wanted to try using it instead of json to generate JSON, since the programmatic interface seemed a bit simpler and more elegant. Alas, one of aeson’s dependencies doesn’t work due to a bug in GHC. Also, possibly as a result of that same bug, the act of installing the package screwed up the rest of GHC’s package repository to the point where it could no longer find all the other packages that had been installed, and reinstalling them mysteriously broke other unrelated packages too. I finally had to nuke the whole thing and install all the packages I’m interested in from scratch.

Then, of course, I tried installing aeson again to see if maybe the repository corruption was a weird fluke. It wasn’t.

So, I sunk a lot of today’s development time messing with that. Needless to say, I’ve kicked aeson aside and went back to using json.

A third of the way into November, I must say I’m much farther behind than I expected I would be. I still haven’t worked on the actual game part of this game; it’s all been setup and infrastructure stuff. Sigh.

3 Responses

  1. Use aeson-native instead of aeson. It was created specifically to work around this issue.

  2. That only solves half the problem, unfortunately. When I install aeson-native, GHC forgets that happstack-server is installed. When I install happstack-server, GHC forgets that aeson-native is installed. For some reason installing one breaks the other due to some weird dependency issues with text- I don’t know exactly what’s going on to cause that, especially since I never get any errors when installing any of the packages, though they do keep insisting on reinstalling text-

  3. Ahh, yes. Fixing that issue really needs support from the library you’re using. I believe Snap and Yesod do this, but apparently Happstack doesn’t. You might be able to work around it by building one of the libraries with an appropriate constraint flag. Figuring out what constraint is needed can be difficult though.

    Another thing that has worked to solve this problem for me in the past is “cabal install blaze-textual –reinstall -fnative”. We have that listed on http://snapframework.com/faq if you forget the exact line and need to refer back to it.

Comments are closed.