Skip to content

Commit eb5a919

Browse files
committed
Merge branch 'stable'
2 parents 70ad620 + 5562672 commit eb5a919

2 files changed

Lines changed: 59 additions & 18 deletions

File tree

doc/configure/global_flags.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,22 @@ version of its built-in Hpack library to the standard output stream (e.g.
145145
## `--[no-]install-ghc` flag
146146

147147
Default: Enabled
148+
([:octicons-tag-24: 1.6.1](https://github.com/commercialhaskell/stack/releases/tag/v1.6.1))
148149

149-
Enables/disables the download and installation of GHC when necessary. On
150-
Windows, `--no-install-ghc` also disables the download and installation of the
151-
Stack-supplied MSYS2 when necessary. For further information, see the
150+
If the specified GHC version is not available, enables/disables Stack seeking to
151+
download and install that version if it is needed. On Windows,
152+
`--no-install-ghc` also disables the download and installation of the
153+
Stack-supplied MSYS2 when it is needed. For further information, see the
152154
documentation for the corresponding non-project specific configuration
153155
[option](yaml/non-project.md#install-ghc).
154156

157+
!!! note
158+
159+
The `--[no-]install-ghc` flag does not specify whether Stack checks the
160+
availability of either a 'system' GHC executable on the PATH or a
161+
Stack-supplied GHC executable. In that regard, see the
162+
[`system-ghc`](yaml/non-project.md#system-ghc) option.
163+
155164
## `--[no-]install-msys` flag
156165

157166
[:octicons-tag-24: 3.5.1](https://github.com/commercialhaskell/stack/releases/tag/v3.5.1)
@@ -329,9 +338,18 @@ configuration file.
329338
## `--[no-]system-ghc` flag
330339

331340
Default: Disabled
341+
([:octicons-tag-24: 1.3.0](https://github.com/commercialhaskell/stack/releases/tag/v1.3.0))
342+
343+
Enables/disables Stack seeking to use a 'system' GHC executable (that is, one on
344+
the PATH) rather than a Stack-supplied GHC executable (or vice versa, if
345+
disabled). For further information, see the documentation for the corresponding
346+
non-project specific configuration [option](yaml/non-project.md#system-ghc).
347+
348+
!!! note
332349

333-
Enables/disables the use of a GHC executable on the PATH, if one is available
334-
and its version matches.
350+
The `--[no-]system-ghc` flag does not specify Stack's behaviour if the
351+
specified GHC version is not already available. In that regard, see the
352+
[`install-ghc`](yaml/non-project.md#install-ghc) option.
335353

336354
## `--[no-]terminal` flag
337355

doc/configure/yaml/non-project.md

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ See [`setup-info`](#setup-info).
627627
so `stack setup` knows where to download it,
628628
or pass the `stack setup --ghc-bindist` argument on the command-line
629629

630-
This option is incompatible with `system-ghc: true`.
630+
This option is incompatible with [`system-ghc: true`](#system-ghc).
631631

632632
## global-hints-location
633633

@@ -732,14 +732,29 @@ will receive a warning if this configuration value is set.
732732
## install-ghc
733733

734734
Default: `true`
735-
([:octicons-tag-24: 1.5.0](https://github.com/commercialhaskell/stack/releases/tag/v1.5.0))
735+
([:octicons-tag-24: 1.6.1](https://github.com/commercialhaskell/stack/releases/tag/v1.6.1))
736736

737737
Command line equivalent (takes precedence):
738738
[`--[no-]install-ghc`](../global_flags.md#-no-install-ghc-flag) flag
739739

740-
Whether or not to download and install GHC when necessary. On Windows,
741-
`install-ghc: false` also disables the download and installation of the
742-
Stack-supplied MSYS2 when necessary.
740+
If the specified GHC version is not available, (if `true`) should Stack seek to
741+
download and install that version when it is needed or (if `false`) fail
742+
(reporting that the specified compiler is not available)?
743+
744+
~~~yaml
745+
# Even if needed, do not seek to download and install a Stack-supplied GHC:
746+
install-ghc: false
747+
~~~
748+
749+
On Windows, `install-ghc: false` also disables the download and installation of
750+
the Stack-supplied MSYS2 when it is needed.
751+
752+
!!! note
753+
754+
The `install-ghc` option does not specify whether Stack checks the
755+
availability of either a 'system' GHC executable on the PATH or a
756+
Stack-supplied GHC executable. In that regard, see the
757+
[`system-ghc`](#system-ghc) option.
743758

744759
## install-msys
745760

@@ -754,7 +769,7 @@ Command line equivalent (takes precedence):
754769
[`--[no-]install-msys`](../global_flags.md#-no-install-msys-flag) flag
755770

756771
If Stack is checking for the Stack-supplied MSYS2 when Stack is setting up the
757-
environment, whether or not to download and install MSYS2 when necessary.
772+
environment, whether or not to download and install MSYS2 when it is needed.
758773

759774
To skip entirely checking for the Stack-supplied MSYS2, see the documentation
760775
for the [`skip-msys`](#skip-msys) configuration option.
@@ -1476,22 +1491,30 @@ stack-developer-mode: false
14761491

14771492
## system-ghc
14781493

1479-
Default: `false`, unless the [Docker](../../topics/docker_integration.md) or
1494+
Default: `false`
1495+
([:octicons-tag-24: 1.3.0](https://github.com/commercialhaskell/stack/releases/tag/v1.3.0)),
1496+
unless the [Docker](../../topics/docker_integration.md) or
14801497
[Nix](../../topics/nix_integration.md) integration is enabled.
14811498

14821499
Command line equivalent (takes precedence): `--[no-]system-ghc` flag
14831500

1484-
Enables or disables using the GHC available on the PATH. (Make sure PATH is
1485-
explicit, i.e., do not use ~.) Useful to enable if you want to save the time,
1486-
bandwidth or storage space needed to setup an isolated GHC.
1487-
1488-
In a Nix-enabled configuration, Stack is incompatible with `system-ghc: false`.
1501+
Should Stack seek to use (if `true`) a 'system' GHC executable (that is, one on
1502+
the PATH) or (if `false`) a Stack-supplied GHC executable?
14891503

14901504
~~~yaml
1491-
# Turn on system GHC
1505+
# Seek to use a 'system' GHC on the PATH rather than a Stack-supplied GHC:
14921506
system-ghc: true
14931507
~~~
14941508

1509+
Stack's [Nix integration](../../topics/nix_integration.md), when enabled, is
1510+
incompatible with `system-ghc: false`.
1511+
1512+
!!! note
1513+
1514+
The `system-ghc` option does not specify Stack's behaviour if the specified
1515+
GHC version is not already available. In that regard, see the
1516+
[`install-ghc`](#install-ghc) option.
1517+
14951518
## templates
14961519

14971520
Command line equivalent (takes precedence): `stack new --param <key>:<value>`

0 commit comments

Comments
 (0)