Motivation: A discussion on Matrix about the merits and drawbacks of the current default (--no-system-ghc).
--system-ghc asks Stack to try and use the GHC on the path, if it exists and is the appropriate version. (The compiler-check: configuration tailors what is 'appropriate') This may avoid Stack creating a duplicate GHC elsewhere (if it has not already done so).
History:
The current default has applied since Stack 1.3.0 (released 2016-12-12).
(The default compiler-check: match-minor matches GHC X.Y.Z, but allows patch-level differences. So, in the case of GHC release candidates, GHC 9.10.0.20240413 and GHC 9.10.0.20240426 (for example) are not distinguished by default.)
Certain GitHub-hosted runners come with GHC on the PATH (currently, not macos-latest or macos-13). However, that is only useful in practice if the GHC version in question is specified by a Stackage snapshot. Currently, GitHub provides GHC 9.10.1 but that is not specified by any snapshot.
In the case of CI scripts, Stack provides stack config set system-ghc [--global] true.
Motivation: A discussion on Matrix about the merits and drawbacks of the current default (
--no-system-ghc).--system-ghcasks Stack to try and use the GHC on the path, if it exists and is the appropriate version. (Thecompiler-check:configuration tailors what is 'appropriate') This may avoid Stack creating a duplicate GHC elsewhere (if it has not already done so).History:
The current default has applied since Stack 1.3.0 (released 2016-12-12).
(The default
compiler-check: match-minormatches GHC X.Y.Z, but allows patch-level differences. So, in the case of GHC release candidates, GHC 9.10.0.20240413 and GHC 9.10.0.20240426 (for example) are not distinguished by default.)Certain GitHub-hosted runners come with GHC on the PATH (currently, not
macos-latestormacos-13). However, that is only useful in practice if the GHC version in question is specified by a Stackage snapshot. Currently, GitHub provides GHC 9.10.1 but that is not specified by any snapshot.In the case of CI scripts, Stack provides
stack config set system-ghc [--global] true.