Skip to content

v3.1.1

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 28 Jul 18:22

See https://haskellstack.org/ for installation and upgrade instructions.

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 init command will not try LTS Haskell before 12.0.
  • The init command initialises stack.yaml with a snapshot key rather than a resolver key.
  • 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, from ghci and repl commands.
  • The haddock --haddock-for-hackage command only seeks to create an archive of the <package_version>-docs directory 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 list command, 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 global and file stack.yaml, both deprecated in Stack 0.1.6.0.

Other enhancements:

  • Bump to Hpack 0.37.0.
  • In YAML configuration files, the msys-environment key is introduced to allow, on Windows, the MSYS2 environment to be specified. The default environment is still MINGW64 on 64-bit Windows and MINGW32 on 32-bit Windows.
  • In YAML configuration files, the default-init-snapshot key is introduced to allow a default snapshot to be specified for use with the stack init command, as if it had been specified at the command line.
  • Add flags --haddock-executables, --haddock-tests and --haddock-benchmarks to Stack's build command (including the haddock synonym for build --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-creds to Stack's upload command, which takes precedence over the existing save-hackage-creds configuration option.
  • In YAML configuration files, the global-hints-location key 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-force key is introduced to allow Hpack to overwrite such a Cabal file. The corresponding --hpack-force flag is also added.
  • Add the stack config set recommend-stack-upgrade command 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 globals command to list all global packages for the version of GHC specified by the snapshot.
  • Add stack -h (equivalent to stack --help).
  • In YAML configuration files, the file-watch-hook key is introduced to allow --file-watch post-processing to be customised with a executable or sh shell script.
  • Add flag --[no-]allow-newer to Stack's build command, which takes precedence over the existing allow-newer configuration option.

Bug fixes:

  • The config set snapshot and config set resolver commands now respect the presence of a synoymous key.
  • The config set commands support existing keys only in the form key: value on a single line. The commands now recognise that a line key: does not have that form.
  • On Unix-like operating systems, the test --coverage command 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 script command 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.
  • Fix a regression, introduced in Stack 2.15.7, that caused GHC 8.10.7 or earlier to fail to build a package with a Custom build type, if GHC option -haddock was specified.

Thanks to all our contributors for this release:

  • Michael Pilosov
  • Mike Pilgrem
  • Olivier Benz
  • Phil de Joux
  • theophilebatoz