atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Consistent environment #129

Closed robrix closed 8 years ago

robrix commented 8 years ago

This PR uses the consistent-env module to avoid needing to set up the PATH variable (and the rest of the environment) in haskell-ghc-mod.

This resolves certain issues where subtly different environments between the CLI and haskell-ghc-mod causes stack to endlessly build and rebuild.

robrix commented 8 years ago

friendly bump — any thoughts, @lierdakil?

lierdakil commented 8 years ago

I think Atom 1.7 should fix OSX environment issue (at least for the most part): https://github.com/atom/atom/pull/11054

Which probably makes this a bit redundant.

Package settings were intended as a way to use ide-haskell even without fiddling with system environment, which can be useful in some cases. I was also working on being able to change parts of environment on the fly (but that is some ways off still), for example to test cabal builds with different ghc versions. So removing those is out of the question. As is ignoring them.

Note that how consistent-env does things can lead to all kinds of subtle breakage due to sourcing rc scripts in non-interactive shells. It also won't work with fish if XDG_CONFIG_HOME is non-standard. So I don't think that using it is a particularly good idea.

robrix commented 8 years ago

Okay :+1: Thanks for considering it!