Building 0.19 from source?

Has anyone had success building 0.19 from source? 0.18 had guides for this and the buildFromSource.hs script, but this is gone in 0.19, as is any mention of building in the README or the Install page of the docs.

I’ve tried using Stack with lts-11.22, but I get weird errors about “Map.!: given key is not an element in the map”, that seem to be related to how ui/terminal/Develop/SourceFiles.hs is using TemplateHaskell to embed the elm-compiler statically.

Running cabal install with GHC 8.4.4 (i.e. Haskell Platform in Ubuntu 19.04) gives a dependency error.

Does anyone know what’s going on with the TemplateHaskell? Is it looking for files in ~/.elm that don’t exist? Is there an “off the books” guide to compiling Elm from scratch?

You can use the instructions provided here. Note, that you can either

  • use our fork, which adds a few convenience features to the reactor and merges a pr that fixes the Map.!: given key.. bug
  • or use the elm compiler at tag 0.19.0

You will very likely fail to build from the current master.

4 Likes

This link for building instruction seems like a troll

I still get the error on the 0.19 tag, but the fork works perfectly! Thanks, this is a lifesaver!

1 Like