Stack should hide GHCRTS environment variable #3444
Closed
Labels
Milestone
Comments
mgsloan
added a commit
that referenced
this issue
Sep 20, 2017
mgsloan
added a commit
that referenced
this issue
Sep 20, 2017
Also, there is another small behavior change here, which is that when ghcjs-boot is run, UTF8 locale environment variables get set. I hope this only fixes things, rather than breaking anything!
snoyberg
added a commit
that referenced
this issue
Nov 27, 2017
Drop GHCRTS envvar unless user is asking for execution #3444
Addressed by #3445 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This stackoverflow question brings up a case of trying to run
stack runghc
with GHCRTS set, in an attempt to get RTS arguments passed to the user's program. Passing in-N
fails becauseghc-pkg
isn't built with-threading
. I don't think it makes sense to pass the GHCRTS environment variable through to every haskell program stack invokes, it is too blunt of a hammer. Instead, users can use things like--haddock-arguments
,--ghc-options
, etc.Unfortunately it looks like there is no "proper" way to pass RTS options through runghc - see this other stackoverflow question
I think it makes sense to only pass
GHCRTS
through for the programs run viastack exec
/stack runghc
/stack runhaskell
/stack script
/stack ghci
/stack repl
/stack eval
.Note that there's no avoiding stack itself also getting these RTS arguments. In the case of ghc, the RTS arguments will be used by stack, ghc, and the program that gets run. So, this is indeed quite a hack. Would be good to get this fixed in ghc itself.
One thing that occurs to me is that it might be good to have a
STACK_GHCRTS
var, to allow specifying GHCRTS without. Alternatively, maybe this should just be a commandline options. Thoughts?The text was updated successfully, but these errors were encountered: