rc/v3.1.0.1 (release candidate)
Pre-release
Pre-release
Release notes:
- The change in major version from 2.x to 3.1 marks the dropping of support for versions of GHC before 8.4, deprecated in Stack 2.15.1.
Changes since v2.15.7:
Behavior changes:
- Stack uses the version of the Cabal package that comes with the specified version of GHC. Stack no longer supports such Cabal versions before 2.2, which came with versions of GHC before 8.4. Consequently, the
initcommand will not try LTS Haskell before 12.0. - The
initcommand initialisesstack.yamlwith asnapshotkey rather than aresolverkey. - After installing GHC or another tool, Stack deletes the archive file which provided the tool.
- Remove hidden flag
--skip-intermediate-deps, effectively deprecated since Stack 1.3.0, fromghciandreplcommands. - The
haddock --haddock-for-hackagecommand only seeks to create an archive of the<package_version>-docsdirectory for build targets and if flags excluding the building of project packages are not set. - The predecessor of configuration option
package-index,package-indices(deprecated in Stack 2.9.3) has been removed as an alternative option. - If a build target is a package identifier, and the package version is not in the snapshot or the package index, Stack will report an error when the target is parsed. Previously, if another version of the package was in the snapshot, Stack would construct the build plan with that other version or, if it was not, Stack would defer an error to the construction of the build plan.
- The
listcommand, with a specified snapshot and package, also reports the version of the package included indirectly in the snapshot (as a boot package of the compiler specified by the snapshot). stack build --flag *:[-]<flag_name>now only applies the flag setting to packages for which the Cabal flag is defined, as opposed to all packages.- On Unix-like operating systems, drop support for
/etc/stack/config, deprecated in Stack 0.1.6.0. - Drop support for, in the Stack root, directory
globaland filestack.yaml, both deprecated in Stack 0.1.6.0.
Other enhancements:
- Bump to Hpack 0.37.0.
- In YAML configuration files, the
msys-environmentkey is introduced to allow, on Windows, the MSYS2 environment to be specified. The default environment is stillMINGW64on 64-bit Windows andMINGW32on 32-bit Windows. - In YAML configuration files, the
default-init-snapshotkey is introduced to allow a default snapshot to be specified for use with thestack initcommand, as if it had been specified at the command line. - Add flags
--haddock-executables,--haddock-testsand--haddock-benchmarksto Stack'sbuildcommand (including thehaddocksynonym forbuild --haddock) to enable also building Haddock documentation for executables, test suites and benchmarks. Due to a bug in Cabal (the library), Stack will ignore the flags with a warning for GHC versions before 9.4. - Add flag
--[no-]save-hackage-credsto Stack'suploadcommand, which takes precedence over the existingsave-hackage-credsconfiguration option. - In YAML configuration files, the
global-hints-locationkey is introduced to allow the location of the global hints YAML specification file to be specified. - By default, Hpack 0.20.0 or later will decline to overwrite a Cabal file that was modified manually. In YAML configuration files, the
hpack-forcekey is introduced to allow Hpack to overwrite such a Cabal file. The corresponding--hpack-forceflag is also added. - Add the
stack config set recommend-stack-upgradecommand to configure whether or not Stack should notify the user if it identifes a new version of Stack is available in YAML configuration files. - Add the
ls globalscommand to list all global packages for the version of GHC specified by the snapshot. - Add
stack -h(equivalent tostack --help). - In YAML configuration files, the
file-watch-hookkey is introduced to allow--file-watchpost-processing to be customised with a executable orshshell script.
Bug fixes:
- The
config set snapshotandconfig set resolvercommands now respect the presence of a synoymous key. - The
config setcommands support existing keys only in the formkey: valueon a single line. The commands now recognise that a linekey:does not have that form. - On Unix-like operating systems, the
test --coveragecommand now finds package keys even for very long package names. - The Error S-6362 message now acknowledges when the wanted compiler has been specified at the command line.
- Fix a regression, introduced in Stack 2.11.1, that caused the
scriptcommand to parse an (otherwise ignored) project-level configuration file. - Stack no longer makes recommendations about a project-level configuration file when only a global configuration file is in use.