Skip to content

Is the current default for --[no-]system-ghc the most appropriate? #6580

Open
@mpilgrem

Description

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.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions