[Haskell-cafe] how to prevent 'stack' from installing 'ghc'?

Michael Snoyman michael at snoyman.com
Sun Jun 10 13:54:04 UTC 2018


You can use the install-ghc option, either in your stack.yaml, or on the
command line.

On Sun, Jun 10, 2018, 6:52 AM Johannes Waldmann <
johannes.waldmann at htwk-leipzig.de> wrote:

> Dear Cafe,
>
>
> 'stack'  tries to download and install a  'ghc'  binary
> in case  'ghc'  in  $PATH  does not match
> what is needed for the resolver given in  'stack.yaml'
>
> How can I switch this off completely and reliably?
> I much rather  'stack'  just fails when it detects the mismatch.
> putting  'system-ghc: true'  in  'stack.yaml'
> and  '~/.stack/config.yaml'  apparently is not enough.
>
>
> 'stack'  does warn before downloading,
> but sometimes I'm not seeing the warning,
> e.g., because the whole thing is triggered silently
> from using  'intero'.
>
>
> I do have several ghc executables (built from source)
> in  /opt/ghc/ghc-$version/bin/ghc
> and I just need to set  PATH  accordingly.
>
> It would be even better if I could tell
> 'stack'  (once and for all) about these locations.
>
>
> I think I understand why  'stack'  does what it does
> (reproducible builds) but I really want to minimize
> the number of other people's binaries on my machine.
> I do use the auto-download feature for easier CI builds -
> so I agree it can be useful.
>
>
> - J.W.
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180610/b1693b47/attachment.html>


More information about the Haskell-Cafe mailing list