<div dir="ltr"><div dir="ltr">Announcing the first release candidate of Stack 2.1!<div><br><div>You can download bindists for Linux, macOS, and Windows from <a href="https://github.com/commercialhaskell/stack/releases/tag/v2.1.0.1">https://github.com/commercialhaskell/stack/releases/tag/v2.1.0.1</a>.</div><div><br></div><div><div>### Changes since v1.9.3</div><div><br></div><div>Major changes:</div><div><br></div><div>* Switch over to pantry for managing packages. This is a major change</div><div>  to Stack's internals, and affects user-visible behavior in a few</div><div>  places. Some highlights:</div><div>    * Drop support for multiple package indices and legacy</div><div>      `00-index.tar` style indices. See</div><div>      [#4137](<a href="https://github.com/commercialhaskell/stack/issues/4137">https://github.com/commercialhaskell/stack/issues/4137</a>).</div><div>    * Support for archives and repos in the `packages` section has</div><div>      been removed. Instead, you must use `extra-deps` for such</div><div>      dependencies. `packages` now only supports local filepaths.</div><div>    * Add support for Git repositories containing (recursive) submodules.</div><div>    * Addition of new configuration options for specifying a "pantry</div><div>      tree" key, which provides more reproducibility around builds,</div><div>      and (in the future) will be used for more efficient package</div><div>      content downloads. You can also specify package name and version</div><div>      for more efficient config parsing.</div><div>          * __NOTE__ The new `stack freeze` command provides support</div><div>            for automatically generating this additional</div><div>            information.</div><div>    * Package contents and metadata are stored in an SQLite database</div><div>      in place of files on the filesystem. The `pantry` library can be</div><div>      used for interacting with these contents.</div><div>    * Internally, Stack has changed many datatypes, including moving</div><div>      to Cabal's definition of many data types. As a result of such</div><div>      changes, existing cache files will in general be invalidated,</div><div>      resulting in Stack needing to rebuild many previously cached</div><div>      builds in the new version. Sorry :(.</div><div>    * A new command, `stack freeze` has been added which outputs</div><div>      project and snapshot definitions with dependencies pinned to</div><div>      their exact versions.</div><div>    * The `ignore-revision-mismatch` setting is no longer needed, and</div><div>      has been removed.</div><div>    * Overriding GHC boot packages results in any other GHC boot</div><div>      packages depending on it being no longer available as a dependency,</div><div>      such packages need to be added explicitly when needed. See</div><div>      [#4510] (<a href="https://github.com/commercialhaskell/stack/issues/4510">https://github.com/commercialhaskell/stack/issues/4510</a>).</div><div>    * Cabal solver integration was not updated to support newer</div><div>      `cabal-install` versions so `stack solver` command was removed as</div><div>      well as a related option `--solver` from `stack new` and</div><div>      `stack init`.</div><div>* Upgrade to Cabal 2.4</div><div>    * Note that, in this process, the behavior of file globbing has</div><div>      been modified to match that of Cabal. In particular, this means</div><div>      that for Cabal spec versions less than 2.4, `*.txt` will</div><div>      match `foo.txt`, but not `foo.2.txt`.</div><div>* Remove the `stack image` command. With the advent of Docker multistage</div><div>  builds, this functionality is no longer useful. For an example, please see</div><div>  [Building Haskell Apps with</div><div>  Docker](<a href="https://www.fpcomplete.com/blog/2017/12/building-haskell-apps-with-docker">https://www.fpcomplete.com/blog/2017/12/building-haskell-apps-with-docker</a>).</div><div>* Support building GHC from source (experimental)</div><div>    * Stack now supports building and installing GHC from source. The built GHC</div><div>      is uniquely identified by a commit id and an Hadrian "flavour" (Hadrian is</div><div>      the newer GHC build system), hence `compiler` can be set to use a GHC</div><div>      built from source with `ghc-git-COMMIT-FLAVOUR`</div><div>* `stack.yaml` now supports a `configure-options`, which are passed directly to</div><div>  the `configure` step in the Cabal build process. See</div><div>  [#1438](<a href="https://github.com/commercialhaskell/stack/issues/1438">https://github.com/commercialhaskell/stack/issues/1438</a>)</div><div><br></div><div>* Remove support for building GHCJS itself. Future releases of Stack</div><div>  may remove GHCJS support entirely.</div><div>* Support for lock files for pinning exact project dependency versions</div><div><br></div><div>Behavior changes:</div><div>* `stack.yaml` now supports `snapshot`: a synonym for `resolver`. See [#4256](<a href="https://github.com/commercialhaskell/stack/issues/4256">https://github.com/commercialhaskell/stack/issues/4256</a>)</div><div><br></div><div>* `stack script` now passes `-i -idir` in to the `ghc`</div><div>  invocation. This makes it so that the script can import local</div><div>  modules, and fixes an issue where `.hs` files in the current</div><div>  directory could affect interpretation of the script. See</div><div>  [#4538](<a href="https://github.com/commercialhaskell/stack/pull/4538">https://github.com/commercialhaskell/stack/pull/4538</a>)</div><div><br></div><div>* When using `stack script`, custom snapshot files will be resolved</div><div>  relative to the directory containing the script.</div><div><br></div><div>* Remove the deprecated `--upgrade-cabal` flag to `stack setup`.</div><div><br></div><div>* Support the `drop-packages` field in `stack.yaml`</div><div><br></div><div>* Remove the GPG signing code during uploads. The GPG signatures have</div><div>  never been used yet, and there are no plans to implement signature</div><div>  verification.</div><div><br></div><div>* Remove the `--plain` option for the `exec` family of commands</div><div><br></div><div>* Always use the `--exact-configuration` Cabal configuration option when</div><div>  building (should mostly be a non-user-visible enhancement).</div><div><br></div><div>* No longer supports Cabal versions older than `1.19.2`.  This means</div><div>  projects using snapshots earlier than `lts-3.0` or</div><div>  `nightly-2015-05-05` will no longer build.</div><div><br></div><div>* Remove the `stack docker cleanup` command.  Docker itself now has</div><div>  [`docker image prune`](<a href="https://docs.docker.com/engine/reference/commandline/image_prune/">https://docs.docker.com/engine/reference/commandline/image_prune/</a>)</div><div>  and</div><div>  [`docker container prune`](<a href="https://docs.docker.com/engine/reference/commandline/container_prune/">https://docs.docker.com/engine/reference/commandline/container_prune/</a>),</div><div>  which you can use instead.</div><div><br></div><div>* Interleaved output is now turned on by default, see</div><div>  [#4702](<a href="https://github.com/commercialhaskell/stack/issues/4702">https://github.com/commercialhaskell/stack/issues/4702</a>). In</div><div>  addition, the `packagename> ` prefix is no longer included in</div><div>  interelaved mode when only building a single target.</div><div><br></div><div>* The `-fhide-source-paths` GHC option is now enabled by default and</div><div>  can be disabled via the `hide-source-paths` configuration option in</div><div>  `stack.yaml`. See [#3784](<a href="https://github.com/commercialhaskell/stack/issues/3784">https://github.com/commercialhaskell/stack/issues/3784</a>)</div><div><br></div><div>* Stack will reconfigure a package if you modify your `PATH` environment</div><div>  variable. See</div><div>  [#3138](<a href="https://github.com/commercialhaskell/stack/issues/3138">https://github.com/commercialhaskell/stack/issues/3138</a>).</div><div><br></div><div>* For GHC 8.4 and later, disable the "shadowed dependencies" workaround. This</div><div>  means that Stack will no longer have to force reconfigures as often. See</div><div>  [#3554](<a href="https://github.com/commercialhaskell/stack/issues/3554">https://github.com/commercialhaskell/stack/issues/3554</a>).</div><div><br></div><div>* When building a package, Stack takes a lock on the dist directory in</div><div>  use to avoid multiple runs of Stack from trampling each others'</div><div>  files. See</div><div>  [#2730](<a href="https://github.com/commercialhaskell/stack/issues/2730">https://github.com/commercialhaskell/stack/issues/2730</a>).</div><div><br></div><div>* Stack will check occassionally if there is a new version available and prompt</div><div>  the user to upgrade. This will not incur any additional network traffic, as</div><div>  it will piggy-back on the existing Hackage index updates. You can set</div><div>  `recommend-stack-upgrade: false` to bypass this. See</div><div>  [#1681](<a href="https://github.com/commercialhaskell/stack/issues/1681">https://github.com/commercialhaskell/stack/issues/1681</a>).</div><div><br></div><div>* `stack list-dependencies` has been removed in favour of `stack ls dependencies`.</div><div><br></div><div>* The new default for `--docker-auto-pull` is enabled. See</div><div>  [#3332](<a href="https://github.com/commercialhaskell/stack/issues/3332">https://github.com/commercialhaskell/stack/issues/3332</a>).</div><div><br></div><div>Other enhancements:</div><div><br></div><div>* Support MX Linux in get-stack.sh. Fixes</div><div>  [#4769](<a href="https://github.com/commercialhaskell/stack/issues/4769">https://github.com/commercialhaskell/stack/issues/4769</a>).</div><div>* Defer loading up of files for local packages. This allows us to get</div><div>  plan construction errors much faster, and avoid some unnecessary</div><div>  work when only building a subset of packages. This is especially</div><div>  useful for the curator use case.</div><div>* Existing global option `--color=WHEN` is now also available as a</div><div>  non-project-specific yaml configuration parameter `color:`.</div><div>* Adopt the standard proposed at <a href="http://no-color.org/">http://no-color.org/</a>, that color should not be</div><div>  added by default if the `NO_COLOR` environment variable is present.</div><div>* New command `stack ls stack-colors` lists the styles and the associated 'ANSI'</div><div>  control character sequences that stack uses to color some of its output. See</div><div>  `stack ls stack-colors --help` for more information.</div><div>* New global option `--stack-colors=STYLES`, also available as a</div><div>  non-project-specific yaml configuration parameter, allows a stack user to</div><div>  redefine the default styles that stack uses to color some of its output. See</div><div>  `stack --help` for more information.</div><div>* British English spelling of 'color' (colour) accepted as an alias for</div><div>  `--color`, `--stack-colors`, `stack ls stack-colors` at the command line and</div><div>  for `color:` and `stack-colors:` in yaml configuration files.</div><div>* New build option `--ddump-dir`. (See [#4225](<a href="https://github.com/commercialhaskell/stack/issues/4225">https://github.com/commercialhaskell/stack/issues/4225</a>))</div><div>* Stack parses and respects the `preferred-versions` information from</div><div>  Hackage for choosing latest version of a package in some cases,</div><div>  e.g. `stack unpack packagename`.</div><div>* The components output in the `The main module to load is ambiguous` message</div><div>  now include package names so they can be more easily copy-pasted.</div><div>* Git repos are shared across multiple projects. See</div><div>  [#3551](<a href="https://github.com/commercialhaskell/stack/issues/3551">https://github.com/commercialhaskell/stack/issues/3551</a>)</div><div>* Use en_US.UTF-8 locale by default in pure Nix mode so programs won't</div><div>  crash because of Unicode in their output</div><div>  [#4095](<a href="https://github.com/commercialhaskell/stack/issues/4095">https://github.com/commercialhaskell/stack/issues/4095</a>)</div><div>* Add `--tree` to `ls dependencies` to list dependencies as tree.</div><div>  [#4101](<a href="https://github.com/commercialhaskell/stack/issues/4101">https://github.com/commercialhaskell/stack/issues/4101</a>)</div><div>* Add `--pedantic` to `ghci` to run with `-Wall` and `-Werror`</div><div>  [#4463](<a href="https://github.com/commercialhaskell/stack/issues/4463">https://github.com/commercialhaskell/stack/issues/4463</a>)</div><div>* Add `--cabal-files` flag to `stack ide targets` command.</div><div>* Add `--stdout` flag to all `stack ide` subcommands.</div><div>* Use batches when unregistering packages with `ghc-pkg`.</div><div>  (See [#2662](<a href="https://github.com/commercialhaskell/stack/issues/2662">https://github.com/commercialhaskell/stack/issues/2662</a>))</div><div>* `get-stack` script now works on Windows CI machines of Appveyor,</div><div>  Travis and Azure Pipelines. See</div><div>  [#4535](<a href="https://github.com/commercialhaskell/stack/issues/4535)/">https://github.com/commercialhaskell/stack/issues/4535)/</a></div><div>* Show snapshot being used when `stack ghci` is invoked outside of a project directory. See</div><div>  [#3651](<a href="https://github.com/commercialhaskell/stack/issues/3651">https://github.com/commercialhaskell/stack/issues/3651</a>)</div><div>* The script interpreter now accepts a `--extra-dep` flag for adding</div><div>  packages not present in the snapshot. Currently, this only works</div><div>  with packages from Hackage, not Git repos or archives.</div><div>* When using the script interpreter with `--optimize` or `--compile`,</div><div>  Stack will perform an optimization of checking whether a newer</div><div>  executable exists, making reruns significantly faster. There's a</div><div>  downside to this, however: if you have a multifile script, and</div><div>  change one of the dependency modules, Stack will not automatically</div><div>  detect and recompile.</div><div>* `stack clean` will delete the entire `.stack-work/dist` directory,</div><div>  not just the relevant subdirectory for the current GHC version. See</div><div>  [#4480](<a href="https://github.com/commercialhaskell/stack/issues/4480">https://github.com/commercialhaskell/stack/issues/4480</a>).</div><div>* Add `stack purge` as a shortcut for `stack clean --full`. See</div><div>  [#3863](<a href="https://github.com/commercialhaskell/stack/issues/3863">https://github.com/commercialhaskell/stack/issues/3863</a>).</div><div>* Both `stack dot` and `stack ls dependencies` accept a</div><div>  `--global-hints` flag to bypass the need for an installed GHC. See</div><div>  [#4390](<a href="https://github.com/commercialhaskell/stack/issues/4390">https://github.com/commercialhaskell/stack/issues/4390</a>).</div><div>* Add the `stack config env` command for getting shell script environment</div><div>  variables. See [#620](<a href="https://github.com/commercialhaskell/stack/issues/620">https://github.com/commercialhaskell/stack/issues/620</a>).</div><div>* Less verbose output from `stack setup` on Windows. See</div><div>  [#1212](<a href="https://github.com/commercialhaskell/stack/issues/1212">https://github.com/commercialhaskell/stack/issues/1212</a>).</div><div>* Add an optional `ignore-expiry` flag to the `hackage-security`</div><div>  section of the `~/.stack/config.yaml`. It allows to disable timestamp</div><div>  expiration verification just like `cabal --ignore-expiry` does.</div><div>  The flag is not enabled by default so that the default functionality</div><div>  is not changed.</div><div>* Include default values for most command line flags in the `--help`</div><div>  output. See</div><div>  [#893](<a href="https://github.com/commercialhaskell/stack/issues/893">https://github.com/commercialhaskell/stack/issues/893</a>).</div><div>* Set the `GHC_ENVIRONMENT` environment variable to specify dependency</div><div>  packages explicitly when running test. This is done to prevent</div><div>  ambiguous module name errors in `doctest` tests.</div><div>* Document the way stack interacts with the Cabal library.</div><div>* `get-stack` script now works on Windows CI machines of Appveyor,</div><div>  Travis and Azure Pipelines. See</div><div>  [#4535](<a href="https://github.com/commercialhaskell/stack/issues/4535">https://github.com/commercialhaskell/stack/issues/4535</a>)</div><div>* Warn when a Docker image does not include a `PATH` environment</div><div>  variable. See</div><div>  [#2472](<a href="https://github.com/commercialhaskell/stack/issues/2742">https://github.com/commercialhaskell/stack/issues/2742</a>)</div><div>* When using `system-ghc: true`, Stack will now find the appropriate GHC</div><div>  installation based on the version suffix, allowing you to more easily switch</div><div>  between various system-installed GHCs. See</div><div>  [#2433](<a href="https://github.com/commercialhaskell/stack/issues/2433">https://github.com/commercialhaskell/stack/issues/2433</a>).</div><div>* `stack init` will now support create a `stack.yaml` file without any local</div><div>  packages. See [#2465](<a href="https://github.com/commercialhaskell/stack/issues/2465">https://github.com/commercialhaskell/stack/issues/2465</a>)</div><div>* Store caches in SQLite database instead of files.</div><div>* No longer use "global" Docker image database (`docker.db`).</div><div>* User config files are respected for the script command. See</div><div>  [#3705](<a href="https://github.com/commercialhaskell/stack/issues/3705">https://github.com/commercialhaskell/stack/issues/3705</a>),</div><div>  [#3887](<a href="https://github.com/commercialhaskell/stack/issues/3887">https://github.com/commercialhaskell/stack/issues/3887</a>).</div><div>* Set the `GHC_ENVIRONMENT` environment variable to `-` to tell GHC to</div><div>  ignore any such files when GHC is new enough (>= 8.4.4), otherwise</div><div>  simply unset the variable. This allows Stack to have control of</div><div>  package databases when running commands like `stack exec ghci`, even</div><div>  in the presence of implicit environment files created by `cabal</div><div>  new-build`. See</div><div>  [#4706](<a href="https://github.com/commercialhaskell/stack/issues/4706">https://github.com/commercialhaskell/stack/issues/4706</a>).</div><div>* Use a database cache table to speed up discovery of installed GHCs</div><div>* You can specify multiple `--test-arguments` options. See</div><div>  [#2226](<a href="https://github.com/commercialhaskell/stack/issues/2226">https://github.com/commercialhaskell/stack/issues/2226</a>)</div><div>* Windows terminal width detection is now done. See</div><div>  [#3588](<a href="https://github.com/commercialhaskell/stack/issues/3588">https://github.com/commercialhaskell/stack/issues/3588</a>)</div><div>* On Windows, informs users if the 'programs' path contains a space character</div><div>  and further warns users if that path does not have an alternative short</div><div>  ('8 dot 3') name, referencing the `local-programs-path` configuration option.</div><div>  See [#4726](<a href="https://github.com/commercialhaskell/stack/issues/4726">https://github.com/commercialhaskell/stack/issues/4726</a>)</div><div><br></div><div>Bug fixes:</div><div><br></div><div>* Ignore duplicate files for a single module when a Haskell module was</div><div>  generated from a preprocessor file. See</div><div>  [#4076](<a href="https://github.com/commercialhaskell/stack/issues/4076">https://github.com/commercialhaskell/stack/issues/4076</a>).</div><div>* Only track down components in current directory if there are no</div><div>  hs-source-dirs found. This eliminates a number of false-positive</div><div>  warnings, similar to</div><div>  [#4076](<a href="https://github.com/commercialhaskell/stack/issues/4076">https://github.com/commercialhaskell/stack/issues/4076</a>).</div><div>* Handle a change in GHC's hi-dump format around `addDependentFile`,</div><div>  which now includes a hash. See</div><div>  [yesodweb/yesod#1551](<a href="https://github.com/yesodweb/yesod/issues/1551">https://github.com/yesodweb/yesod/issues/1551</a>)</div><div>* Fix `subdirs` for git repos in `extra-deps` to match whole directory names.</div><div>  Also fixes for `subdirs: .`. See</div><div>  [#4292](<a href="https://github.com/commercialhaskell/stack/issues/4292">https://github.com/commercialhaskell/stack/issues/4292</a>)</div><div>* Fix for git packages to update submodules to the correct state. See</div><div>  [#4314](<a href="https://github.com/commercialhaskell/stack/pull/4314">https://github.com/commercialhaskell/stack/pull/4314</a>)</div><div>* Add `--cabal-files` flag to `stack ide targets` command.</div><div>* Don't download ghc when using `stack clean`.</div><div>* Support loading in GHCi definitions from symlinked C files. Without this</div><div>  patch, Stack will try to find object files in the directory pointed to</div><div>  by symlinks, while GCC will produce the object files in the original</div><div>  directory. See</div><div>  [#4402](<a href="https://github.com/commercialhaskell/stack/pull/4402">https://github.com/commercialhaskell/stack/pull/4402</a>)</div><div>* Fix handling of GitHub and URL templates on Windows. See</div><div>  [commercialhaskell/stack#4394](<a href="https://github.com/commercialhaskell/stack/issues/4394">https://github.com/commercialhaskell/stack/issues/4394</a>)</div><div>* Fix `--file-watch` not responding to file modifications when running</div><div>  inside docker on Mac. See</div><div>  [#4506](<a href="https://github.com/commercialhaskell/stack/issues/4506">https://github.com/commercialhaskell/stack/issues/4506</a>)</div><div>* Using `--ghc-options` with `stack script --compile` now works.</div><div>* Ensure the detailed-0.9 type tests work.</div><div>  See [#4453](<a href="https://github.com/commercialhaskell/stack/issues/4453">https://github.com/commercialhaskell/stack/issues/4453</a>).</div><div>* Extra include and lib dirs are now order-dependent. See</div><div>  [#4527](<a href="https://github.com/commercialhaskell/stack/issues/4527">https://github.com/commercialhaskell/stack/issues/4527</a>).</div><div>* Apply GHC options when building a `Setup.hs` file. See</div><div>  [#4526](<a href="https://github.com/commercialhaskell/stack/issues/4526">https://github.com/commercialhaskell/stack/issues/4526</a>).</div><div>* Stack handles ABI changes in FreeBSD 12 by differentiating that version from previous.</div><div>* Help text for the `templates` subcommand now reflects behaviour in stack 1.9 — that it</div><div>  downloads and shows a help file, rather than listing available templates.</div><div>* Fix detection of aarch64 platform (this broke when we upgraded to a newer Cabal version).</div><div>* Docker: fix detecting and pulling missing images with `--docker-auto-pull`, see</div><div>  [#4598](<a href="https://github.com/commercialhaskell/stack/issues/4598">https://github.com/commercialhaskell/stack/issues/4598</a>)</div><div>* Hackage credentials are not world-readable. See</div><div>  [#2159](<a href="https://github.com/commercialhaskell/stack/issues/2159">https://github.com/commercialhaskell/stack/issues/2159</a>).</div><div>* Warnings are dumped from logs even when color is enabled. See</div><div>  [#2997](<a href="https://github.com/commercialhaskell/stack/issues/2997">https://github.com/commercialhaskell/stack/issues/2997</a>)</div><div>* `stack init` will now work for cabal files with sublibraries. See</div><div>  [#4408](<a href="https://github.com/commercialhaskell/stack/issues/4408">https://github.com/commercialhaskell/stack/issues/4408</a>)</div><div>* When the Cabal spec version is newer than the global Cabal version, build</div><div>  against the snapshot's Cabal library. See</div><div>  [#4488](<a href="https://github.com/commercialhaskell/stack/issues/4488">https://github.com/commercialhaskell/stack/issues/4488</a>)</div><div>* Docker: fix detection of expected subprocess failures.  This fixes</div><div>  downloading a compatible `stack` executable  when the host `stack` is not compatible with the Docker image (on Linux), and doesn't show an unnecessary</div><div>  extra error when the in-container re-exec'ed `stack` exits with failure.</div><div>* The `stack ghci` command's `--ghc-options` flag now parses multiple options.</div><div>  See [#3315](<a href="https://github.com/commercialhaskell/stack/issues/3315">https://github.com/commercialhaskell/stack/issues/3315</a>).</div></div></div><div><br></div></div></div>