Newer
Older
## Unreleased changes
**Changes since v2.1.3**
Release notes:
Major changes:
Behavior changes:
Other enhancements:
Bug fixes:
* Disable WAL mode for SQLite3 databases, to improve compatibility with
some platforms and filesystems. See
[#4876](https://github.com/commercialhaskell/stack/issues/4876).
* By default, do not perform expiry checks in Hackage Security. See
[#4928](https://github.com/commercialhaskell/stack/issues/4928).
* Do not rerun expected test failures. This is mostly a change that
will only affect the Stackage Curator use case, but there is now an
additional message letting the user know when a previously-failed
test case is being rerun.
* Move configure information for local packages back to .stack-work to
improve caching. See
[#4893](https://github.com/commercialhaskell/stack/issues/4893).
* Fix to allow dependencies on specific versions of local git repositories. See
[#4862](https://github.com/commercialhaskell/stack/pull/4862)
* Allow Stack commands to be run in Nix mode without having a project file
available. See
[#4854](https://github.com/commercialhaskell/stack/issues/4864).
* Removes dependency on gnu-tar for OSX and Linux environment. The
`--force-local` option was required only for windows environment.
* Properly wait for the `tar` subprocess to complete before returning, thereby
avoiding a SIGTERM screwing up GHC installation. See
[#4888](https://github.com/commercialhaskell/stack/issues/4888).
* Use package complete locations from lock files when resolving dependencies
in `extra-deps`. See
[#4887](https://github.com/commercialhaskell/stack/issues/4887).
* Set the `HASKELL_DIST_DIR` environment to a proper package dist
directory so `doctest` is able to load modules autogenerated by Cabal.
* Expose package library when running tests.
* Fix support for non-ASCII module names. See
[#4938](https://github.com/commercialhaskell/stack/issues/4938)
Other changes:
* Rename `pantry-tmp` package back to `pantry`, now that we have gained
maintainership (which had been used by someone else for a candidate-only test
that made it look like the name was free but prevented uploading a real
package).
## v2.1.1.1
Hackage-only release that removes `stack.yaml` from the sdist. This is because
`stack.yaml` now defines a multi-package project, whereas Hackage works on the
basis on individual packages (see
[#4860](https://github.com/commercialhaskell/stack/issues/4860))
If building a `stack` executable for distribution, please download the
source code from https://github.com/commercialhaskell/stack/releases/tag/v2.1.1
and build it using Stack itself in order to ensure identical behaviour
to official binaries. This package on Hackage is provided for convenience
and bootstrapping purposes.
The Stack 2 release represents a series of significant changes to how Stack
works internally. For the vast majority of cases, these changes are backwards
compatible, in that existing projects will continue to build in the same way
with Stack 2 as they did with Stack 1. The large version bump is due to the
fundamental internal changes to cache handling, database storage (using SQLite
in place of binary files), implicit snapshots (which greatly improve the
precompiled cache), and moving to Pantry. We have also removed some less used
features, as listed below.
* Switch over to pantry for managing packages. This is a major change
to Stack's internals, and affects user-visible behavior in a few
places. Some highlights:
* Drop support for multiple package indices and legacy
`00-index.tar` style indices. See
[#4137](https://github.com/commercialhaskell/stack/issues/4137).
* Support for archives and repos in the `packages` section has
been removed. Instead, you must use `extra-deps` for such
dependencies. `packages` now only supports local filepaths.
* Add support for Git repositories containing (recursive) submodules.
* Addition of new configuration options for specifying a "pantry
tree" key, which provides more reproducibility around builds,
and (in the future) will be used for more efficient package
content downloads. You can also specify package name and version
for more efficient config parsing.
* __NOTE__ The new `stack freeze` command provides support
for automatically generating this additional
* Package contents and metadata are stored in an SQLite database
in place of files on the filesystem. The `pantry` library can be
used for interacting with these contents.
* Internally, Stack has changed many datatypes, including moving
to Cabal's definition of many data types. As a result of such
changes, existing cache files will in general be invalidated,
resulting in Stack needing to rebuild many previously cached
builds in the new version. Sorry :(.
* A new command, `stack freeze` has been added which outputs
project and snapshot definitions with dependencies pinned to
their exact versions.
* The `ignore-revision-mismatch` setting is no longer needed, and
has been removed.
* Overriding GHC boot packages results in any other GHC boot
packages depending on it being no longer available as a dependency,
such packages need to be added explicitly when needed. See
[#4510] (https://github.com/commercialhaskell/stack/issues/4510).
* Cabal solver integration was not updated to support newer
`cabal-install` versions so `stack solver` command was removed as
well as a related option `--solver` from `stack new` and
`stack init`.
* Note that, in this process, the behavior of file globbing has
been modified to match that of Cabal. In particular, this means
that for Cabal spec versions less than 2.4, `*.txt` will
match `foo.txt`, but not `foo.2.txt`.
* Remove the `stack image` command. With the advent of Docker multistage
builds, this functionality is no longer useful. For an example, please see
[Building Haskell Apps with
Docker](https://www.fpcomplete.com/blog/2017/12/building-haskell-apps-with-docker).
* Support building GHC from source (experimental)
* Stack now supports building and installing GHC from source. The built GHC
is uniquely identified by a commit id and an Hadrian "flavour" (Hadrian is
the newer GHC build system), hence `compiler` can be set to use a GHC
built from source with `ghc-git-COMMIT-FLAVOUR`
* `stack.yaml` now supports a `configure-options`, which are passed directly to
the `configure` step in the Cabal build process. See
[#1438](https://github.com/commercialhaskell/stack/issues/1438)
* Remove support for building GHCJS itself. Future releases of Stack
may remove GHCJS support entirely.
* Support for lock files for pinning exact project dependency versions
* `stack.yaml` now supports `snapshot`: a synonym for `resolver`. See
[#4256](https://github.com/commercialhaskell/stack/issues/4256)
* `stack script` now passes `-i -idir` in to the `ghc`
invocation. This makes it so that the script can import local
modules, and fixes an issue where `.hs` files in the current
directory could affect interpretation of the script. See
[#4538](https://github.com/commercialhaskell/stack/pull/4538)
* When using `stack script`, custom snapshot files will be resolved
relative to the directory containing the script.
* Remove the deprecated `--upgrade-cabal` flag to `stack setup`.
* Support the `drop-packages` field in `stack.yaml`
* Remove the GPG signing code during uploads. The GPG signatures have
never been used yet, and there are no plans to implement signature
verification.
* Remove the `--plain` option for the `exec` family of commands
* Always use the `--exact-configuration` Cabal configuration option when
building (should mostly be a non-user-visible enhancement).
* No longer supports Cabal versions older than `1.19.2`. This means
projects using snapshots earlier than `lts-3.0` or
`nightly-2015-05-05` will no longer build.
* Remove the `stack docker cleanup` command. Docker itself now has
[`docker image prune`](https://docs.docker.com/engine/reference/commandline/image_prune/)
and
[`docker container prune`](https://docs.docker.com/engine/reference/commandline/container_prune/),
which you can use instead.
* Interleaved output is now turned on by default, see
[#4702](https://github.com/commercialhaskell/stack/issues/4702). In
addition, the `packagename> ` prefix is no longer included in
interelaved mode when only building a single target.
* The `-fhide-source-paths` GHC option is now enabled by default and
can be disabled via the `hide-source-paths` configuration option in
`stack.yaml`. See [#3784](https://github.com/commercialhaskell/stack/issues/3784)
* Stack will reconfigure a package if you modify your `PATH` environment
variable. See
[#3138](https://github.com/commercialhaskell/stack/issues/3138).
* For GHC 8.4 and later, disable the "shadowed dependencies" workaround. This
means that Stack will no longer have to force reconfigures as often. See
[#3554](https://github.com/commercialhaskell/stack/issues/3554).
* When building a package, Stack takes a lock on the dist directory in
use to avoid multiple runs of Stack from trampling each others'
files. See
[#2730](https://github.com/commercialhaskell/stack/issues/2730).
* Stack will check occassionally if there is a new version available and prompt
the user to upgrade. This will not incur any additional network traffic, as
it will piggy-back on the existing Hackage index updates. You can set
`recommend-stack-upgrade: false` to bypass this. See
[#1681](https://github.com/commercialhaskell/stack/issues/1681).
* `stack list-dependencies` has been removed in favour of `stack ls dependencies`.
* The new default for `--docker-auto-pull` is enabled. See
[#3332](https://github.com/commercialhaskell/stack/issues/3332).
* Support MX Linux in get-stack.sh. Fixes
[#4769](https://github.com/commercialhaskell/stack/issues/4769).
* Defer loading up of files for local packages. This allows us to get
plan construction errors much faster, and avoid some unnecessary
work when only building a subset of packages. This is especially
useful for the curator use case.
* Existing global option `--color=WHEN` is now also available as a
non-project-specific yaml configuration parameter `color:`.
* Adopt the standard proposed at http://no-color.org/, that color should not be
added by default if the `NO_COLOR` environment variable is present.
* New command `stack ls stack-colors` lists the styles and the associated 'ANSI'
control character sequences that stack uses to color some of its output. See
`stack ls stack-colors --help` for more information.
* New global option `--stack-colors=STYLES`, also available as a
non-project-specific yaml configuration parameter, allows a stack user to
redefine the default styles that stack uses to color some of its output. See
`stack --help` for more information.
* British English spelling of 'color' (colour) accepted as an alias for
`--color`, `--stack-colors`, `stack ls stack-colors` at the command line and
for `color:` and `stack-colors:` in yaml configuration files.
* New build option `--ddump-dir`. (See
[#4225](https://github.com/commercialhaskell/stack/issues/4225))
* Stack parses and respects the `preferred-versions` information from
Hackage for choosing latest version of a package in some cases,
e.g. `stack unpack packagename`.
* The components output in the `The main module to load is ambiguous` message
now include package names so they can be more easily copy-pasted.
* Git repos are shared across multiple projects. See
[#3551](https://github.com/commercialhaskell/stack/issues/3551)
* Use en_US.UTF-8 locale by default in pure Nix mode so programs won't
crash because of Unicode in their output
[#4095](https://github.com/commercialhaskell/stack/issues/4095)
* Add `--tree` to `ls dependencies` to list dependencies as tree.
[#4101](https://github.com/commercialhaskell/stack/issues/4101)
* Add `--pedantic` to `ghci` to run with `-Wall` and `-Werror`
[#4463](https://github.com/commercialhaskell/stack/issues/4463)
* Add `--cabal-files` flag to `stack ide targets` command.
* Add `--stdout` flag to all `stack ide` subcommands.
* Use batches when unregistering packages with `ghc-pkg`.
(See [#2662](https://github.com/commercialhaskell/stack/issues/2662))
* `get-stack` script now works on Windows CI machines of Appveyor,
Travis and Azure Pipelines. See
[#4535](https://github.com/commercialhaskell/stack/issues/4535)/
* Show snapshot being used when `stack ghci` is invoked outside of a project
directory. See
[#3651](https://github.com/commercialhaskell/stack/issues/3651)
* The script interpreter now accepts a `--extra-dep` flag for adding
packages not present in the snapshot. Currently, this only works
with packages from Hackage, not Git repos or archives.
* When using the script interpreter with `--optimize` or `--compile`,
Stack will perform an optimization of checking whether a newer
executable exists, making reruns significantly faster. There's a
downside to this, however: if you have a multifile script, and
change one of the dependency modules, Stack will not automatically
detect and recompile.
* `stack clean` will delete the entire `.stack-work/dist` directory,
not just the relevant subdirectory for the current GHC version. See
[#4480](https://github.com/commercialhaskell/stack/issues/4480).
* Add `stack purge` as a shortcut for `stack clean --full`. See
[#3863](https://github.com/commercialhaskell/stack/issues/3863).
* Both `stack dot` and `stack ls dependencies` accept a
`--global-hints` flag to bypass the need for an installed GHC. See
[#4390](https://github.com/commercialhaskell/stack/issues/4390).
* Add the `stack config env` command for getting shell script environment
variables. See [#620](https://github.com/commercialhaskell/stack/issues/620).
* Less verbose output from `stack setup` on Windows. See
[#1212](https://github.com/commercialhaskell/stack/issues/1212).
* Add an optional `ignore-expiry` flag to the `hackage-security`
section of the `~/.stack/config.yaml`. It allows to disable timestamp
expiration verification just like `cabal --ignore-expiry` does.
The flag is not enabled by default so that the default functionality
is not changed.
* Include default values for most command line flags in the `--help`
output. See
[#893](https://github.com/commercialhaskell/stack/issues/893).
* Set the `GHC_ENVIRONMENT` environment variable to specify dependency
packages explicitly when running test. This is done to prevent
ambiguous module name errors in `doctest` tests.
* `get-stack` script now works on Windows CI machines of Appveyor,
Travis and Azure Pipelines. See
[#4535](https://github.com/commercialhaskell/stack/issues/4535)
* Warn when a Docker image does not include a `PATH` environment
variable. See
[#2472](https://github.com/commercialhaskell/stack/issues/2742)
* When using `system-ghc: true`, Stack will now find the appropriate GHC
installation based on the version suffix, allowing you to more easily switch
between various system-installed GHCs. See
[#2433](https://github.com/commercialhaskell/stack/issues/2433).
* `stack init` will now support create a `stack.yaml` file without any local
packages. See [#2465](https://github.com/commercialhaskell/stack/issues/2465)
* Store caches in SQLite database instead of files.
* No longer use "global" Docker image database (`docker.db`).
* User config files are respected for the script command. See
[#3705](https://github.com/commercialhaskell/stack/issues/3705),
[#3887](https://github.com/commercialhaskell/stack/issues/3887).
* Set the `GHC_ENVIRONMENT` environment variable to `-` to tell GHC to
ignore any such files when GHC is new enough (>= 8.4.4), otherwise
simply unset the variable. This allows Stack to have control of
package databases when running commands like `stack exec ghci`, even
in the presence of implicit environment files created by `cabal
new-build`. See
[#4706](https://github.com/commercialhaskell/stack/issues/4706).
* Use a database cache table to speed up discovery of installed GHCs
* You can specify multiple `--test-arguments` options. See
[#2226](https://github.com/commercialhaskell/stack/issues/2226)
* Windows terminal width detection is now done. See
[#3588](https://github.com/commercialhaskell/stack/issues/3588)
* On Windows, informs users if the 'programs' path contains a space character
and further warns users if that path does not have an alternative short
('8 dot 3') name, referencing the `local-programs-path` configuration option.
See [#4726](https://github.com/commercialhaskell/stack/issues/4726)
* Add `--docker-mount-mode` option to set the Docker volume mount mode
for performance tuning on macOS.
* Ignore duplicate files for a single module when a Haskell module was
generated from a preprocessor file. See
[#4076](https://github.com/commercialhaskell/stack/issues/4076).
* Only track down components in current directory if there are no
hs-source-dirs found. This eliminates a number of false-positive
warnings, similar to
[#4076](https://github.com/commercialhaskell/stack/issues/4076).
* Handle a change in GHC's hi-dump format around `addDependentFile`,
which now includes a hash. See
[yesodweb/yesod#1551](https://github.com/yesodweb/yesod/issues/1551)
* Fix `subdirs` for git repos in `extra-deps` to match whole directory names.
Also fixes for `subdirs: .`. See
[#4292](https://github.com/commercialhaskell/stack/issues/4292)
* Fix for git packages to update submodules to the correct state. See
[#4314](https://github.com/commercialhaskell/stack/pull/4314)
* Add `--cabal-files` flag to `stack ide targets` command.
* Support loading in GHCi definitions from symlinked C files. Without this
patch, Stack will try to find object files in the directory pointed to
by symlinks, while GCC will produce the object files in the original
directory. See
[#4402](https://github.com/commercialhaskell/stack/pull/4402)
* Fix handling of GitHub and URL templates on Windows. See
[commercialhaskell/stack#4394](https://github.com/commercialhaskell/stack/issues/4394)
* Fix `--file-watch` not responding to file modifications when running
inside docker on Mac. See
[#4506](https://github.com/commercialhaskell/stack/issues/4506)
* Using `--ghc-options` with `stack script --compile` now works.
* Ensure the detailed-0.9 type tests work.
See [#4453](https://github.com/commercialhaskell/stack/issues/4453).
* Extra include and lib dirs are now order-dependent. See
[#4527](https://github.com/commercialhaskell/stack/issues/4527).
* Apply GHC options when building a `Setup.hs` file. See
[#4526](https://github.com/commercialhaskell/stack/issues/4526).
* Stack handles ABI changes in FreeBSD 12 by differentiating that version from
previous.
* Help text for the `templates` subcommand now reflects behaviour in stack 1.9
— that it downloads and shows a help file, rather than listing available
templates.
* Fix detection of aarch64 platform (this broke when we upgraded to a newer
Cabal version).
* Docker: fix detecting and pulling missing images with `--docker-auto-pull`, see
[#4598](https://github.com/commercialhaskell/stack/issues/4598)
* Hackage credentials are not world-readable. See
[#2159](https://github.com/commercialhaskell/stack/issues/2159).
* Warnings are dumped from logs even when color is enabled. See
[#2997](https://github.com/commercialhaskell/stack/issues/2997)
* `stack init` will now work for cabal files with sublibraries. See
[#4408](https://github.com/commercialhaskell/stack/issues/4408)
* When the Cabal spec version is newer than the global Cabal version, build
against the snapshot's Cabal library. See
[#4488](https://github.com/commercialhaskell/stack/issues/4488)
* Docker: fix detection of expected subprocess failures. This fixes
downloading a compatible `stack` executable when the host `stack` is not
compatible with the Docker image (on Linux), and doesn't show an unnecessary
extra error when the in-container re-exec'ed `stack` exits with failure.
* The `stack ghci` command's `--ghc-options` flag now parses multiple options.
See [#3315](https://github.com/commercialhaskell/stack/issues/3315).
## v1.9.3.1
Hackage-only release with no user facing changes (added compatibility
with `rio-0.1.9.2`).
* Stack can now be compiled again inside a directory that does not
contain a `.git` directory, see
[#4364](https://github.com/commercialhaskell/stack/issues/4364#issuecomment-431600841)
* Handle a change in GHC's hi-dump format around `addDependentFile`,
which now includes a hash. See
[yesodweb/yesod#1551](https://github.com/yesodweb/yesod/issues/1551)
* Allow variables to appear in template file names.
## v1.9.1.1
Hackage-only release with no user facing changes.
* Stack can now be compiled again inside a directory that does not
contain a `.git` directory, see
[#4364](https://github.com/commercialhaskell/stack/issues/4364#issuecomment-431600841)
* Statically linked Linux bindists are back again, thanks to [@nh2](https://github.com/nh2).
* We will be deleting the Ubuntu, Debian, CentOS, Fedora, and Arch package repos from `download.fpcomplete.com` soon. These have been deprecated for over a year and have not received new releases, but were left in place for compatibility with older scripts.
* Note that, in this process, the behavior of file globbing has
been modified to match that of Cabal. In particular, this means
that for Cabal spec versions less than 2.4, `*.txt` will
match `foo.txt`, but not `foo.2.txt`.
* `GHCJS` support is being downgraded to 'experimental'. A warning notifying the user of the experimental status of `GHCJS` will be displayed.
* `ghc-options` from `stack.yaml` are now appended to `ghc-options` from
`config.yaml`, whereas before they would be replaced.
* `stack build` will now announce when sublibraries of a package are being
build, in the same way executables, tests, benchmarks and libraries are
announced
* `stack sdist` will now announce the destination of the generated tarball,
regardless of whether or not it passed the sanity checks
* The `--upgrade-cabal` option to `stack setup` has been
deprecated. This feature no longer works with GHC 8.2 and
later. Furthermore, the reason for this flag originally being
implemented was drastically lessened once Stack started using the
snapshot's `Cabal` library for custom setups. See:
[#4070](https://github.com/commercialhaskell/stack/issues/4070).
* With the new namespaced template feature, `stack templates` is no
longer able to meaningfully display a list of all templates
available. Instead, the command will download and display a
[help file](https://github.com/commercialhaskell/stack-templates/blob/master/STACK_HELP.md)
with more information on how to discover templates. See:
[#4039](https://github.com/commercialhaskell/stack/issues/4039)
* Build tools are now handled in a similar way to `cabal-install`. In
particular, for legacy `build-tools` fields, we use a hard-coded
list of build tools in place of looking up build tool packages in a
tool map. This both brings Stack's behavior closer into line with
`cabal-install`, avoids some bugs, and opens up some possible
optimizations/laziness. See:
[#4125](https://github.com/commercialhaskell/stack/issues/4125).
* Mustache templating is not applied to large files (over 50kb) to
avoid performance degredation. See:
[#4133](https://github.com/commercialhaskell/stack/issues/4133).
* `stack upload` signs the package by default, as documented. `--no-signature`
turns the signing off.
[#3739](https://github.com/commercialhaskell/stack/issues/3739)
* In case there is a network connectivity issue while trying to
download a template, stack will check whether that template had
been downloaded before. In that case, the cached version will be
used. See [#3850](https://github.com/commercialhaskell/stack/issues/3850).
* On Windows before Windows 10, --color=never is the default on terminals that
can support ANSI color codes in output only by emulation
* On Windows, recognise a 'mintty' (false) terminal as a terminal, by default
Ivan Kasatenko
committed
* `stack build` issues a warning when `base` is explicitly listed in
`extra-deps` of `stack.yaml`
* `stack build` suggests trying another GHC version should the build
plan end up requiring unattainable `base` version.
* A new sub command `run` has been introduced to build and run a specified executable
similar to `cabal run`. If no executable is provided as the first argument, it
defaults to the first available executable in the project.
* `stack build` missing dependency suggestions (on failure to construct a valid
build plan because of missing deps) are now printed with their latest
cabal file revision hash. See
[#4068](https://github.com/commercialhaskell/stack/pull/4068).
* Added new `--tar-dir` option to `stack sdist`, that allows to copy
the resulting tarball to the specified directory.
* Introduced the `--interleaved-output` command line option and
`build.interleaved-output` config value which causes multiple concurrent
builds to dump to stderr at the same time with a `packagename> ` prefix. See
[#3225](https://github.com/commercialhaskell/stack/issues/3225).
* The default retry strategy has changed to exponential backoff.
This should help with
[#3510](https://github.com/commercialhaskell/stack/issues/3510).
* `stack new` now allows template names of the form `username/foo` to
download from a user other than `commercialstack` on Github, and can be prefixed
with the service `github:`, `gitlab:`, or `bitbucket:`. [#4039](https://github.com/commercialhaskell/stack/issues/4039)
* Switch to `githash` to include some unmerged bugfixes in `gitrev`
Suggestion to add `'allow-newer': true` now shows path to user config
file where this flag should be put into [#3685](https://github.com/commercialhaskell/stack/issues/3685)
* `stack ghci` now asks which main target to load before doing the build,
rather than after
* With GHC 8.4 and later, Haddock is given the `--quickjump` flag.
* It is possible to specify the Hackage base URL to upload packages to, instead
of the default of `https://hackage.haskell.org/`, by using `hackage-base-url`
configuration option.
* When using Nix, if a specific minor version of GHC is not requested, the
latest minor version in the given major branch will be used automatically.
* `stack ghci` now does not invalidate `.o` files on repeated runs,
meaning any modules compiled with `-fobject-code` will be cached
between ghci runs. See
[#4038](https://github.com/commercialhaskell/stack/pull/4038).
* `~/.stack/config.yaml` and `stack.yaml` terminating by newline
* The previous released caused a regression where some `stderr` from the
`ghc-pkg` command showed up in the terminal. This output is now silenced.
* A regression in recompilation checking introduced in v1.7.1 has been fixed.
See [#4001](https://github.com/commercialhaskell/stack/issues/4001)
* `stack ghci` on a package with internal libraries was erroneously looking
for a wrong package corresponding to the internal library and failing to
load any module. This has been fixed now and changes to the code in the
library and the sublibrary are properly tracked. See
[#3926](https://github.com/commercialhaskell/stack/issues/3926).
* For packages with internal libraries not depended upon, `stack build` used
to fail the build process since the internal library was not built but it
was tried to be registered. This is now fixed by always building internal
libraries. See
[#3996](https://github.com/commercialhaskell/stack/issues/3996).
* `--no-nix` was not respected under NixOS
* Fix a regression which might use a lot of RAM. See
[#4027](https://github.com/commercialhaskell/stack/issues/4027).
* Order of commandline arguments does not matter anymore.
See [#3959](https://github.com/commercialhaskell/stack/issues/3959)
* When prompting users about saving their Hackage credentials on upload,
flush to stdout before waiting for the response so the prompt actually
displays. Also fixes a similar issue with ghci target selection prompt.
* If `cabal` is not on PATH, running `stack solver` now prompts the user
to run `stack install cabal-install`
* `stack build` now succeeds in building packages which contain sublibraries
which are dependencies of executables, tests or benchmarks but not of the
main library. See
[#3787](https://github.com/commercialhaskell/stack/issues/3787).
* Sublibraries are now properly considered for coverage reports when the test
suite depends on the internal library. Before, stack was erroring when
trying to generate the coverage report, see
[#4105](https://github.com/commercialhaskell/stack/issues/4105).
* Sublibraries are now added to the precompiled cache and recovered from there
when the snapshot gets updated. Previously, updating the snapshot when there
was a package with a sublibrary in the snapshot resulted in broken builds.
This is now fixed, see
[#4071](https://github.com/commercialhaskell/stack/issues/4071).
* [#4114](https://github.com/commercialhaskell/stack/issues/4114) Stack pretty prints error messages with proper `error` logging
level instead of `warning` now. This also fixes self-executing scripts
not piping plan construction errors from runhaskell to terminal (issue
[#3942](https://github.com/commercialhaskell/stack/issues/3942)).
* Fix invalid "While building Setup.hs" when Cabal calls fail. See:
[#3934](https://github.com/commercialhaskell/stack/issues/3934)
* `stack upload` signs the package by default, as documented. `--no-signature`
turns the signing off.
[#3739](https://github.com/commercialhaskell/stack/issues/3739)
Release notes:
* aarch64 (64-bit ARM) bindists are now available for the first time.
* Statically linked Linux bindists are no longer available, due to difficulty with GHC 8.2.2 on Alpine Linux.
* 32-bit Linux GMP4 bindists for CentOS 6 are no longer available, since GHC 8.2.2 is no longer being built for that platform.
* `stack setup` no longer uses different GHC configure options on Linux
distributions that use GCC with PIE enabled by default. GHC detects
this itself since ghc-8.0.2, and Stack's attempted workaround for older
versions caused more problems than it solved.
* `stack new` no longer initializes a project if the project template contains
a stack.yaml file.
* A new sub command `ls` has been introduced to stack to view
local and remote snapshots present in the system. Use `stack ls
snapshots --help` to get more details about it.
* `list-dependencies` has been deprecated. The functionality has
to accessed through the new `ls dependencies` interface. See
[#3669](https://github.com/commercialhaskell/stack/issues/3669)
for details.
* Specify User-Agent HTTP request header on every HTTP request.
See [#3628](https://github.com/commercialhaskell/stack/issues/3628) for details.
* `stack setup` looks for GHC bindists and installations by any OS key
that is compatible (rather than only checking a single one). This is
relevant on Linux where different distributions may have different
combinations of libtinfo 5/6, ncurses 5/6, and gmp 4/5, and will allow
simpifying the setup-info metadata YAML for future GHC releases.
* The build progress bar reports names of packages currently building.
* `stack setup --verbose` causes verbose output of GHC configure process.
See [#3716](https://github.com/commercialhaskell/stack/issues/3716)
Maximilian Tagher
committed
* Improve the error message when an `extra-dep` from a path or git reference can't be found
See [#3808](https://github.com/commercialhaskell/stack/pull/3808)
* Nix integration is now disabled on windows even if explicitly enabled,
since it isn't supported. See
[#3600](https://github.com/commercialhaskell/stack/issues/3600)
* `stack build` now supports a new flag `--keep-tmp-files` to retain intermediate
files and directories for the purpose of debugging.
It is best used with ghc's equivalent flag,
i.e. `stack build --keep-tmp-files --ghc-options=-keep-tmp-files`.
See [#3857](https://github.com/commercialhaskell/stack/issues/3857)
* Improved error messages for snapshot parse exceptions
* `stack unpack` now supports a `--to /target/directory` option to
specify where to unpack the package into
* `stack hoogle` now supports a new flag `--server` that launches local
Hoogle server on port 8080. See
[#2310](https://github.com/commercialhaskell/stack/issues/2310)
* The script interpreter's implicit file arguments are now passed before other
arguments. See [#3658](https://github.com/commercialhaskell/stack/issues/3658).
In particular, this makes it possible to pass `-- +RTS ... -RTS` to specify
RTS arguments used when running the script.
* Don't ignore the template `year` parameter in config files, and clarify the
surrounding documentation. See
[#2275](https://github.com/commercialhaskell/stack/issues/2275).
* Benchmarks used to be run concurrently with other benchmarks
and build steps. This is non-ideal because CPU usage of other processes
may interfere with benchmarks. It also prevented benchmark output from
being displayed by default. This is now fixed. See
[#3663](https://github.com/commercialhaskell/stack/issues/3663).
* `stack ghci` now allows loading multiple packages with the same
module name, as long as they have the same filepath. See
[#3776](https://github.com/commercialhaskell/stack/pull/3776).
* `stack ghci` no longer always adds a dependency on `base`. It is
now only added when there are no local targets. This allows it to
be to load code that uses replacements for `base`. See
[#3589](https://github.com/commercialhaskell/stack/issues/3589#issuecomment)
* `stack ghci` now uses correct paths for autogen files with
[#3791](https://github.com/commercialhaskell/stack/issues/3791)
* When a package contained sublibraries, stack was always recompiling the
package. This has been fixed now, no recompilation is being done because of
sublibraries. See [#3899](https://github.com/commercialhaskell/stack/issues/3899).
* The `get-stack.sh` install script now matches manual instructions
when it comes to Debian/Fedora/CentOS install dependencies.
* Compile Cabal-simple with gmp when using Nix.
See [#2944](https://github.com/commercialhaskell/stack/issues/2944)
* `stack ghci` now replaces the stack process with ghci. This improves
signal handling behavior. In particular, handling of Ctrl-C. To make
this possible, the generated files are now left behind after exit.
The paths are based on hashing file contents, and it's stored in the
system temporary directory, so this shouldn't result in too much
garbage. See
[#3821](https://github.com/commercialhaskell/stack/issues/3821).
* Some unnecessary rebuilds when no files were changed are now avoided, by
having a separate build cache for each component of a package. See
[#3732](https://github.com/commercialhaskell/stack/issues/3732).
* Correct the behavior of promoting a package from snapshot to local
package. This would get triggered when version bounds conflicted in
a snapshot, which could be triggered via Hackage revisions for old
packages. This also should allow custom snapshots to define
conflicting versions of packages without issue. See
[Stackage issue #3185](https://github.com/fpco/stackage/issues/3185).
* When promoting packages from snapshot to local, we were
occassionally discarding the actual package location content and
instead defaulting to pulling the package from the index. We now
correctly retain this information. Note that if you were affected by
this bug, you will likely need to delete the binary build cache
associated with the relevant custom snapshot. See
[#3714](https://github.com/commercialhaskell/stack/issues/3714).
* `--no-rerun-tests` has been fixed. Previously, after running a test
we were forgetting to record the result, which meant that all tests
always ran even if they had already passed before. See
[#3770](https://github.com/commercialhaskell/stack/pull/3770).
* Includes a patched version of `hackage-security` which fixes both
some issues around asynchronous exception handling, and moves from
directory locking to file locking, making the update mechanism
resilient against SIGKILL and machine failure. See
[hackage-security #187](https://github.com/haskell/hackage-security/issues/187)
and [#3073](https://github.com/commercialhaskell/stack/issues/3073).
## v1.6.3.1
Hackage-only release with no user facing changes (updated to build with
newer version of hpack dependency).
* In addition to supporting `.tar.gz` and `.zip` files as remote archives,
plain `.tar` files are now accepted too. This will additionally help with
cases where HTTP servers mistakenly set the transfer encoding to `gzip`. See
[#3647](https://github.com/commercialhaskell/stack/issues/3647).
* Links to docs.haskellstack.org ignore Stack version patchlevel.
* Downloading Docker-compatible `stack` binary ignores Stack version patchlevel.
Bug fixes:
* For versions of Cabal before 1.24, ensure that the dependencies of
non-buildable components are part of the build plan to work around an old
Cabal bug. See [#3631](https://github.com/commercialhaskell/stack/issues/3631).
* Run the Cabal file checking in the `sdist` command more reliably by
allowing the Cabal library to flatten the
`GenericPackageDescription` itself.
Hackage-only release with no user facing changes (updated to build with
newer dependency versions).
* Complete overhaul of how snapshots are defined, the `packages` and
`extra-deps` fields, and a number of related items. For full
details, please see
[the writeup on these changes](https://www.fpcomplete.com/blog/2017/07/stacks-new-extensible-snapshots). [PR #3249](https://github.com/commercialhaskell/stack/pull/3249),
see the PR description for a number of related issues.
* The `--install-ghc` flag is now on by default. For example, if you
run `stack build` in a directory requiring a GHC that you do not
currently have, Stack will automatically download and install that
GHC. You can explicitly set `install-ghc: false` or pass the flag
`--no-install-ghc` to regain the previous behavior.
* `stack ghci` no longer loads modules grouped by package. This is
always an improvement for plain ghci - it makes loading faster and
less noisy. For intero, this has the side-effect that it will no
longer load multiple packages that depend on TH loading relative
paths. TH relative paths will still work when loading a single
package into intero. See
[#3309](https://github.com/commercialhaskell/stack/issues/3309)
* Setting GHC options for a package via `ghc-options:` in your
`stack.yaml` will promote it to a local package, providing for more
consistency with flags and better reproducibility. See:
[#849](https://github.com/commercialhaskell/stack/issues/849)
* The `package-indices` setting with Hackage no longer works with the
`00-index.tar.gz` tarball, but must use the `01-index.tar.gz` file
to allow revised packages to be found.
* Options passed via `--ghci-options` are now passed to the end of the
invocation of ghci, instead of the middle. This allows using `+RTS`
without an accompanying `-RTS`.
* When auto-detecting `--ghc-build`, `tinfo6` is now preferred over
`standard` if both versions of libtinfo are installed
* Addition of `stack build --copy-compiler-tool`, to allow tools like
intero to be installed globally for a particular compiler.
[#2643](https://github.com/commercialhaskell/stack/issues/2643)
* Stack will ask before saving hackage credentials to file. This new
prompt can be avoided by using the `save-hackage-creds` setting. Please
see [#2159](https://github.com/commercialhaskell/stack/issues/2159).
* The `GHCRTS` environment variable will no longer be passed through to
every program stack runs. Instead, it will only be passed through
commands like `exec`, `runghc`, `script`, `ghci`, etc.
See [#3444](https://github.com/commercialhaskell/stack/issues/3444).
* `ghc-options:` for specific packages will now come after the options
specified for all packages / particular sets of packages. See
[#3573](https://github.com/commercialhaskell/stack/issues/3573).
* The `pvp-bounds` feature is no longer fully functional, due to some
issues with the Cabal library's printer. See
[#3550](https://github.com/commercialhaskell/stack/issues/3550).
* The `with-hpack` configuration option specifies an Hpack executable to use
instead of the Hpack bundled with Stack. Please
see [#3179](https://github.com/commercialhaskell/stack/issues/3179).
* It's now possible to skip tests and benchmarks using `--skip`
flag
* `GitSHA1` is now `StaticSHA256` and is implemented using the `StaticSize 64 ByteString` for improved performance.
See [#3006](https://github.com/commercialhaskell/stack/issues/3006)
* Dependencies via HTTP(S) archives have been generalized to allow
local file path archives, as well as to support setting a
cryptographic hash (SHA256) of the contents for better
reproducibility.
* Allow specifying `--git-branch` when upgrading
* When running `stack upgrade` from a file which is different from the
default executable path (e.g., on POSIX systems,
`~/.local/bin/stack`), it will now additionally copy the new
executable over the currently running `stack` executable. If
permission is denied (such as in `/usr/local/bin/stack`), the user
will be prompted to try again using `sudo`. This is intended to
assist with the user experience when the `PATH` environment variable
has not been properly configured, see
[#3232](https://github.com/commercialhaskell/stack/issues/3232).
* `stack setup` for ghcjs will now install `alex` and `happy` if
they are not present. See
[#3109](https://github.com/commercialhaskell/stack/issues/3232).
* Added `stack ghci --only-main` flag, to skip loading / importing
all but main modules. See the ghci documentation page
for further info.
* Allow GHC's colored output to show through. GHC colors output
starting with version 8.2.1, for older GHC this does nothing.
Sometimes GHC's heuristics would work fine even before this change,
for example in `stack ghci`, but this override's GHC's heuristics
when they're broken by our collecting and processing GHC's output.
* Extended the `ghc-options` field to support `$locals`, `$targets`,
and `$everything`. See:
[#3329](https://github.com/commercialhaskell/stack/issues/3329)
* Better error message for case that `stack ghci` file targets are
combined with invalid package targets. See:
[#3342](https://github.com/commercialhaskell/stack/issues/3342)
* For profiling now uses `-fprof-auto -fprof-cafs` instead of
the deprecated `-auto-all -caf-all`. See:
[#3360](https://github.com/commercialhaskell/stack/issues/3360)
* Better descriptions are now available for `stack upgrade --help`. See:
[#3070](https://github.com/commercialhaskell/stack/issues/3070)
* When using Nix, nix-shell now depends always on gcc to prevent build errors
when using the FFI. As ghc depends on gcc anyway, this doesn't increase the
dependency footprint.
* `--cwd DIR` can now be passed to `stack exec` in order to execute the
program in a different directory. See:
[#3264](https://github.com/commercialhaskell/stack/issues/3264)
* Plan construction will detect if you add an executable-only package
as a library dependency, resulting in much clearer error
messages. See:
[#2195](https://github.com/commercialhaskell/stack/issues/2195).
* Addition of `--ghc-options` to `stack script` to pass options directly
to GHC. See:
[#3454](https://github.com/commercialhaskell/stack/issues/3454)
* Add hpack `package.yaml` to build Stack itself
* Add `ignore-revision-mismatch` setting. See:
[#3520](https://github.com/commercialhaskell/stack/issues/3520).
* Log when each individual test suite finishes. See:
[#3552](https://github.com/commercialhaskell/stack/issues/3552).
* Avoid spurious rebuilds when using `--file-watch` by not watching files for
executable, test and benchmark components that aren't a target. See:
[#3483](https://github.com/commercialhaskell/stack/issues/3483).
* Stack will now try to detect the width of the running terminal
(only on POSIX for the moment) and use that to better display
output messages. Work is ongoing, so some messages will not
be optimal yet. The terminal width can be overridden with the
new `--terminal-width` command-line option (this works even on
non-POSIX).
* Passing non local packages as targets to `stack ghci` will now
cause them to be used as `-package` args along with package
hiding.
* Detect when user changed .cabal file instead of package.yaml. This
was implemented upstream in hpack. See
[#3383](https://github.com/commercialhaskell/stack/issues/3383).
* Automatically run `autoreconf -i` as necessary when a `configure`
script is missing. See
[#3534](https://github.com/commercialhaskell/stack/issues/3534)
* GHC bindists can now be identified by their SHA256 checksum in addition to
their SHA1 checksum, allowing for more security in download.
* For filesystem setup-info paths, it's no longer assumed that the
directory is writable, instead a temp dir is used. See
[#3188](https://github.com/commercialhaskell/stack/issues/3188).
* `stack hoogle` correctly generates Hoogle databases. See:
[#3362](https://github.com/commercialhaskell/stack/issues/3362)
* `stack --docker-help` is now clearer about --docker implying
system-ghc: true, rather than both --docker and --no-docker.
* `stack haddock` now includes package names for all modules in the
Haddock index page. See:
[#2886](https://github.com/commercialhaskell/stack/issues/2886)
* Fixed an issue where Stack wouldn't detect missing Docker images
properly with newer Docker versions.
[#3171](https://github.com/commercialhaskell/stack/pull/3171)
* Previously, cabal files with just test-suite could cause build to fail
([#2862](https://github.com/commercialhaskell/stack/issues/2862))
* If an invalid snapshot file has been detected (usually due to
mismatched hashes), Stack will delete the downloaded file and
recommend either retrying or filing an issue upstream. See
[#3319](https://github.com/commercialhaskell/stack/issues/3319).
* Modified the flag parser within Stack to match the behavior of
Cabal's flag parser, which allows multiple sequential dashes. See
[#3345](https://github.com/commercialhaskell/stack/issues/3345)
* Now clears the hackage index cache if it is older than the
downloaded index. Fixes potential issue if stack was interrupted when
updating index.
See [#3033](https://github.com/commercialhaskell/stack/issues/3033)
* The Stack install script now respects the `-d` option.
See [#3366](https://github.com/commercialhaskell/stack/pull/3366).
* `stack script` can now handle relative paths to source files.
See [#3372](https://github.com/commercialhaskell/stack/issues/3372).
* Fixes explanation of why a target is needed by the build plan, when the
target is an extra dependency from the commandline.
See [#3378](https://github.com/commercialhaskell/stack/issues/3378).
* Previously, if you delete a yaml file from ~/.stack/build-plan, it would
trust the etag and not re-download. Fixed in this version.
* Invoking `stack --docker` in parallel now correctly locks the sqlite database.
See [#3400](https://github.com/commercialhaskell/stack/issues/3400).
* docs.haskellstack.org RTD documentation search is replaced by the mkdocs
search. Please see
[#3376](https://github.com/commercialhaskell/stack/issues/3376).
* `stack clean` now works with nix. See
[#3468](https://github.com/commercialhaskell/stack/issues/3376).
* `stack build --only-dependencies` no longer builds local project packages
that are depended on. See
[#3476](https://github.com/commercialhaskell/stack/issues/3476).
* Properly handle relative paths stored in the precompiled cache files. See
[#3431](https://github.com/commercialhaskell/stack/issues/3431).
* In some cases, Cabal does not realize that it needs to reconfigure, and must
be told to do so automatically. This would manifest as a "shadowed
dependency" error message. We now force a reconfigure whenever a dependency is
built, even if the package ID remained the same. See
[#2781](https://github.com/commercialhaskell/stack/issues/2781).
* When `--pvp-bounds` is enabled for sdist or upload, internal
dependencies could cause errors when uploaded to hackage. This is
fixed, see [#3290](https://github.com/commercialhaskell/stack/issues/3290)
* Fixes a bug where nonexistent hackage versions would cause stack to
suggest the same package name, without giving version info. See
[#3562](https://github.com/commercialhaskell/stack/issues/3562)
* Fixes a bug that has existed since 1.5.0, where
`stack setup --upgrade-cabal` would say that Cabal is already the latest
version, when it wasn't.
* Ensure that an `extra-dep` from a local directory is not treated as
a `$locals` for GHC options purposes. See
[#3574](https://github.com/commercialhaskell/stack/issues/3574).
* Building all executables only happens once instead of every
time. See
[#3229](https://github.com/commercialhaskell/stack/issues/3229) for
more info.
## 1.5.1
Bug fixes:
* Stack eagerly tries to parse all cabal files related to a
snapshot. Starting with Stackage Nightly 2017-07-31, snapshots are
using GHC 8.2.1, and the `ghc.cabal` file implicitly referenced uses
the (not yet supported) Cabal 2.0 file format. Future releases of
Stack will both be less eager about cabal file parsing and support
Cabal 2.0. This patch simply bypasses the error for invalid parsing.
* `stack profile` and `stack trace` now add their extra RTS arguments for
benchmarks and tests to the beginning of the args, instead of the end.
See [#2399](https://github.com/commercialhaskell/stack/issues/2399)
* Support for Git-based indices has been removed.
* `stack setup` allow to control options passed to ghcjs-boot with
`--ghcjs-boot-options` (one word at a time) and `--[no-]ghcjs-boot-clean`
* `stack setup` now accepts a `--install-cabal VERSION` option which
will install a specific version of the Cabal library globally.
* Updates to store-0.4.1, which has improved performance and better error
reporting for version tags. A side-effect of this is that all of
stack's binary caches will be invalidated.
* `stack solver` will now warn about unexpected cabal-install versions.
See [#3044](https://github.com/commercialhaskell/stack/issues/3044)
* Upstream packages unpacked to a temp dir are now deleted as soon as
possible to avoid running out of space in `/tmp`.
See [#3018](https://github.com/commercialhaskell/stack/issues/3018)
* Add short synonyms for `test-arguments` and `benchmark-arguments` options.
* Adds `STACK_WORK` environment variable, to specify work dir.
See [#3063](https://github.com/commercialhaskell/stack/issues/3063)
* Can now use relative paths for `extra-include-dirs` and `extra-lib-dirs`.
See [#2830](https://github.com/commercialhaskell/stack/issues/2830)
* Improved bash completion for many options, including `--ghc-options`,
`--flag`, targets, and project executables for `exec`.
* `--haddock-arguments` is actually used now when `haddock` is invoked
during documentation generation.
* `--[no-]haddock-hyperlink-source` flag added which allows toggling
of sources being included in Haddock output.
See [#3099](https://github.com/commercialhaskell/stack/issues/3099)
* `stack ghci` will now skip building all local targets, even if they have
downstream deps, as long as it's registered in the DB.
* The pvp-bounds feature now supports adding `-revision` to the end of
each value, e.g. `pvp-bounds: both-revision`. This means that, when
uploading to Hackage, Stack will first upload your tarball with an