stack
The Haskell Tool Stack
| Version on this page: | 3.1.1@rev:2 |
| LTS Haskell 23.28: | 3.1.1@rev:2 |
| Stackage Nightly 2024-12-09: | 3.1.1@rev:2 |
| Latest on Hackage: | 9.9.9@rev:4 |
stack-3.1.1@sha256:5701d20ef313e13bb03720a060b0d96cbaca87e44be6246102b9485d0962df8e,26605Module documentation for 3.1.1
- Build_stack
- Control
- Control.Concurrent
- Data
- Data.Attoparsec
- Data.Monoid
- GHC
- GHC.Utils
- GHC.Utils.GhcPkg
- GHC.Utils.GhcPkg.Main
- GHC.Utils.GhcPkg
- GHC.Utils
- Network
- Network.HTTP
- Options
- Options.Applicative
- Options.Applicative.Args
- Options.Applicative.Builder
- Options.Applicative.Complicated
- Options.Applicative
- Path
- Paths_stack
- Stack
- Stack.Build
- Stack.BuildInfo
- Stack.BuildOpts
- Stack.BuildPlan
- Stack.CLI
- Stack.Clean
- Stack.Component
- Stack.ComponentFile
- Stack.Config
- Stack.ConfigCmd
- Stack.Constants
- Stack.Coverage
- Stack.DefaultColorWhen
- Stack.DependencyGraph
- Stack.Docker
- Stack.DockerCmd
- Stack.Dot
- Stack.Eval
- Stack.Exec
- Stack.FileWatch
- Stack.GhcPkg
- Stack.Ghci
- Stack.Hoogle
- Stack.IDE
- Stack.Init
- Stack.List
- Stack.Lock
- Stack.Ls
- Stack.New
- Stack.Nix
- Stack.Options
- Stack.Options.BenchParser
- Stack.Options.BuildMonoidParser
- Stack.Options.BuildParser
- Stack.Options.CleanParser
- Stack.Options.Completion
- Stack.Options.ConfigParser
- Stack.Options.DockerParser
- Stack.Options.DotParser
- Stack.Options.EvalParser
- Stack.Options.ExecParser
- Stack.Options.GhcBuildParser
- Stack.Options.GhcVariantParser
- Stack.Options.GhciParser
- Stack.Options.GlobalParser
- Stack.Options.HaddockParser
- Stack.Options.HpcReportParser
- Stack.Options.InitParser
- Stack.Options.LogLevelParser
- Stack.Options.LsParser
- Stack.Options.NewParser
- Stack.Options.NixParser
- Stack.Options.PackageParser
- Stack.Options.PathParser
- Stack.Options.SDistParser
- Stack.Options.ScriptParser
- Stack.Options.SetupParser
- Stack.Options.SnapshotParser
- Stack.Options.TestParser
- Stack.Options.UnpackParser
- Stack.Options.UpgradeParser
- Stack.Options.UploadParser
- Stack.Options.Utils
- Stack.Package
- Stack.PackageDump
- Stack.PackageFile
- Stack.Path
- Stack.Prelude
- Stack.Query
- Stack.Runners
- Stack.SDist
- Stack.Script
- Stack.Setup
- Stack.SetupCmd
- Stack.SourceMap
- Stack.Storage
- Stack.Templates
- Stack.Types
- Stack.Types.AddCommand
- Stack.Types.AllowNewerDeps
- Stack.Types.ApplyGhcOptions
- Stack.Types.ApplyProgOptions
- Stack.Types.Build
- Stack.Types.BuildConfig
- Stack.Types.BuildOpts
- Stack.Types.BuildOptsCLI
- Stack.Types.BuildOptsMonoid
- Stack.Types.CabalConfigKey
- Stack.Types.Cache
- Stack.Types.Casa
- Stack.Types.ColorWhen
- Stack.Types.CompCollection
- Stack.Types.Compiler
- Stack.Types.CompilerBuild
- Stack.Types.CompilerPaths
- Stack.Types.Component
- Stack.Types.ComponentUtils
- Stack.Types.Config
- Stack.Types.ConfigMonoid
- Stack.Types.ConfigureOpts
- Stack.Types.Curator
- Stack.Types.Dependency
- Stack.Types.DependencyTree
- Stack.Types.Docker
- Stack.Types.DockerEntrypoint
- Stack.Types.DotConfig
- Stack.Types.DotOpts
- Stack.Types.DownloadInfo
- Stack.Types.DumpLogs
- Stack.Types.DumpPackage
- Stack.Types.EnvConfig
- Stack.Types.EnvSettings
- Stack.Types.ExtraDirs
- Stack.Types.FileDigestCache
- Stack.Types.GHCDownloadInfo
- Stack.Types.GHCVariant
- Stack.Types.GhcOptionKey
- Stack.Types.GhcOptions
- Stack.Types.GhcPkgId
- Stack.Types.GlobalOpts
- Stack.Types.GlobalOptsMonoid
- Stack.Types.Installed
- Stack.Types.InterfaceOpt
- Stack.Types.IsMutable
- Stack.Types.LockFileBehavior
- Stack.Types.MsysEnvironment
- Stack.Types.NamedComponent
- Stack.Types.Nix
- Stack.Types.Package
- Stack.Types.PackageFile
- Stack.Types.PackageName
- Stack.Types.ParentMap
- Stack.Types.Platform
- Stack.Types.Project
- Stack.Types.ProjectAndConfigMonoid
- Stack.Types.ProjectConfig
- Stack.Types.PvpBounds
- Stack.Types.Runner
- Stack.Types.SCM
- Stack.Types.SetupInfo
- Stack.Types.Snapshot
- Stack.Types.SourceMap
- Stack.Types.StackYamlLoc
- Stack.Types.Storage
- Stack.Types.TemplateName
- Stack.Types.UnusedFlags
- Stack.Types.UploadOpts
- Stack.Types.Version
- Stack.Types.VersionedDownloadInfo
- Stack.Types.WantedCompilerSetter
- Stack.Uninstall
- Stack.Unpack
- Stack.Update
- Stack.Upgrade
- Stack.Upload
- System
- System.Info
- System.Permissions
- System.Process
- System.Terminal
The Haskell Tool Stack
Stack is a cross-platform program for developing Haskell projects. It is intended for Haskellers both new and experienced.
See haskellstack.org, or the doc directory of this repository, for more information.
Learning to use Stack
If are learning to use Stack and have questions, a discussion at the Haskell Community forum may help. See its ‘Learn’ category.
Community
You can participate with the Stack community in the following areas:
- the Haskell Community forum
- the Haskell Foundation’s
Slack workspace
#stack-userschannel, for general Stack discussion#stack-collaboratorschannel, for working on Stack’s code base
- the Haskell Stack room on Matrix
- the Google Group mailing list for Stack
Changes
Changelog
v3.1.1 2024-07-28
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. - Add flag
--[no-]allow-newerto Stack’sbuildcommand, which takes precedence over the existingallow-newerconfiguration option.
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.
- 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
Custombuild type, if GHC option-haddockwas specified.
v2.15.7 - 2024-05-12
Release notes:
- This release fixes potential bugs.
- The hash that Stack uses to distinguish one build plan from another has changed for plans that set (as opposed to unset) manually Cabal flags for immutable dependencies. This will cause Stack to rebuild dependencies for such plans.
Changes since v2.15.5:
Major changes:
- Stack 2.15.5 and earlier cannot build with Cabal (the library) version
3.12.0.0. Stack can now build with that Cabal version.
Behavior changes:
- Stack’s
StackSetupShimexecutable, when called withreplandstack-initial-build-steps, no longer uses Cabal’sreplHookto applyinitialBuildStepsbut takes a more direct approach.
Bug fixes:
- Fix a regression introduced in Stack 2.15.1 that caused a ‘no operation’
stack buildto be slower than previously. - The hashes that Stack uses to distinguish one build plan from another now include the Cabal flags for immutable dependencies set manually. Previously, in error, only such flags that were unset manually were included.
v2.15.5 - 2024-03-28
Release notes:
- This release fixes potential bugs.
Changes since v2.15.3:
Behavior changes:
- Following the handover of the Stackage project to the Haskell Foundation, the
default value of the
urlskey islatest-snapshot: https://stackage-haddock.haskell.org/snapshots.json. - Stack no longer includes the snapshot package database when compiling the
setup executable for a package with
build-type: Configure.
v2.15.3 - 2024-03-07
Release notes:
- With one exception, this release fixes bugs.
Changes since v2.15.1:
Behavior changes:
stack path --global-config,--programs, and--local-binno longer set up Stack’s environment.
Bug fixes:
- Due to a bug, Stack 2.15.1 did not support versions of GHC before 8.2. Stack now supports GHC versions from 8.0.
--haddock-for-hackagedoes not ignore--haddock-arguments.- On Windows, package locations that are Git repositories with submodules now work as intended.
- The
ghc,runghcandrunhaskellcommands accept--packagevalues that are a list of package names or package identifiers separated by spaces and, in the case of package identifiers, in the same way as if they were specified as targets tostack build.
v2.15.1 - 2024-02-09
Release notes:
- After an upgrade from an earlier version of Stack, on first use only, Stack 2.15.1 may warn that it had trouble loading the CompilerPaths cache.
- The hash used as a key for Stack’s pre-compiled package cache has changed,
following the dropping of support for Cabal versions older than
1.24.0.0.
Changes since v2.13.1:
Behavior changes:
- Stack does not leave
*.hior*.ofiles in thesetup-exe-srcdirectory of the Stack root, and deletes any corresponding to asetup-<hash>.hsorsetup-shim-<hash>.hsfile, to avoid GHC issue #21250. - If Stack’s Nix integration is not enabled, Stack will notify the user if a
nixexecutable is on the PATH. This usually indicates the Nix package manager is available. In YAML configuration files, thenotify-if-nix-on-pathkey is introduced, to allow the notification to be muted if unwanted. - Drop support for Intero (end of life in November 2019).
stack path --stack-rootno longer sets up Stack’s environment and does not load Stack’s configuration.- Stack no longer locks on configuration, so packages (remote and local) can
be configured in parallel. This increases the effective concurrency of builds
that before would use fewer threads. Reconsider your
--jobssetting accordingly. See #84. - Stack warns that its support for Cabal versions before
2.2.0.0is deprecated and may be removed in the next version of Stack. Removal would mean that projects using snapshots earlier thanlts-12.0ornightly-2018-03-18(GHC 8.4.1) might no longer build. See #6377. - If Stack’s
--resolveroption is not specified, Stack’sunpackcommand with a package name will seek to update the package index before seeking to download the most recent version of the package in the index. - If the version of Cabal (the library) provided with the specified GHC can copy specific components, Stack will copy only the components built and will not build all executable components at least once.
Other enhancements:
- Consider GHC 9.8 to be a tested compiler and remove warnings.
- Stack can build packages with dependencies on public sub-libraries of other packages.
- Add flag
--no-initto Stack’snewcommand to skip the initialisation of the newly-created project for use with Stack. - The HTML file paths produced at the end of
stack haddockare printed on separate lines and without a trailing dot. - Add option of the form
--doctest-option=<argument>tostack build, wheredoctestis a program recognised by versions of the Cabal library from1.24.0.0. - Experimental: Add flag
--haddock-for-hackageto Stack’sbuildcommand (including thehaddocksynonym forbuild --haddock) to enable building project packages with flags to generate Haddock documentation, and an archive file, suitable for upload to Hackage. The form of the Haddock documentation generated for other packages is unaffected. - Experimental: Add flag
--documentation(-dfor short) to Stack’suploadcommand to allow uploading of documentation for packages to Hackage. stack newno longer rejects project templates that specify apackage.yamlin a subdirectory of the project directory.- Stack will notify the user if Stack has not been tested with the version of
GHC that is being user or a version of Cabal (the library) that has been
found. In YAML configuration files, the
notify-if-ghc-untestedandnotify-if-cabal-untestedkeys are introduced, to allow the notification to be muted if unwanted. - The compiler version is included in Stack’s build message (e.g.
stack> build (lib + exe + test) with ghc-9.6.4). - Add flag
--candidateto Stack’sunpackcommand, to allow package candidates to be unpacked locally. - Stack will notify the user if a specified architecture value is unknown to
Cabal (the library). In YAML configuration files, the
notify-if-arch-unknownkey is introduced, to allow the notification to be muted if unwanted. - Add option
--filter <item>to Stack’sls dependencies textcommand to filter out an item from the results, if present. The item can be$localsfor all project packages. - Add option
--snapshotas synonym for--resolver. - Add the
config set snapshotcommand, corresponding to theconfig set resolvercommand.
Bug fixes:
- Fix the
Curatorinstance ofToJSON, as regardsexpect-haddock-failure. - Better error message if a
resolver:orsnapshot:value is, in error, a YAML number. - Stack accepts all package names that are, in fact, acceptable to Cabal.
- Stack’s
sdistcommand can check packages with names that include non-ASCII characters.
v2.13.1 - 2023-09-29
Release notes:
- Further to the release notes for Stack 2.3.1, the
-staticsuffix has been removed from the statically linked Linux/x86_64 binaries. - The binaries for Linux/Aarch64 are now statically linked.
- Binaries are now provided for macOS/AArch64.
Changes since v2.11.1:
Behavior changes:
- Build artefacts are placed in
.stack-work/dist/<platform>/<GHC_version>(hashed to a shorter path on Windows), rather than.stack-work/dist/<platform>/<Cabal_version>. This allows build artifacts to be distinguished by GHC version. - By default, the
stack buildprogress bar is capped to a length equal to the terminal width. - When building GHC from source, Stack no longer uses Hadrian’s deprecated
--configure\-cflag and, instead, seeks to run GHC’s Pythonbootand shconfigurescripts, and ensure that thehappyandalexexecutables are on the PATH. - When auto-detecting
--ghc-buildon Linux, themuslGHC build only is considered a possible GHC build iflibc.musl-x86_64.so.1is found in\libor\lib64. - No longer supports Cabal versions older than
1.24.0.0. This means projects using snapshots earlier thanlts-7.0ornightly-2016-05-26(GHC 8.0.1) will no longer build. GHC 8.0.1 comes with Haddock 2.17.2. - When unregistering many packages in a single step, Stack can now do that
efficiently. Stack no longer uses GHC-supplied
ghc-pkg unregister(which is, currently, slower). stack hpc report,stack list,stack templatesandstack uninstalloutput their information to the standard output stream rather than to the standard error stream. Logging is still to the standard error stream.stack upgradeno longer assumes that binary upgrade is not supported on a AArch64 machine architecture.
Other enhancements:
- Consider GHC 9.6 to be a tested compiler and remove warnings.
- Consider Cabal 3.10 to be a tested library and remove warnings.
- Bump to Hpack 0.36.0.
- Depend on
pantry-0.9.2, for support for long filenames and directory names in archives created bygit archive. - Avoid the duplicate resolving of usage files when parsing
*.hifiles into a set of modules and a collection of resolved usage files. See #6123. - Add composable component type flags
--exes,--testsand--benchmarksto Stack’side targetscommand, to list only those components. stack --verboseexcludes lengthy information about build plan construction in the debug output by default. The newstack --[no-]plan-in-logflag enables or disables the inclusion of the information in the debug output.- In YAML configuration files, the
casakey is introduced, which takes precedence over the existingcasa-repo-prefixkey. The latter is deprecated. The new key also allows Stack’s use of a Casa (content-addressable storage archive) server to be disabled and the maximum number of keys per request to be configured. The default Casa prefix references https://casa.stackage.org, instead of https://casa.fpcomplete.com. - Add option
--progress-bar=<format>to Stack’sbuildcommand to configure the format of the progress bar, where<format>is one ofnone,count-only(only the package count),capped(capped to a length equal to the terminal width) andfull(the previous format).
Bug fixes:
- Restore
stack sdist --pvp-bounds lower(broken with Stack 2.9.1). - Restore building of Stack with Cabal flag
disable-git-info(broken with Stack 2.11.1). - With
stack hoogle, avoid the messageMinimum version is hoogle-5.0. Found acceptable hoogle-<x.y.z> in your index, requiring its installation.when ahoogleexecutable has already been found on thePATH. - Stack’s sanity check on a selected GHC now passes GHC flag
-hide-all-packages, stopping GHC from looking for a package environment in default locations. - Restore Stack script files without extensions (broken with Stack 2.11.1).
- Restore message suffix
due to warningswithdump-logs: warning(broken with Stack 2.11.1). - On Windows, the
local-programs-pathdirectory can now be on a different drive to the system temporary directory and MSYS2 will still be installed.
v2.11.1 - 2023-05-18
Changes since v2.9.3:
Behavior changes:
- Add flag
--[no-]-only-local-binto Stack’supgradecommand for a binary upgrade. If the Stack executable ismy-stack, the default ismy-stack upgrade --only-local-binwhere previously it was, effectively,my-stack upgrade --no-only-local-bin. If the Stack executable isstack, the default isstack upgrade --no-only-local-bin, the same behaviour as previously. - Use
$XDG_CACHE_HOME/stack/ghci-script, rather than<temp>/haskell-stack-ghci(where<temp>is the directory yielded by thetemporarypackage’sSystem.IO.Temp.getCanonicalTemporaryDirectory), as the base location for GHCi script files generated bystack ghciorstack repl. See #5203 - Drop support for
Cabalversions before 1.22 and, consequently, GHC versions before 7.10. stack ghciandstack replnow take into account the values ofdefault-languagekeys in Cabal files, like they take into account the values ofdefault-extensionskeys.- Removed
--ghc-paths,--global-stack-rootand--local-bin-pathflags forstack path, deprecated in Stack 1.1.0 in favour of--programs,--stack-rootandlocal-binrespectively. - On Windows,
stack upgradealways renames the file of the running Stack executable (adding extension.old) before attempting to write to the original file name. - On Windows,
stack upgradedoes not offersudocommand alternatives if attempting to write to the original file name of the running Stack exectuable results in a ‘Permission’ error. - On Linux, Stack’s
setupcommand now distinguishes GHC buildtinfo6-libc6-pre232from existingtinfo6. The former refers to systems where the version oflibc6(the GNU C Library) is not compatible with version 2.32.tinfo6-libc6-pre232is now a possible value for theghc-buildconfiguration option.
Other enhancements:
- Add options of the form
--PROG-option=<argument>tostack build, wherePROGis a program recognised by the Cabal library and one ofalex,ar,c2hs,cpphs,gcc,greencard,happy,hsc2hs,hscolour,ld,pkg-config,stripandtar. If Cabal uses the program during the configuration step, the argument is passed to it. - By default all
--PROG-optionoptions are applied to all project packages. This behaviour can be changed with new configuration optionapply-prog-options. - Add flag
--[no-]use-roottostack script(default disabled). Used with--compileor--optimize, when enabled all compilation outputs (including the executable) are written to a script-specific location in thescriptsdirectory of the Stack root rather than the script’s directory, avoiding clutter of the latter directory. - Better error message if the value of the
STACK_WORKenvironment variable or--work-diroption is not a valid relative path. - Stack will use the value of the
GH_TOKEN, orGITHUB_TOKEN, environment variable as credentials to authenticate its GitHub REST API requests. stack uninstallalso shows how to uninstall Stack-supplied tools.
Bug fixes:
- Fix incorrect warning if
allow-newer-depsare specified butallow-newerisfalse. See #6068. stack buildwith--file-watchor--file-watch-polloutputs ‘pretty’ error messages, as intended. See #5978.stack buildunregisters any project packages for the sub libraries of a project package that is to be unregistered. See #6046.- The warning that sublibrary dependency is not supported is no longer triggered by internal libraries.
v2.9.3.1 - 2023-06-22
Hackage-only release of the stack package:
- Supports building against snapshot Stackage LTS Haskell 21.0 (GHC 9.4.5), without extra-deps.
- Supports build with
persistent-2.14.5.0, using CPP directives. - Supports build with
unix-compat-0.7, by removing reliance on the moduleSystem.PosixCompat.Userremoved in that package. - Includes
cabal.projectandcabal.configfiles in the package.
v2.9.3 - 2022-12-16
Changes since v2.9.1:
Behavior changes:
- In YAML configuration files, the
package-indexkey is introduced which takes precedence over the existingpackage-indiceskey. The latter is deprecated. - In YAML configuration files, the
hackage-securitykey of thepackage-indexkey or thepackage-indicesitem can be omitted, and the Hackage Security configuration for the item will default to that for the official Hackage server. See #5870. - Add the
stack config set package-index download-prefixcommand to set the location of Stack’s package index in YAML configuration files. stack setupwith the--no-install-ghcflag warns that the flag and the command are inconsistent and now takes no action. Previously the flag was silently ignored.- To support the Haskell Foundation’s
Haskell Error Index initiative, all Stack
error messages generated by Stack itself begin with an unique code in the
form
[S-nnnn], wherennnnis a four-digit number. - Test suite executables that seek input on the standard input stream (
stdin) will not throw an exception. Previously, they would thow an exception, consistent with Cabal’s ‘exitcode-stdio-1.0’ test suite interface specification. Pass the flag--no-tests-allow-stdintostack buildto enforce Cabal’s specification. See #5897
Other enhancements:
- Help documentation for
stack upgradewarns that if GHCup is used to install Stack, only GHCup should be used to upgrade Stack. That is because GHCup uses an executable namedstackto manage versions of Stack, that Stack will likely overwrite on upgrade. - Add
stack ls dependencies cabalcommand, which lists dependencies in the format of exact Cabal constraints. - Add
STACK_XDGenvironment variable to use the XDG Base Directory Specification for the Stack root and Stack’s global YAML configuration file, if the Stack root location is not set on the command line or by using theSTACK_ROOTenvironment variable. - Add
stack path --global-config, to yield the full path of Stack’s user-specific global YAML configuration file (config.yaml). - Experimental: Add option
allow-newer-deps, which allows users to specify a subset of dependencies for which version bounds should be ignored (allow-newer-deps: ['foo', 'bar']). This field has no effect unlessallow-neweris enabled.
Bug fixes:
- Fix ambiguous module name
Distribution.PackageDescription, if compilingStackSetupShimwithCabal-syntax-3.8.1.0in package database. See #5886. - In YAML configuration files, if the
package-indiceskey (or thehackage-securitykey of its item) is omitted, the expiration of timestamps is now ignored, as intended. See Pantry #63
v2.9.1 - 2022-09-19
Changes since v2.7.5:
Release notes:
-
After an upgrade from an earlier version of Stack, on first use only, Stack 2.9.1 may warn that it had trouble loading the CompilerPaths cache.
-
The support from the Stack team for binary releases now includes Linux/AArch64 and is limited to:
- Linux 64-bit/x86_64 (statically linked)
- Linux AArch64 (dynamically linked)
- macOS x86_64
- Windows 64-bit/x86_64
Behavior changes:
stack build --coveragewill generate a unified coverage report, even if there is only one*.tixfile, in case a package has tested the library of another package that has not tested its own library. See #5713stack --verboseno longer includes the lengthy raw snapshot layer (rsl) in the debug output by default. The newstack --[no-]rsl-in-logflag enables or disables the inclusion of the rsl in the debug output.
Other enhancements:
- Consider GHC 9.2 and 9.4 to be tested compilers and remove warnings.
- Consider Cabal 3.6 and 3.8 to be a tested libraries and remove warnings.
- Bump to Hpack 0.35.0.
- On Windows, the installer now sets
DisplayVersionin the registry, enabling tools likewingetto properly read the version number. - Adds flag
--script-no-run-compile(disabled by default) that uses the--no-runoption withstack script(and forces the--compileoption). This enables a command likestack --script-no-run-compile Script.hsto behave likestack script <arguments> --no-run --compile -- Script.hsbut without having to list all the<arguments>in the Stack interpreter options comment inScript.hson the command line. That may help test that scripts compile in CI (continuous integration). See #5755 - Fuller help is provided at the command line if a subcommand is missing (for
example,
stack lsnow yields the equivalent ofstack ls --help). See #809 - Add build option
--cabal-verbosity=VERBOSITYto specify the Cabal verbosity level (the option accepts Cabal’s numerical and extended syntax). See #1369 - Add the possibility of a
shscript to customise fully GHC installation. See #5585 toolssubcommand added tostack ls, to list stack’s installed tools.stack uninstallshows how to uninstall Stack.--ghc-variantacceptsint-nativeas a variant.
Bug fixes:
- Fix
stack clean --full, so that the files to be deleted are not in use. See #5714 - Fix an inconsistency in the pretty formatting of the output of
stack build --coverage - Fix repeated warning about missing parameters when using
stack new - Include
pantry-0.5.6: Remove operational and mirror keys from bootstrap key set #53 - Pass any CPP options specified via
cpp-options:in the Cabal file to GHCi using GHC’s-optPflag. See #5608 - On Unix-like operating systems, respect the
with-gccoption when installing GHC. See #5609 - Fixed logic in
get_isa()inget-stack.shto exclude systems that don’t have x86 in theiruname -moutput. See 5792. - Fixed output of
stack ls snapshots localon Windows, to behave like that on Unix-like operating systems. - Fix non-deterministic test failures when executing a test suite for a multi-project repository with parallelism enabled. See #5024
v2.7.5 - 2022-03-06
Changes since v2.7.3:
Behavior changes:
- Cloning git repositories isn’t per sub-directory anymore, see #5411
Other enhancements:
stack setupsupports installing GHC for macOS aarch64 (M1)stack uploadsupports authentication with a Hackage API key (viaHACKAGE_KEYenvironment variable).
Bug fixes:
- Ensure that
extra-pathworks for case-insensitivePATHs on Windows. See rio#237 - Fix handling of overwritten
ghcandghc-pkglocations. #5597 - Fix failure to find package when a dependency is shared between projects. #5680
stack ghcinow uses package flags instack.yaml#5434
v2.7.3 - 2021-07-20
Changes since v2.7.1:
Other enhancements:
stack upgradewill download fromhaskellstack.orgbefore tryinggithub.com. See #5288stack upgrademakes less assumptions about archive format. See #5288- Add a
--no-runflag to thescriptcommand when compiling.
Bug fixes:
- GHC source builds work properly for recent GHC versions again. See #5528
stack setupalways looks for the unpacked directory name to support different tar file naming conventions. See #5545- Bump
pantryversion for better OS support. See pantry#33 - When building the sanity check for a new GHC install, make sure to clear
GHC_PACKAGE_PATH. - Specifying GHC RTS flags in the
stack.yamlno longer fails with an error. #5568 stack setupwill look in sandboxed directories for executables, not relying on `findExecutables. See GHC issue 20074- Track changes to
setup-configproperly to avoid reconfiguring on every change. See #5578
v2.7.1 - 2021-05-07
Changes since v2.5.1.1:
Behavior changes:
stack replnow always warns about GHCi problems with loading multiple packages. It also sets now proper working directory when invoked with one package. See #5421custom-setupdependencies are now properly initialized forstack dist. This makesexplicit-setup-depsno longer required and that option was removed. See #4006
Other enhancements:
- Consider GHC 9.0 to be a tested compiler and remove warnings.
- Consider Cabal 3.6 to be a tested library and remove warnings.
- Nix integration now passes
ghcVersion(in addition to existingghc) toshell-fileas an identifier that can be looked up in a compiler attribute set. - Nix integration now allows Nix integration if the user is ready in nix-shell. This gets rid of “In Nix shell but reExecL is False” error.
stack listis a new command to list package versions in a snapshot. See #5431custom-preprocessor-extensionsis a new configuration option for allowing Stack to be aware of any custom preprocessors you have added toSetup.hs. See #3491- Added
--candidateflag touploadcommand to upload a package candidate rather than publishing the package. - Error output using
--no-interleaved-outputno longer prepends indenting whitespace. This allows emacs compilation-mode and vim quickfix to locate and track errors. See #5523
Bug fixes:
stack newnow supports branches other thanmasteras default for GitHub repositories. See #5422- Ignore all errors from
hi-file-parser. See #5445 and #5486. - Support basic auth in package-indices. See #5509.
- Add support for parsing
.hi. files from GHC 8.10 and 9.0. See hi-file-parser#2.
v2.5.1.1 - 2020-12-09
Hackage-only release:
- Support build with persistent-2.11.x and optparse-applicative-0.16.x
v2.5.1 - 2020-10-15
Changes since v2.3.3
Major changes:
- Add the
snapshot-location-baseyaml configuration option, which allows to override the default location of snapshot configuration files. This option affects how snapshot synonyms (LTS/Nightly) are expanded to URLs by thepantrylibrary. docker-networkconfiguration key added to override docker--netarg
Behavior changes:
- File watching now takes into account specified targets, old behavior could be
restored using the new flag
--watch-all#5310
Other enhancements:
stack ls dependencies jsonnow includes fieldssha256andsizefor dependencies oftypearchiveinlocation. #5280- Build failures now show a hint to scroll up to the corresponding section #5279
- Customisable output styles (see
stack --helpand the--stack-colorsoption, andstack ls stack-colors --help) now includeinfo,debug,other-level,secondaryandhighlight, used with verbose output.
Bug fixes:
- Fix
stack test --coveragewhen using Cabal 3 stack newnow generates PascalCase’d module name correctly. #5376- Connection issues to Casa server no longer cause builds to failure. Casa acts only as an optimizing cache layer, not a critical piece of infrastructure.
- Fix modified time busting caches by always calculating sha256 digest during the build process. #5125
v2.3.3 - 2020-08-06
Changes since v2.3.1
Other enhancements:
- Add the
stack-developer-modeflag
Bug fixes:
- When using the
STACK_YAMLenv var with Docker, make the path absolute. - Fix the problem of
stack repl foo:test:barfailing without a project build before that. See #5213 - Fix
stack sdistintroducing unnecessary sublibrary syntax when using pvp-bounds. See #5289
v2.3.1 - 2020-04-29
Release notes:
-
We have reduced the number of platforms that we support with binary releases. The reason behind this is that we’ve been slowed down in our release process until now with issues trying to build binaries for less common platforms. In order to make sure we can address issues more quickly (like supporting new GHC versions), we’re limiting support from the Stack team to:
- Linux 64-bit/x86_64 (statically linked)
- macOS x86_64
- Windows 64-bit/x86_64
If others want to provide additional binaries, we will definitely be happy for the support. But since our CI system is currently able to produce these three bindists only, that’s what we will be providing with the next release.
-
Since we no longer have dynamically linked Linux binaries, we are removing the
-staticsuffix from the static Linux/x86_64 binaries. If you have scripts to download the latest stable Linux/x86_64 binary, update them to uselinux-x86_64instead oflinux-x86_64-static(if you are already using the former, nothing needs to change). For this release, both are supported, but the next release will no longer have the-staticvariant. -
We are also deprecating the download links at https://stackage.org/stack. See this page for the current installation instructions: https://docs.haskellstack.org/en/stable/install_and_upgrade/.
-
These are the canonical locations to download the latest stable binaries from, and will continue to be supported going forward:
- Linux 64-bit/x86_64 (static): https://get.haskellstack.org/stable/linux-x86_64.tar.gz
- macOS x86_64: https://get.haskellstack.org/stable/osx-x86_64.tar.gz
- Windows 64-bit/x86_64: https://get.haskellstack.org/stable/windows-x86_64.zip
As always, binaries for specific versions are available from the GitHub releases: https://github.com/commercialhaskell/stack/releases.
Changes since v2.1.3.1
Major changes:
-
setup-info-locationsyaml configuration now allows overwriting the default locations ofstack-setup-2.yaml. #5031 #2983 #2913 -
The
setup-infoconfiguration key now allows overwriting parts of the defaultsetup-info -
The
--setup-info-yamlcommand line flag now may be used in all Stack commands such asstack build, and not only instack setup -
The
--setup-info-yamlmay specify multiple locations forstack-setup.yamlfiles. -
The
stack uploadcan read first reads environment Variable$HACKAGE_USERNAMEand$HACKAGE_PASSWORDif they are missing only then asks forusernameorpassword -
Fully remove GHCJS support.
-
Remove the
freezecommand. It has been replaced by lock files.
Behavior changes:
-
Remove the deprecated
--stack-setup-yamlcommand line argument in favor of--setup-info-yaml. See #2647 -
We now recommend checking in generated Cabal files for repos. When generating lock files for extra-deps that only include
package.yamlfiles, a deprecation warning will be generated. Also, those packages will no longer be included in the generated lock files. See #5210.
Other enhancements:
-
Add
build-output-timestampsflag in yaml. Setting it to true prefixes each build log output line with a timestamp. -
Show warning about
local-programs-pathwith spaces on windows when running scripts. See #5013 -
Add
ls dependencies jsonwhich will print dependencies as JSON.ls dependencies --treeis nowls dependencies tree. See #4424 -
Remove warning for using Stack with GHC 8.8-8.10, and Cabal 3.0-3.2.
-
Allow relative paths in
--setup-info-yamland tool paths #3394 -
Added the
--only-localsflag. See #5272
Bug fixes:
-
Upgrade
pantry: module mapping insertions into the database are now atomic. Previously, if you SIGTERMed at the wrong time while running a script, you could end up with an inconsistent database state. -
--resolver globaldoesn’t retrieve snapshots list from the internet because doesn’t need it. See #5103 -
Fix using relative links in haddocks output. See #4971.
-
Do not include generated Cabal file information in lock files. See #5045.
-
Use proper Hoogle executable path when installed automatically. See #4905
-
Fix GHC version for batched package unregistration. See #4951
-
Use Hoogle from the snapshot used and not the latest version. See #4905
-
Resolve “‘stty’ is not recognized”. See #4901
-
Fix missing reconfigure check causing errors when a package gets used in multiple projects. See #5147
v2.1.3.1 - 2019-07-16
Hackage-only release:
- Support persistent-template-2.7.x
- Support rio-0.1.11.0
- Add
stack.yamlback to hackage sdist, and addsnapshot.yaml
v2.1.3 - 2019-07-13
Changes since v2.1.1
Behavior changes:
-
Disable WAL mode for SQLite3 databases, to improve compatibility with some platforms and filesystems. See #4876.
-
By default, do not perform expiry checks in Hackage Security. See #4928.
Other enhancements:
-
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 project packages back to .stack-work to improve caching. See #4893.
Bug fixes:
-
Fix to allow dependencies on specific versions of local git repositories. See #4862
-
Allow Stack commands to be run in Nix mode without having a project file available. See #4854.
-
Removes dependency on gnu-tar for OSX and Linux environment. The
--force-localoption was required only for windows environment. -
Properly wait for the
tarsubprocess to complete before returning, thereby avoiding a SIGTERM screwing up GHC installation. See #4888. -
Use package complete locations from lock files when resolving dependencies in
extra-deps. See #4887. -
Set the
HASKELL_DIST_DIRenvironment to a proper package dist directory sodoctestis able to load modules autogenerated by Cabal. -
Expose package library when running tests.
-
Fix support for non-ASCII module names. See #4938
Other changes:
- Rename
pantry-tmppackage back topantry, 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 - 2019-06-14
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)
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.
v2.1.1 - 2019-06-13
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.
Changes since v1.9.3
Major changes:
- 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.tarstyle indices. See #4137. - Support for archives and repos in the
packagessection has been removed. Instead, you must useextra-depsfor such dependencies.packagesnow 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 freezecommand provides support for automatically generating this additional information. - Package contents and metadata are stored in an SQLite database
in place of files on the filesystem. The
pantrylibrary 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 freezehas been added which outputs project and snapshot definitions with dependencies pinned to their exact versions. - The
ignore-revision-mismatchsetting 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-installversions sostack solvercommand was removed as well as a related option--solverfromstack newandstack init.
- Drop support for multiple package indices and legacy
- Upgrade to Cabal 2.4
- 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,
*.txtwill matchfoo.txt, but notfoo.2.txt.
- 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,
- Remove the
stack imagecommand. With the advent of Docker multistage builds, this functionality is no longer useful. For an example, please see Building Haskell Apps with Docker. - Experimental: Support building GHC from source
- 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
compilercan be set to use a GHC built from source withghc-git-COMMIT-FLAVOUR
- 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
stack.yamlnow supports aconfigure-options, which are passed directly to theconfigurestep in the Cabal build process. See #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
Behavior changes:
stack.yamlnow supportssnapshot: a synonym forresolver. See #4256stack scriptnow passes-i -idirin to theghcinvocation. This makes it so that the script can import local modules, and fixes an issue where.hsfiles in the current directory could affect interpretation of the script. See #4538- When using
stack script, custom snapshot files will be resolved relative to the directory containing the script. - Remove the deprecated
--upgrade-cabalflag tostack setup. - Support the
drop-packagesfield instack.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
--plainoption for theexecfamily of commands - Always use the
--exact-configurationCabal 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 thanlts-3.0ornightly-2015-05-05will no longer build. - Remove the
stack docker cleanupcommand. Docker itself now hasdocker image pruneanddocker container prune, which you can use instead. - Interleaved output is now turned on by default, see
#4702. In
addition, the
packagename>prefix is no longer included in interleaved mode when only building a single target. - The
-fhide-source-pathsGHC option is now enabled by default and can be disabled via thehide-source-pathsconfiguration option instack.yaml. See #3784 - Stack will reconfigure a package if you modify your
PATHenvironment variable. See #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.
- 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.
- Stack will check occasionally 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: falseto bypass this. See #1681. stack list-dependencieshas been removed in favour ofstack ls dependencies.- The new default for
--docker-auto-pullis enabled. See #3332.
Other enhancements:
- Support MX Linux in get-stack.sh. Fixes #4769.
- Defer loading up of files for project 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=WHENis now also available as a non-project-specific yaml configuration parametercolor:. - Adopt the standard proposed at http://no-color.org/, that color should not be
added by default if the
NO_COLORenvironment variable is present. - New command
stack ls stack-colorslists the styles and the associated ‘ANSI’ control character sequences that Stack uses to color some of its output. Seestack ls stack-colors --helpfor 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. Seestack --helpfor more information. - British English spelling of ‘color’ (colour) accepted as an alias for
--color,--stack-colors,stack ls stack-colorsat the command line and forcolor:andstack-colors:in yaml configuration files. - New build option
--ddump-dir. (See #4225) - Stack parses and respects the
preferred-versionsinformation 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 ambiguousmessage now include package names so they can be more easily copy-pasted. - Git repos are shared across multiple projects. See #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
- Add
--treetols dependenciesto list dependencies as tree. #4101 - Add
--pedantictoghcito run with-Walland-Werror#4463 - Add
--cabal-filesflag tostack ide targetscommand. - Add
--stdoutflag to allstack idesubcommands. - Use batches when unregistering packages with
ghc-pkg. (See #2662) get-stackscript now works on Windows CI machines of Appveyor, Travis and Azure Pipelines. See #4535/- Show snapshot being used when
stack ghciis invoked outside of a project directory. See #3651 - The script interpreter now accepts a
--extra-depflag 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
--optimizeor--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 cleanwill delete the entire.stack-work/distdirectory, not just the relevant subdirectory for the current GHC version. See #4480.- Add
stack purgeas a shortcut forstack clean --full. See #3863. - Both
stack dotandstack ls dependenciesaccept a--global-hintsflag to bypass the need for an installed GHC. See #4390. - Add the
stack config envcommand for getting shell script environment variables. See #620. - Less verbose output from
stack setupon Windows. See #1212. - Add an optional
ignore-expiryflag to thehackage-securitysection of the~/.stack/config.yaml. It allows to disable timestamp expiration verification just likecabal --ignore-expirydoes. 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
--helpoutput. See #893. - Set the
GHC_ENVIRONMENTenvironment variable to specify dependency packages explicitly when running test. This is done to prevent ambiguous module name errors indoctesttests. get-stackscript now works on Windows CI machines of Appveyor, Travis and Azure Pipelines. See #4535- Warn when a Docker image does not include a
PATHenvironment variable. See #2472 - 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. stack initwill now support create astack.yamlfile without any local packages. See #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, #3887.
- Set the
GHC_ENVIRONMENTenvironment 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 likestack exec ghci, even in the presence of implicit environment files created bycabal new-build. See #4706. - Use a database cache table to speed up discovery of installed GHCs
- You can specify multiple
--test-argumentsoptions. See #2226 - Windows terminal width detection is now done. See #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-pathconfiguration option. See #4726 - Add
--docker-mount-modeoption to set the Docker volume mount mode for performance tuning on macOS.
Bug fixes:
- Ignore duplicate files for a single module when a Haskell module was generated from a preprocessor file. See #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.
- Handle a change in GHC’s hi-dump format around
addDependentFile, which now includes a hash. See yesodweb/yesod#1551 - Fix
subdirsfor git repos inextra-depsto match whole directory names. Also fixes forsubdirs: .. See #4292 - Fix for git packages to update submodules to the correct state. See #4314
- Add
--cabal-filesflag tostack ide targetscommand. - Don’t download ghc when using
stack clean. - 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
- Fix handling of GitHub and URL templates on Windows. See #4394
- Fix
--file-watchnot responding to file modifications when running inside docker on Mac. See #4506 - Using
--ghc-optionswithstack script --compilenow works. - Ensure the detailed-0.9 type tests work. See #4453.
- Extra include and lib dirs are now order-dependent. See #4527.
- Apply GHC options when building a
Setup.hsfile. See #4526. - Stack handles ABI changes in FreeBSD 12 by differentiating that version from previous.
- Help text for the
templatessubcommand 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 - Hackage credentials are not world-readable. See #2159.
- Warnings are dumped from logs even when color is enabled. See #2997
stack initwill now work for Cabal files with sublibraries. See #4408- When the Cabal spec version is newer than the global Cabal version, build against the snapshot’s Cabal library. See #4488
- Docker: fix detection of expected subprocess failures. This fixes
downloading a compatible
stackexecutable when the hoststackis not compatible with the Docker image (on Linux), and doesn’t show an unnecessary extra error when the in-container re-exec’edstackexits with failure. - The
stack ghcicommand’s--ghc-optionsflag now parses multiple options. See #3315.
v1.9.3.1 - 2019-04-18
Hackage-only release with no user facing changes (added compatibility
with rio-0.1.9.2).
v1.9.3 - 2018-12-02
Bug fixes:
- Stack can now be compiled again inside a directory that does not
contain a
.gitdirectory. See #4364 - Handle a change in GHC’s hi-dump format around
addDependentFile, which now includes a hash. See yesodweb/yesod#1551 - Allow variables to appear in template file names.
v1.9.1.1 - 2018-11-14
Hackage-only release with no user facing changes.
- Stack can now be compiled again inside a directory that does not
contain a
.gitdirectory. See #4364
v1.9.1 - 2018-10-17
Release notes:
- Statically linked Linux bindists are back again, thanks to @nh2.
- We will be deleting the Ubuntu, Debian, CentOS, Fedora, and Arch package repos
from
download.fpcomplete.comsoon. These have been deprecated for over a year and have not received new releases, but were left in place for compatibility with older scripts.
Major changes:
- Upgrade to Cabal 2.4
- 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,
*.txtwill matchfoo.txt, but notfoo.2.txt.
- 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,
GHCJSsupport is being downgraded to ‘experimental’. A warning notifying the user of the experimental status ofGHCJSwill be displayed.
Behavior changes:
ghc-optionsfromstack.yamlare now appended toghc-optionsfromconfig.yaml, whereas before they would be replaced.stack buildwill now announce when sublibraries of a package are being build, in the same way executables, tests, benchmarks and libraries are announcedstack sdistwill now announce the destination of the generated tarball, regardless of whether or not it passed the sanity checks- The
--upgrade-cabaloption tostack setuphas 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’sCaballibrary for custom setups. See: #4070. - With the new namespaced template feature,
stack templatesis no longer able to meaningfully display a list of all templates available. Instead, the command will download and display a help file with more information on how to discover templates. See: #4039 - Tools used during building (‘build tools’) are now handled in a similar way to
cabal-install. In particular, for legacybuild-toolsfields, 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 withcabal-install, avoids some bugs, and opens up some possible optimizations/laziness. See: #4125. - Mustache templating is not applied to large files (over 50kb) to avoid performance degradation. See: #4133.
stack uploadsigns the package by default, as documented.--no-signatureturns the signing off. #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.
- In Stack’s script interpreter,
-- stack --verbosity=info scriptand-- stack script --verbosity=infonow have the same effect and both override the--verbosity=errordefault in the interpreter. Previously the default meant the former was equivalent to-- stack --verbosity=info script --verbosity=errorand the latter was equivalent to-- stack --verbosity=error script --verbosity=info, with the subcommand’s global option having precedence over the Stack command’s global option in each case. See #5326.
Other enhancements:
- 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
stack buildissues a warning whenbaseis explicitly listed inextra-depsofstack.yamlstack buildsuggests trying another GHC version should the build plan end up requiring unattainablebaseversion.- A new sub command
runhas been introduced to build and run a specified executable similar tocabal run. If no executable is provided as the first argument, it defaults to the first available executable in the project. stack buildmissing 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.- Added new
--tar-diroption tostack sdist, that allows to copy the resulting tarball to the specified directory. - Introduced the
--interleaved-outputcommand line option andbuild.interleaved-outputconfig value which causes multiple concurrent builds to dump to stderr at the same time with apackagename>prefix. See #3225. - The default retry strategy has changed to exponential backoff. This should help with #3510.
stack newnow allows template names of the formusername/footo download from a user other thancommercialstackon GitHub, and can be prefixed with the servicegithub:,gitlab:, orbitbucket:. See #4039- Switch to
githashto include some unmerged bugfixes ingitrevSuggestion to add'allow-newer': truenow shows path to user config file where this flag should be put into #3685 stack ghcinow asks which main target to load before doing the build, rather than after- Bump to Hpack 0.29.0
- With GHC 8.4 and later, Haddock is given the
--quickjumpflag. - It is possible to specify the Hackage base URL to upload packages to, instead
of the default of
https://hackage.haskell.org/, by usinghackage-base-urlconfiguration 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.
Bug fixes:
stack ghcinow does not invalidate.ofiles on repeated runs, meaning any modules compiled with-fobject-codewill be cached between ghci runs. See #4038.~/.stack/config.yamlandstack.yamlterminating by newline- The previous released caused a regression where some
stderrfrom theghc-pkgcommand 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
stack ghcion 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.- For packages with internal libraries not depended upon,
stack buildused 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. --no-nixwas not respected under NixOS- Fix a regression which might use a lot of RAM. See #4027.
- Order of commandline arguments does not matter anymore. See #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
cabalis not on PATH, runningstack solvernow prompts the user to runstack install cabal-install stack buildnow succeeds in building packages which contain sublibraries which are dependencies of executables, tests or benchmarks but not of the main library. See #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.
- 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.
- #4114 Stack pretty
prints error messages with proper
errorlogging level instead ofwarningnow. This also fixes self-executing scripts not piping plan construction errors from runhaskell to terminal (issue #3942). - Fix invalid “While building Setup.hs” when Cabal calls fail. See: #3934
stack uploadsigns the package by default, as documented.--no-signatureturns the signing off. #3739
v1.7.1 - 2018-04-27
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.
Major changes:
- Upgrade from Cabal 2.0 to Cabal 2.2
Behavior changes:
stack setupno 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 newno longer initializes a project if the project template contains astack.yamlfile.
Other enhancements:
- A new sub command
lshas been introduced to Stack to view local and remote snapshots present in the system. Usestack ls snapshots --helpto get more details about it. list-dependencieshas been deprecated. The functionality has to accessed through the newls dependenciesinterface. See #3669 for details.- Specify User-Agent HTTP request header on every HTTP request. See #3628 for details.
stack setuplooks 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 simplifying the setup-info metadata YAML for future GHC releases.- The build progress bar reports names of packages currently building.
stack setup --verbosecauses verbose output of GHC configure process. See #3716- Improve the error message when an
extra-depfrom a path or git reference can’t be found. See #3808 - Nix integration is now disabled on windows even if explicitly enabled, since it isn’t supported. See #3600
stack buildnow supports a new flag--keep-tmp-filesto 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- Improved error messages for snapshot parse exceptions
stack unpacknow supports a--to /target/directoryoption to specify where to unpack the package intostack hooglenow supports a new flag--serverthat launches local Hoogle server on port 8080. See #2310
Bug fixes:
- The script interpreter’s implicit file arguments are now passed before other
arguments. See
#3658.
In particular, this makes it possible to pass
-- +RTS ... -RTSto specify RTS arguments used when running the script. - Don’t ignore the template
yearparameter in config files, and clarify the surrounding documentation. See #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.
stack ghcinow allows loading multiple packages with the same module name, as long as they have the same filepath. See #3776.stack ghcino longer always adds a dependency onbase. It is now only added when there are no local targets. This allows it to be to load code that uses replacements forbase. See #3589stack ghcinow uses correct paths for autogen files with #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.
- The
get-stack.shinstall script now matches manual instructions when it comes to Debian/Fedora/CentOS install dependencies. - Compile Cabal-simple with gmp when using Nix. See #2944
stack ghcinow 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.
v1.6.5 - 2018-02-19
Bug fixes:
- 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.
- 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.
- When promoting packages from snapshot to local, we were occasionally 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.
--no-rerun-testshas 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.- Includes a patched version of
hackage-securitywhich 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. Seehackage-securityissue #187 and Stack issue #3073.
v1.6.3.1 - 2018-02-16
Hackage-only release with no user facing changes (updated to build with newer version of Hpack dependency).
v1.6.3 - 2017-12-23
Enhancements:
- In addition to supporting
.tar.gzand.zipfiles as remote archives, plain.tarfiles are now accepted too. This will additionally help with cases where HTTP servers mistakenly set the transfer encoding togzip. See #3647. - Links to docs.haskellstack.org ignore Stack version patchlevel.
- Downloading Docker-compatible
stackbinary 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.
- Run the Cabal file checking in the
sdistcommand more reliably by allowing the Cabal library to flatten theGenericPackageDescriptionitself.
v1.6.1.1 - 2017-12-20
Hackage-only release with no user facing changes (updated to build with newer dependency versions).
v1.6.1 - 2017-12-07
Major changes:
- Complete overhaul of how snapshots are defined, the
packagesandextra-depsfields, and a number of related items. For full details, please see the writeup on these changes. PR #3249, see the PR description for a number of related issues. - Upgraded to version 2.0 of the Cabal library.
Behavior changes:
- The
--install-ghcflag is now on by default. For example, if you runstack buildin a directory requiring a GHC that you do not currently have, Stack will automatically download and install that GHC. You can explicitly setinstall-ghc: falseor pass the flag--no-install-ghcto regain the previous behavior. stack ghcino 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- Setting GHC options for a package via
ghc-options:in yourstack.yamlwill promote it to a local package, providing for more consistency with flags and better reproducibility. See: #849 - The
package-indicessetting with Hackage no longer works with the00-index.tar.gztarball, but must use the01-index.tar.gzfile to allow revised packages to be found. - Options passed via
--ghci-optionsare now passed to the end of the invocation of ghci, instead of the middle. This allows using+RTSwithout an accompanying-RTS. - When auto-detecting
--ghc-build,tinfo6is now preferred overstandardif 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 - Stack will ask before saving hackage credentials to file. This new
prompt can be avoided by using the
save-hackage-credssetting. Please see #2159. - The
GHCRTSenvironment variable will no longer be passed through to every program Stack runs. Instead, it will only be passed through commands likeexec,runghc,script,ghci, etc. See #3444. ghc-options:for specific packages will now come after the options specified for all packages / particular sets of packages. See #3573.- The
pvp-boundsfeature is no longer fully functional, due to some issues with the Cabal library’s printer. See #3550.
Other enhancements:
- The
with-hpackconfiguration option specifies an Hpack executable to use instead of the Hpack bundled with Stack. Please see #3179. - It’s now possible to skip tests and benchmarks using
--skipflag GitSHA1is nowStaticSHA256and is implemented using theStaticSize 64 ByteStringfor improved performance. See #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-branchwhen upgrading - When running
stack upgradefrom 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 runningstackexecutable. If permission is denied (such as in/usr/local/bin/stack), the user will be prompted to try again usingsudo. This is intended to assist with the user experience when thePATHenvironment variable has not been properly configured, see #3232. stack setupfor ghcjs will now installalexandhappyif they are not present. See #3109.- Added
stack ghci --only-mainflag, 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-optionsfield to support$locals,$targets, and$everything. See: #3329 - Better error message for case that
stack ghcifile targets are combined with invalid package targets. See: #3342 - For profiling now uses
-fprof-auto -fprof-cafsinstead of the deprecated-auto-all -caf-all. See: #3360 - Better descriptions are now available for
stack upgrade --help. See: #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 DIRcan now be passed tostack execin order to execute the program in a different directory. See: #3264- Plan construction will detect if you add an executable-only package as a library dependency, resulting in much clearer error messages. See: #2195.
- Addition of
--ghc-optionstostack scriptto pass options directly to GHC. See: #3454 - Add Hpack
package.yamlto build Stack itself - Add
ignore-revision-mismatchsetting. See: #3520. - Log when each individual test suite finishes. See: #3552.
- Avoid spurious rebuilds when using
--file-watchby not watching files for executable, test and benchmark components that aren’t a target. See: #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-widthcommand-line option (this works even on non-POSIX). - Passing non local packages as targets to
stack ghciwill now cause them to be used as-packageargs along with package hiding. - Detect when user changed Cabal file instead of
package.yaml. This was implemented upstream in Hpack. See #3383. - Automatically run
autoreconf -ias necessary when aconfigurescript is missing. See #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.
Bug fixes:
stack hooglecorrectly generates Hoogle databases. See: #3362stack --docker-helpis now clearer about –docker implying system-ghc: true, rather than both –docker and –no-docker.stack haddocknow includes package names for all modules in the Haddock index page. See: #2886- Fixed an issue where Stack wouldn’t detect missing Docker images properly with newer Docker versions. #3171
- Previously, Cabal files with just test-suite could cause build to fail (#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.
- Modified the flag parser within Stack to match the behavior of Cabal’s flag parser, which allows multiple sequential dashes. See #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
- The Stack install script now respects the
-doption. See #3366. stack scriptcan now handle relative paths to source files. See #3372.- Fixes explanation of why a target is needed by the build plan, when the target is an extra-dep from the commandline. See #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 --dockerin parallel now correctly locks the sqlite database. See #3400. - docs.haskellstack.org RTD documentation search is replaced by the mkdocs search. Please see #3376.
stack cleannow works with nix. See #3468.stack build --only-dependenciesno longer builds local project packages that are depended on. See #3476.- Properly handle relative paths stored in the precompiled cache files. See #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.
- When
--pvp-boundsis enabled for sdist or upload, internal dependencies could cause errors when uploaded to hackage. This is fixed, see #3290 - Fixes a bug where nonexistent hackage versions would cause Stack to suggest the same package name, without giving version info. See #3562
- Fixes a bug that has existed since 1.5.0, where
stack setup --upgrade-cabalwould say that Cabal is already the latest version, when it wasn’t. - Ensure that an
extra-depfrom a local directory is not treated as a$localsfor GHC options purposes. See #3574. - Building all executables only happens once instead of every time. See #3229 for more info.
1.5.1 - 2017-08-05
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.cabalfile 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.
1.5.0 - 2017-07-25
Behavior changes:
stack profileandstack tracenow add their extra RTS arguments for benchmarks and tests to the beginning of the args, instead of the end. See #2399- Support for Git-based indices has been removed.
Other enhancements:
stack setupallow to control options passed to ghcjs-boot with--ghcjs-boot-options(one word at a time) and--[no-]ghcjs-boot-cleanstack setupnow accepts a--install-cabal VERSIONoption 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 solverwill now warn about unexpectedcabal-installversions. See #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 - Add short synonyms for
test-argumentsandbenchmark-argumentsoptions. - Adds
STACK_WORKenvironment variable, to specify work dir. See #3063 - Can now use relative paths for
extra-include-dirsandextra-lib-dirs. See #2830 - Improved bash completion for many options, including
--ghc-options,--flag, targets, and project executables forexec. --haddock-argumentsis actually used now whenhaddockis invoked during documentation generation.--[no-]haddock-hyperlink-sourceflag added which allows toggling of sources being included in Haddock output. See #3099stack ghciwill now skip building all local targets, even if they have downstream deps, as long as it’s registered in the DB.- The
pvp-boundsfeature now supports adding-revisionto 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 unmodified Cabal file, and then upload a Cabal file revision with the PVP bounds added. This can be useful - especially combined with the Stackage no-revisions feature - as a method to ensure PVP compliance without having to proactively fix bounds issues for Stackage maintenance. - Expose a
save-hackage-credsconfiguration option - On GHC <= 7.8, filters out spurious linker warnings on windows See #3127
- Better error messages when creating or building packages which alias wired-in packages. See #3172.
- MinGW bin folder now is searched for dynamic libraries. See #3126
- When using Nix, nix-shell now depends always on git to prevent runtime errors while fetching metadata
- Experimental: The
stack unpackcommand now accepts a form where an explicit Hackage revision hash is specified, e.g.stack unpack foo-1.2.3@gitsha1:deadbeef. Note that Stack will likely move towards a different hash format in the future. - Binary “stack upgrade” will now warn if the installed executable is not on the PATH or shadowed by another entry.
- Allow running tests on tarball created by sdist and upload #717.
Bug fixes:
- Fixes case where
stack build --profilemight not cause executables / tests / benchmarks to be rebuilt. See #2984 stack ghci file.hsnow loads the file even if it isn’t part of your project.stack clean --fullnow works when docker is enabled. See #2010- Fixes an issue where cyclic deps can cause benchmarks or tests to be run before they are built. See #2153
- Fixes
stack build --file-watchin cases where a directory is removed See #1838 - Fixes
stack dotandstack list-dependenciesto use info from the package database for wired-in-packages (ghc, base, etc). See #3084 - Fixes
stack --docker buildwhen user is part of libvirt/libvirtd groups on Ubuntu Yakkety (16.10). See #3092 - Switching a package between extra-dep and local package now forces rebuild (previously it wouldn’t if versions were the same). See #2147
stack uploadno longer reveals your password when you type it on MinTTY-based Windows shells, such as Cygwin and MSYS2. See #3142stack script’s import parser will now properly parse files that have Windows-style line endings (CRLF)
1.4.0 - 2017-03-15
Release notes:
- Docker images: fpco/stack-full and fpco/stack-run are no longer being built for LTS 8.0 and above. fpco/stack-build images continue to be built with a simplified process. #624
Major changes:
- A new command,
script, has been added, intended to make the script interpreter workflow more reliable, easier to use, and more efficient. This command forces the user to provide a--resolvervalue, ignores all config files for more reproducible results, and optimizes the existing package check to make the common case of all packages already being present much faster. This mode does require that all packages be present in a snapshot, however. #2805
Behavior changes:
-
The default package metadata backend has been changed from Git to the 01-index.tar.gz file, from the hackage-security project. This is intended to address some download speed issues from GitHub for people in certain geographic regions. There is now full support for checking out specific Cabal file revisions from downloaded tarballs as well. If you manually specify a package index with only a Git URL, Git will still be used. See #2780
-
When you provide the
--resolverargument to thestack unpackcommand, any packages passed in by name only will be looked up in the given snapshot instead of taking the latest version. For example,stack --resolver lts-7.14 unpack mtlwill get version 2.2.1 ofmtl, regardless of the latest version available in the package indices. This will also force the same Cabal file revision to be used as is specified in the snapshot.Unpacking via a package identifier (e.g.
stack --resolver lts-7.14 unpack mtl-2.2.1) will ignore any settings in the snapshot and take the most recent revision.For backwards compatibility with tools relying on the presence of a
00-index.tar, Stack will copy the01-index.tarfile to00-index.tar. Note, however, that these files are different; most importantly, 00-index contains only the newest revisions of Cabal files, while 01-index contains all versions. You may still need to update your tooling. -
Passing
--(no-)nix-*options now no longer implies--nix, except for--nix-pure, so that the user preference whether or not to use Nix is honored even in the presence of options that change the Nix behavior.
Other enhancements:
- Internal cleanup: configuration types are now based much more on lenses
stack buildand related commands now allow the user to disable debug symbol stripping with new--no-strip,--no-library-stripping, and--no-executable-shippingflags, closing #877. Also turned error message for missing targets more readable (#2384)stack haddocknow shows index.html paths when documentation is already up to date. Resolved #781- Respects the
custom-setupfield introduced in Cabal 1.24. This supercedes anyexplicit-setup-depssettings in yourstack.yamland trusts the package’s Cabal file to explicitly state all its dependencies. - If system package installation fails,
get-stack.shwill fail as well. Also shows warning suggesting to runapt-get updateor similar, depending on the OS. (#2898) - When
stack ghciis run with a config with no packages (e.g. global project), it will now look for source files in the current work dir. (#2878) - Bump to Hpack 0.17.0 to allow
custom-setupand!include "..."inpackage.yaml. - The script interpreter will now output error logging. In particular, this means it will output info about plan construction errors. (#2879)
stack ghcinow takes--flagand--ghc-optionsagain (inadvertently removed in 1.3.0). (#2986)stack execnow takes--rts-optionswhich passes the given arguments inside of+RTS ... args .. -RTSto the executable. This works around Stack itself consuming the RTS flags on Windows. (#2640)- Upgraded
http-client-tlsversion, which now offers support for thesocks5://andsocks5h://values in thehttp_proxyandhttps_proxyenvironment variables.
Bug fixes:
- Bump to Hpack 0.16.0 to avoid character encoding issues when reading and writing on non-UTF8 systems.
stack ghciwill no longer ignore hsSourceDirs that contain... (#2895)stack list-dependencies --licensenow works for wired-in-packages, like base. (#2871)stack setupnow correctly indicates when it uses system ghc (#2963)- Fix to
stack config set, in 1.3.2 it always applied to the global project. (#2709) - Previously, Cabal files without exe or lib would fail on the “copy” step. (#2862)
stack upgrade --gitnow works properly. Workaround for affected versions (>= 1.3.0) is to instead runstack upgrade --git --source-only. (#2977)- Added support for GHC 8’s slightly different warning format for dumping warnings from logs.
- Work around a bug in Cabal/GHC in which package IDs are not unique for different source code, leading to Stack not always rebuilding packages depending on local packages which have changed. (#2904)
1.3.2 - 2016-12-27
Bug fixes:
stack config setcan now be used without a compiler installed #2852.get-stack.shnow installs correct binary on ARM for generic linux and raspbian, closing #2856.- Correct the testing of whether a package database exists by checking
for the
package.cachefile itself instead of the containing directory. - Revert a change in the previous release which made it impossible to set local extra-dep packages as targets. This was overkill; we really only wanted to disable their test suites, which was already handled by a later patch. #2849
stack newalways treats templates as being UTF-8 encoding, ignoring locale settings on a local machine. See Yesod mailing list discussion
1.3.0 - 2016-12-12
Release notes:
- For the next Stack release after this one, we are planning
changes to our Linux releases, including dropping our Ubuntu,
Debian, CentOS, and Fedora package repositories and switching to
statically linked binaries. See
#2534.
Note that upgrading without a package manager has gotten easier
with new binary upgrade support in
stack upgrade(see the Major Changes section below for more information). In addition, the get.haskellstack.org script no longer installs from Ubuntu, Debian, CentOS, or Fedora package repositories. Instead it places a generic binary in /usr/local/bin.
Major changes:
-
Stack will now always use its own GHC installation, even when a suitable GHC installation is available on the PATH. To get the old behaviour, use the
--system-ghcflag or runstack config set system-ghc --global true. Docker- and Nix-enabled projects continue to use the GHC installations in their environment by default.NB: Scripts that previously used Stack in combination with a system GHC installation should now include a
stack setupline or use the--install-ghcflag. #2221 -
stack ghcinow defaults to skipping the build of target packages, because support has been added for invoking “initial build steps”, which create autogen files and run preprocessors. The--no-buildflag is now deprecated because it should no longer be necessary. See #1364 -
Stack is now capable of doing binary upgrades instead of always recompiling a new version from source. Running
stack upgradewill now default to downloading a binary version of Stack from the most recent release, if one is available. Seestack upgrade --helpfor more options. #1238
Behavior changes:
-
Passing
--resolver Xwith a Stack command which forces creation of a global project config, will pass resolver X into the initial config. See #2579. -
Switch the “Run from outside project” messages to debug-level, to avoid spamming users in the normal case of non-project usage
-
If a remote package is specified (such as a Git repo) without an explicit
extra-depsetting, a warning is given to the user to provide one explicitly.
Other enhancements:
stack haddocknow supports--haddock-internal. See #2229- Add support for
system-ghcandinstall-ghcfields tostack config setcommand. - Add
ghc-buildoption to override autodetected GHC build to use (e.g. gmp4, tinfo6, nopie) on Linux. stack setupdetects systems where gcc enables PIE by default (such as Ubuntu 16.10 and Hardened Gentoo) and adjusts the GHCconfigureoptions accordingly. #2542- Upload to Hackage with HTTP digest instead of HTTP basic.
- Make
stack list-dependenciesunderstand all of thestack dotoptions too. - Add the ability for
stack list-dependenciesto list dependency licenses by passing the--licenseflag. - Dump logs that contain warnings for any local non-dependency packages #2545
- Add the
dump-logsconfig option and--dump-logscommand line option to get full build output on the console. #426 - Add the
--openoption to “stack hpc report” command, causing the report to be opened in the browser. - The
stack config setcommand now accepts a--globalflag for suitable fields which causes it to modify the global user configuration (~/.stack/config.yaml) instead of the project configuration. #2675 - Information on the latest available snapshots is now downloaded from S3 instead of stackage.org, increasing reliability in case of stackage.org outages. #2653
stack dotandstack list-dependenciesnow take targets and flags. #1919- Deprecate
stack setup --stack-setup-yamlfor--setup-info-yamlbased on discussion in #2647. - The
--main-isflag for GHCI now implies the TARGET, fixing #1845. stack ghcino longer takes all build options, as many weren’t useful #2199--no-time-in-logoption, to make verbose logs more diffable #2727--coloroption added to override auto-detection of ANSI support #2725- Missing extra-deps are now warned about, adding a degree of typo detection #1521
- No longer warns about missing build-tools if they are on the PATH. #2235
- Replace enclosed-exceptions with safe-exceptions. #2768
- The install location for GHC and other programs can now be configured with the
local-programs-pathoption inconfig.yaml. #1644 - Added option to add nix dependencies as nix GC roots
- Proper pid 1 (init) process for
stack execwith Docker - Dump build logs if they contain warnings. #2545
- Docker: redirect stdout of
docker pullto stderr so that it will not interfere with output of other commands. - Nix & docker can be activated at the same time, in order to run Stack in a nix-shell in a container, preferably from an image already containing the nix dependencies in its /nix/store
- Stack/nix: Dependencies can be added as nix GC roots, so they are not removed
when running
nix-collect-garbage
Bug fixes:
- Fixed a gnarly bug where programs and package tarballs sometimes have corrupted downloads. See #2657.
- Add proper support for non-ASCII characters in file paths for the
sdistcommand. See #2549 - Never treat
extra-deplocal packages as targets. This ensures things like test suites are not run for these packages, and that build output is not hidden due to their presence. - Fix a resource leak in
sinkProcessStderrStdoutwhich could affect much of the codebase, in particular copying precompiled packages. #1979 - Docker: ensure that interrupted extraction process does not cause corrupt file when downloading a Docker-compatible Stack executable #2568
- Fixed running
stack hpc reporton package targets. #2664 - Fix a long-standing performance regression where Stack would parse the
.dump-hifiles of the library components of local packages twice. #2658 - Fixed a regression in “stack ghci –no-load”, where it would prompt for a main module to load. #2603
- Build Setup.hs files with the threaded RTS, mirroring the behavior of
cabal-installand enabling more complex build systems in those files. - Fixed a bug in passing along
--ghc-optionsto ghcjs. They were being provided as--ghc-optionsto Cabal, when it needs to be--ghcjs-options. #2714 - Launch Docker from the project root regardless of the working
directory Stack is invoked from. This means paths relative to the project root
(e.g. environment files) can be specified in
stack.yaml’s dockerrun-args. stack setup --reinstallnow behaves as expected. #2554
1.2.0 - 2016-09-16
Release notes:
-
On many Un*x systems, Stack can now be installed with a simple one-liner:
wget -qO- https://get.haskellstack.org/ | sh -
The fix for #2175 entails that Stack must perform a full clone of a large Git repo of Hackage meta-information. The total download size is about 200 MB. Please be aware of this when upgrading your Stack installation.
-
If you use Mac OS X, you may want to delay upgrading to macOS Sierra as there are reports of GHC panics when building some packages (including Stack itself). See #2577
-
This version of Stack does not build on ARM or PowerPC systems (see store#37). Please stay with version 1.1.2 for now on those architectures. This will be rectified soon!
-
We are now releasing a statically linked Stack binary for 64-bit Linux. Please try it and let us know if you run into any trouble on your platform.
-
We are planning some changes to our Linux releases, including dropping our Ubuntu, Debian, CentOS, and Fedora package repositories and switching to statically linked binaries. We would value your feedback in #2534.
Major changes:
- Add
stack hooglecommand. #55 - Support for absolute file path in
urlfield ofsetup-infoor--ghc-bindist - Add support for rendering GHCi scripts targeting different GHCi like applications #2457
Behavior changes:
- Remove
stack ide startandstack ide load-targetscommands. #2178 - Support .buildinfo files in
stack ghci. #2242 - Support -ferror-spans syntax in GHC error messages.
- Avoid unpacking ghc to
/tmp#996 - The Linux
gmp4GHC bindist is no longer considered a full-fledged GHC variant and can no longer be specified using theghc-variantoption, and instead is treated more like a slightly different platform.
Other enhancements:
- Use the
storepackage for binary serialization of most caches. - Only require minor version match for Docker Stack exe. This way, we can make patch releases for version bounds and similar build issues without needing to upload new binaries for Docker.
- Stack/Nix: Passes the right ghc derivation as an argument to the
shell.nixwhen a customshell.nixis used. See #2243 - Stack/Nix: Sets
LD_LIBRARY_PATHso packages using C libs for Template Haskell can work (See e.g. this HaskellR issue) - Parse CLI arguments and configuration files into less permissive types, improving error messages for bad inputs. #2267
- Add the ability to explicitly specify a gcc executable. #593
- Nix: No longer uses LTS mirroring in nixpkgs. Gives to nix-shell a derivation
like
haskell.compiler.ghc801See #2259 - Perform some subprocesses during setup concurrently, slightly speeding up most commands. #2346
stack setupno longer unpacks to the system temp dir on posix systems. #996stack setupdetects libtinfo6 and ncurses6 and can download alternate GHC bindists #257 #2302.stack setupdetects Linux ARMv7 downloads appropriate GHC bindist #2103- Custom
stackbinaries list dependency versions in output for--version. See #2222 and #2450. - Use a pretty printer to output dependency resolution errors. #1912
- Remove the
--osflag #2227 - Add ‘netbase’ and ‘ca-certificates’ as dependency for .deb packages. #2293.
- Add
stack ide targetscommand. - Enhance debug logging with subprocess timings.
- Pretty-print YAML parse errors #2374
- Clarify confusing
stack setupoutput #2314 - Delete
Stack.Typesmultimodule to improve build times #2405 - Remove spurious newlines in build logs #2418
- Interpreter: Provide a way to hide implicit packages #1208
- Check executability in exec lookup #2489
Bug fixes:
- Fix Cabal warning about use of a deprecated Cabal flag #2350
- Support most executable extensions on Windows #2225
- Detect resolver change in
stack solver#2252 - Fix a bug in docker image creation where the wrong base image was selected #2376
- Ignore special entries when unpacking tarballs #2361
- Fixes src directory pollution of
style.cssandhighlight.jswith GHC 8’s haddock #2429 - Handle filepaths with spaces in
stack ghci#2266 - Apply ghc-options to snapshot packages #2289
stack sdist: Fix timestamp in tarball #2394- Allow global Stack arguments with a script #2316
- Inconsistency between ToJSON and FromJSON instances of PackageLocation #2412
- Perform Unicode normalization on filepaths #1810
- Solver: always keep ghc wired-in as hard constraints #2453
- Support OpenBSD’s tar where possible, require GNU tar for xz support #2283
- Fix using –coverage with Cabal-1.24 #2424
- When marking exe installed, remove old version #2373
- Stop truncating
all-cabal-hashesgit repo #2175 - Handle non-ASCII filenames on Windows #2491
- Avoid using multiple versions of a package in script interpreter by passing package-id to ghc/runghc #1957
- Only pre-load compiler version when using nix integration #2459
- Solver: parse Cabal errors also on Windows #2502
- Allow exec and ghci commands in interpreter mode.
Scripts can now automatically open in the repl by using
exec ghciinstead ofrunghcin the shebang command. #2510 - Now consider a package to be dirty when an extra-source-file is changed. See #2040
1.1.2 - 2016-05-20
Release notes:
- Official FreeBSD binaries are now available #1253.
Major changes:
- Extensible custom snapshots implemented. These allow you to define snapshots which extend other snapshots. See #863. Local file custom snapshots can now be safely updated without changing their name. Remote custom snapshots should still be treated as immutable.
Behavior changes:
stack path --compilerwas added in the last release, to yield a path to the compiler. Unfortunately,--compileris a global option that is useful to use withstack path. The same functionality is now provided bystack path --compiler-exe. See #2123- For packages specified in terms of a git or hg repo, the hash used in the location has changed. This means that existing downloads from older stack versions won’t be used. This is a side-effect of the fix to #2133
stack upgradeno longer pays attention to localstack.yamlfiles, just the global config and CLI options. #1392stack ghcinow uses:addinstead of:load, making it potentially work better with user scripts. See #1888
Other enhancements:
- Grab Cabal files via Git SHA to avoid regressions from Hackage revisions #2070
- Custom snapshots now support
ghc-options. - Package git repos are now re-used rather than re-cloned. See #1620
DESTDIRis filtered from environment when installing GHC. See #1460stack haddocknow supports--haddock-arguments. See #2144- Signing: warn if GPG_TTY is not set as per
man gpg-agent
Bug fixes:
- Now ignore project config when doing
stack initorstack new. See #2110 - Packages specified by git repo can now have submodules. See #2133
- Fix of hackage index fetch retry. See re-opening of #1418
- HPack now picks up changes to filesystem other than package.yaml. See #2051
- “stack solver” no longer suggests –omit-packages. See #2031
- Fixed an issue with building Cabal’s Setup.hs. See #1356
- Package dirtiness now pays attention to deleted files. See #1841
stack ghcinow usesextra-lib-dirsandextra-include-dirs. See #1656- Relative paths outside of source dir added via
qAddDependentFileare now checked for dirtiness. See #1982 - Signing: always use
--with-fingerprints
1.1.0 - 2016-05-04
Release notes:
- Added Ubuntu 16.04 LTS (xenial) Apt repo.
- No longer uploading new versions to Fedora 21 repo.
Behavior changes:
- Snapshot packages are no longer built with executable profiling. See #1179.
stack initnow ignores symlinks when searching for Cabal files. It also now ignores any directory that begins with.(as well asdistdirs) - before it would only ignore.git,.stack-work, anddist.- The Stack executable is no longer built with
-rtsopts. Before, when-rtsoptswas enabled, Stack would process+RTSoptions even when intended for some other program, such as when used withstack exec -- prog +RTS. See #2022. - The
stack path --ghc-pathsoption is deprecated and renamed to--programs.--compileris added, which points directly at the compiler used in the current project.--compiler-binpoints to the compiler’s bin dir. - For consistency with the
$STACK_ROOTenvironment variable, thestack path --global-stack-rootflag and theglobal-stack-rootfield in the output ofstack pathare being deprecated and replaced with thestack-rootflag and output field. Additionally, the Stack root can now be specified via the--stack-rootcommand-line flag. See #1148. stack sigGPG-related sub-commands were removed (folded intouploadandsdist)- GPG signing of packages while uploading to Hackage is now the default. Use
upload --no-signatureif you would rather not contribute your package signature. If you don’t yet have a GPG keyset, read this blog post on GPG keys. We can add astack.yamlconfig setting to disable signing if some people desire it. We hope that people will sign. Later we will be adding GPG signature verification options. stack build pkg-1.2.3will now build even if the snapshot has a different package version - it is treated as an extra-dep.stack build local-pkg-1.2.3is an error even if the version number matches the local package #2028.- Having a
nix:section no longer implies enabling nix build. This allows the user to globally configure whether nix is used (unless the project overrides the default explicitly). See #1924. - Remove deprecated valid-wanted field.
- Docker: mount home directory in container #1949.
- Deprecate
stack path --local-bin-path; instead use--local-bin. stack image: allow absolute source paths foradd.
Other enhancements:
-
stack haddock --open [PACKAGE]opens the local haddocks in the browser. -
Fix too much rebuilding when enabling/disabling profiling flags.
-
stack build pkg-1.0will now buildpkg-1.0even if the snapshot specifies a different version (it introduces a temporary extra-dep) -
Experimental: Support for
--split-objsadded #1284. -
gitpackages with submodules are supported by passing the--recursiveflag togit clone. -
When using Hpack, only regenerate Cabal files when Hpack files change.
-
Hpack files can now be used in templates
-
stack ghcinow runs ghci as a separate process #1306 -
Retry when downloading snapshots and package indices
-
Many build options are configurable now in
stack.yaml:build: library-profiling: true executable-profiling: true haddock: true haddock-deps: true copy-bins: true prefetch: true force-dirty: true keep-going: true test: true test-arguments: rerun-tests: true additional-args: ['-fprof'] coverage: true no-run-tests: true bench: true benchmark-opts: benchmark-arguments: -O2 no-run-benchmarks: true reconfigure: true cabal-verbose: true -
A number of URLs are now configurable, useful for firewalls. See #1794.
-
Suggest causes when executables are missing.
-
Allow
--omit-packageseven without--solver. -
Improve the generated
stack.yaml. -
Improve ghci results after :load Main module collision with main file path.
-
init: allow local packages to be deps of deps #1965.
-
Always use full fingerprints from GPG #1952.
-
Default to using
gpg2and fall back togpg#1976. -
Add a flag for –verbosity silent.
-
Add
haddock --openflag #1396.
Bug fixes:
- Package tarballs would fail to unpack. #1884.
- Fixed errant warnings about missing modules, after deleted and removed from Cabal file #921 #1805.
- Now considers a package to dirty when the Hpack file is changed #1819.
- Nix: cancelling a Stack build now exits properly rather than dropping into a nix-shell #1778.
allow-newer: truenow causes--exact-configurationto be passed to Cabal. See #1579.stack solverno longer fails withInvalidRelFilefor relative package paths including... See #1954.- Ignore emacs lock files when finding Cabal files #1897.
- Use lenient UTF-8 decode for build output #1945.
- Clear index cache whenever index updated #1962.
- Fix: Building a container image drops a .stack-work dir in the current working (sub)directory #1975.
- Fix: Rebuilding when disabling profiling #2023.
1.0.4.3 - 2016-04-07
Bug fixes:
- Don’t delete contents of ~/.ssh when using
stack clean --fullwith Docker enabled #2000
1.0.4.2 - 2016-03-09
Build with path-io-1.0.0. There are no changes in behaviour from 1.0.4, so no
binaries are released for this version.
1.0.4.1 - 2016-02-21
Fixes build with aeson-0.11.0.0. There are no changes in behaviour from 1.0.4,
so no binaries are released for this version.
1.0.4 - 2016-02-20
Major changes:
- Some notable changes in
stack init:- Overall it should now be able to initialize almost all existing Cabal packages out of the box as long as the package itself is consistently defined.
- Choose the best possible snapshot and add extra-deps on top of a snapshot other than a compiler snapshot - #1583
- Automatically omit a package (
--omit-packages) when it is compiler incompatible or when there are packages with conflicting dependency requirements. See #1674. - Some more changes for a better user experience. Please refer to the doc guide for details.
- Add support for Hpack, alternative package description format #1679
Other enhancements:
- Docker: pass ~/.ssh and SSH auth socket into container, so that git repos work #1358.
- Docker: strip suffix from docker –version. #1653
- Docker: pass USER and PWD environment variables into container.
- On each run, Stack will test the Stack root directory (~/.stack), and the
project and package work directories (.stack-work) for whether they are
owned by the current user and abort if they are not. This precaution can
be disabled with the
--allow-different-userflag orallow-different-useroption in the global config (~/.stack/config.yaml). #471 - Added
stack clean --fulloption for full working dir cleanup. - YAML config: support Zip archives.
- Redownload build plan if parsing fails #1702.
- Give mustache templates access to a ‘year’ tag #1716.
- Have “stack ghci” warn about module name aliasing.
- Add “stack ghci –load-local-deps”.
- Build Setup.hs with -rtsopts #1687.
stack initaccepts a list of directories.- Add flag infos to DependencyPlanFailures (for better error output in case of flags) #713
stack new --barecomplains for overwrites, and add--forceoption #1597.
Bug fixes:
- Previously,
stack ghciwould fail withcannot satisfy -package-idwhen the implicit build step changes the package key of some dependency. - Fix: Building with ghcjs: “ghc-pkg: Prelude.chr: bad argument: 2980338” #1665.
- Fix running test / bench with
--profile/--trace. - Fix: build progress counter is no longer visible #1685.
- Use “-RTS” w/ profiling to allow extra args #1772.
- Fix withUnpackedTarball7z to find name of srcDir after unpacking
(fixes
stack setupfails for ghcjs project on windows) #1774. - Add space before auto-generated bench opts (makes profiling options work uniformly for applications and benchmark suites) #1771.
- Don’t try to find plugin if it resembles flag.
- Setup.hs changes cause package dirtiness #1711.
- Send “stack templates” output to stdout #1792.
1.0.2 - 2016-01-18
Release notes:
- Arch Linux: Stack has been adopted into the official community repository, so we will no longer be updating the AUR with new versions. See the install/upgrade guide for current download instructions.
Major changes:
stack initandsolveroverhaul #1583
Other enhancements:
- Disable locale/codepage hacks when GHC >=7.10.3 #1552
- Specify multiple images to build for
stack image containerdocs - Specify which executables to include in images for
stack image containerdocs - Docker: pass supplementary groups and umask into container
- If git fetch fails wipe the directory and try again from scratch #1418
- Warn if newly installed executables won’t be available on the PATH #1362
stack.yaml: forstack image container, specify multiple images to generate, and which executables should be added to those images- GHCI: add interactive Main selection #1068
- Care less about the particular name of a GHCJS sdist folder #1622
- Unified Enable/disable help messaging #1613
Bug fixes:
- Don’t share precompiled packages between GHC/platform variants and Docker #1551
- Properly redownload corrupted downloads with the correct file size. Mailing list discussion
- Gracefully handle invalid paths in error/warning messages #1561
- Nix: select the correct GHC version corresponding to the snapshot
even when an abstract resolver is passed via
--resolveron the command-line. #1641 - Fix: Stack does not allow using an external package from ghci #1557
- Disable ambiguous global ‘–resolver’ option for ‘stack init’ #1531
- Obey
--no-nixflag - Fix: GHCJS Execute.hs: Non-exhaustive patterns in lambda #1591
- Send file-watch and sticky logger messages to stderr #1302 #1635
- Use globaldb path for querying Cabal version #1647
1.0.0 - 2015-12-24
Release notes:
- We’re calling this version 1.0.0 in preparation for Stackage LTS 4. Note, however, that this does not mean the code’s API will be stable as this is primarily an end-user tool.
Enhancements:
- Added flag
--profileflag: passed withstack build, it will enable profiling, and for--benchand--testit will generate a profiling report by passing+RTS -pto the executable(s). Great for using likestack build --bench --profile(remember that enabling profile will slow down your benchmarks by >4x). Runstack build --benchagain to disable the profiling and get proper speeds - Added flag
--traceflag: just like--profile, it enables profiling, but instead of generating a report for--benchand--test, prints out a stack trace on exception. Great for using likestack build --test --trace - Nix: all options can be overridden on command line #1483
- Nix: build environments (shells) are now pure by default.
- Make verbosity silent by default in script interpreter mode #1472
- Show a message when resetting git commit fails #1453
- Improve Unicode handling in project/package names #1337
- Fix ambiguity between a Stack command and a filename to execute (prefer
stacksubcommands) #1471 - Support multi line interpreter directive comments #1394
- Handle space separated pids in ghc-pkg dump (for GHC HEAD) #1509
- Add ghci –no-package-hiding option #1517
stack newcan download templates from URL #1466
Bug fixes:
- Nix:
stack execoptions are passed properly to the Stack sub process #1538 - Nix: specifying a shell-file works in any current working directory #1547
- Nix: use
--resolverargument - Docker: fix missing image message and ‘–docker-auto-pull’
- No HTML escaping for “stack new” template params #1475
- Set permissions for generated .ghci script #1480
- Restrict commands allowed in interpreter mode #1504
stack ghcidoesn’t see preprocessed files for executables #1347- All test suites run even when only one is requested #1550
- Edge cases in broken templates give odd errors #1535
- Fix test coverage bug on windows
0.1.10.1 - 2015-12-13
Bug fixes:
stack image containerdid not actually build an image #1473
0.1.10.0 - 2015-12-04
Release notes:
- The Stack home page is now at haskellstack.org, which shows the documentation rendered by readthedocs.org. Note: this has necessitated some changes to the links in the documentation’s markdown source code, so please check the links on the website before submitting a PR to fix them.
- The locations of the
Ubuntu
and
Debian
package repositories have changed to have correct URL semantics according to
Debian’s guidelines
#1378. The old
locations will continue to work for some months, but we suggest that you
adjust your
/etc/apt/sources.list.d/fpco.listto the new location to avoid future disruption. - openSUSE and SUSE Linux Enterprise packages are now available, thanks to @mimi1vx. Note: there will be some lag before these pick up new versions, as they are based on Stackage LTS.
Major changes:
- Support for building inside a Nix-shell providing system dependencies #1285
- Add optional GPG signing on
stack upload --signor withstack sig sign ...
Other enhancements:
- Print latest applicable version of packages on conflicts #508
- Support for packages located in Mercurial repositories #1397
- Only run benchmarks specified as build targets #1412
- Support git-style executable fall-through (
stack somethingexecutesstack-somethingif present) #1433 - GHCi now loads intermediate dependencies #584
--work-diroption for overriding.stack-work#1178- Support
detailed-0.9tests #1429 - Docker: improved POSIX signal proxying to containers #547
Bug fixes:
- Show absolute paths in error messages in multi-package builds #1348
- Docker-built binaries and libraries in different path #911 #1367
- Docker:
--resolverargument didn’t effect selected image tag - GHCi: Spaces in filepaths caused module loading issues #1401
- GHCi: cpp-options in Cabal files weren’t used #1419
- Benchmarks couldn’t be run independently of each other #1412
- Send output of building setup to stderr #1410
0.1.8.0 - 2015-11-20
Major changes:
- GHCJS can now be used with stackage snapshots via the new
compilerfield. - Windows installers are now available: download them here #613
- Docker integration works with non-FPComplete generated images #531
Other enhancements:
- Added an
allow-newerconfig option #922 #770 - When a Hackage revision invalidates a build plan in a snapshot, trust the snapshot #770
- Added a
stack config set resolver RESOLVERcommand. Part of work on #115 stack setupcan now install GHCJS on windows. See #1145 and #749stack hpc reportcommand added, which generates reports for HPC tix filesstack ghcinow accepts all the flags accepted bystack build. See #1186stack ghcibuilds the project before launching GHCi. If the build fails, try to launch GHCi anyway. Usestack ghci --no-buildoption to disable #1065stack ghcinow detects and warns about various circumstances where it is liable to fail. See #1270- Added
require-docker-versionconfiguration option - Packages will now usually be built along with their tests and benchmarks. See #1166
- Relative
local-bin-pathpaths will be relative to the project’s root directory, not the current working directory. #1340 stack cleannow takes an optional[PACKAGE]argument for use in multi-package projects. See #583- Ignore cabal_macros.h as a dependency #1195
- Pad timestamps and show local time in –verbose output #1226
- GHCi: Import all modules after loading them #995
- Add subcommand aliases:
replforghci, andrunhaskellforrunghc#1241 - Add typo recommendations for unknown package identifiers #158
- Add
stack path --local-hpc-rootoption - Overhaul dependencies’ haddocks copying #1231
- Support for extra-package-dbs in ‘stack ghci’ #1229
stack newdisallows package names with “words” consisting solely of numbers #1336stack build --fastturns off optimizations- Show progress while downloading package index #1223.
Bug fixes:
- Fix: Haddocks not copied for dependencies #1105
- Fix: Global options did not work consistently after subcommand #519
- Fix: ‘stack ghci’ doesn’t notice that a module got deleted #1180
- Rebuild when Cabal file is changed
- Fix: Paths in GHC warnings not canonicalized, nor those for packages in subdirectories or outside the project root #1259
- Fix: unlisted files in tests and benchmarks trigger extraneous second build #838
0.1.6.0 - 2015-10-15
Major changes:
stack setupnow supports building and booting GHCJS from source tarball.- On Windows, build directories no longer display “pretty” information (like x86_64-windows/Cabal-1.22.4.0), but rather a hash of that content. The reason is to avoid the 260 character path limitation on Windows. See #1027
- Rename config files and clarify their purposes
#969
~/.stack/stack.yaml–>~/.stack/config.yaml~/.stack/global–>~/.stack/global-project/etc/stack/config–>/etc/stack/config.yaml- Old locations still supported, with deprecation warnings
- New command “stack eval CODE”, which evaluates to “stack exec ghc – -e CODE”.
Other enhancements:
- No longer install
giton Windows #1046. You can still get this behavior by running the following yourself:stack exec -- pacman -Sy --noconfirm git. - Typing enter during –file-watch triggers a rebuild #1023
- Use Haddock’s
--hyperlinked-source(crosslinked source), if available #1070 - Use Stack-installed GHCs for
stack init --solver#1072 - Experimental: Add
stack querycommand #1087 - By default, Stack no longer rebuilds a package due to GHC options changes.
This behavior can be tweaked with the
rebuild-ghc-optionssetting. #1089 - By default, ghc-options are applied to all local packages, not just targets.
This behavior can be tweaked with the
apply-ghc-optionssetting. #1089 - Docker: download or override location of Stack executable to re-run in container #974
- Docker: when Docker Engine is remote, don’t run containerized processes as host’s UID/GID #194
- Docker:
set-useroption to enable/disable running containerized processes as host’s UID/GID #194 - Custom Setup.hs files are now precompiled instead of interpreted. This should be a major performance win for certain edge cases (biggest example: building Cabal itself) while being either neutral or a minor slowdown for more common cases.
stack test --coveragenow also generates a unified coverage report for multiple test-suites / packages. In the unified report, test-suites can contribute to the coverage of other packages.
Bug fixes:
- Ignore stack-built executables named
ghc#1052 - Fix quoting of output failed command line arguments
- Mark executable-only packages as installed when copied from cache #1043
- Canonicalize temporary directory paths #1047
- Put code page fix inside the build function itself #1066
- Add
explicit-setup-depsoption #1110, and change the default to the old behavior of using any package in the global and snapshot database #1025 - Precompiled cache checks full package IDs on Cabal < 1.22 #1103
- Pass -package-id to ghci #867
- Ignore global packages when copying precompiled packages #1146
0.1.5.0 - 2015-09-24
Major changes:
- On Windows, we now use a full MSYS2 installation in place of the previous PortableGit. This gives you access to the pacman package manager for more easily installing libraries.
- Support for custom GHC binary distributions
#530
ghc-variantoption instack.yamlto specify the variant (also--ghc-variantcommand-line option)setup-infoinstack.yaml, to specify where to download custom binary distributions (also--ghc-bindistcommand-line option)- Note: On systems with libgmp4 (aka
libgmp.so.3), such as CentOS 6, you may need to re-runstack setupdue to the centos6 GHC bindist being treated like a variant
- A new
--pvp-boundsflag to the sdist and upload commands allows automatic adding of PVP upper and/or lower bounds to your dependencies
Other enhancements:
- Adapt to upcoming Cabal installed package identifier format change #851
stack setuptakes a--stack-setup-yamlargument--file-watchis more discerning about which files to rebuild for #912stack pathnow supports--global-pkg-dband--ghc-package-path--reconfigureflag #914 #946- Cached data is written with a checksum of its structure #889
- Fully removed
--optimizationsflag - Added
--cabal-verboseflag - Added
--file-watch-pollflag for polling instead of using filesystem events (useful for running tests in a Docker container while modifying code in the host environment. When code is injected into the container via a volume, the container won’t propagate filesystem events). - Give a preemptive error message when
-profis given as a GHC option #1015 - Locking is now optional, and will be turned on by setting the
STACK_LOCKenvironment variable totrue#950 - Create default
stack.yamlwith documentation comments and commented out options #226 - Out of memory warning if Cabal exits with -9 #947
Bug fixes:
- Hacky workaround for optparse-applicative issue with
stack exec --help#806 - Build executables for local extra-deps #920
- copyFile can’t handle directories #942
- Support for spaces in Haddock interface files fpco/minghc#85
- Temporarily building against a “shadowing” local package? #992
- Fix
Setup.exename for--upgrade-cabalon Windows #1002 - Unlisted dependencies no longer trigger extraneous second build #838
0.1.4.1 - 2015-09-04
Fix stack’s own Haddocks. No changes to functionality (only comments updated).
0.1.4.0 - 2015-09-04
Major changes:
- You now have more control over how GHC versions are matched, e.g. “use exactly this version,” “use the specified minor version, but allow patches,” or “use the given minor version or any later minor in the given major release.” The default has switched from allowing newer later minor versions to a specific minor version allowing patches. For more information, see #736 and #784.
- Support added for compiling with GHCJS
- Stack can now reuse prebuilt binaries between snapshots. That means that, if you build package foo in LTS-3.1, that binary version can be reused in LTS-3.2, assuming it uses the same dependencies and flags. #878
Other enhancements:
- Added the
--docker-envargument, to set environment variables in Docker container. - Set locale environment variables to UTF-8 encoding for builds to avoid “commitBuffer: invalid argument” errors from GHC #793
- Enable transliteration for encoding on stdout and stderr #824
- By default,
stack upgradeautomatically installs GHC as necessary #797 - Added the
ghc-optionsfield tostack.yaml#796 - Added the
extra-pathfield tostack.yaml - Code page changes on Windows only apply to the build command (and its synonyms), and can be controlled via a command line flag (still defaults to on) #757
- Implicitly add packages to extra-deps when a flag for them is set #807
- Use a precompiled Setup.hs for simple build types #801
- Set –enable-tests and –enable-benchmarks optimistically #805
--only-configureoption added #820- Check for duplicate local package names
- Stop nagging people that call
stack test#845 --file-watchwill ignore files that are in your VCS boring/ignore files #703- Add
--numeric-versionoption
Bug fixes:
stack init --solverfails ifGHC_PACKAGE_PATHis present #860stack solverandstack init --solvercheck for test suite and benchmark dependencies #862- More intelligent logic for setting UTF-8 locale environment variables #856
- Create missing directories for
stack sdist - Don’t ignore Cabal files with extra periods #895
- Deprecate unused
--optimizationsflag - Truncated output on slow terminals #413
0.1.3.1 - 2015-08-12
Bug fixes:
- Ignore disabled executables #763
0.1.3.0 - 2015-08-12
Major changes:
- Detect when a module is compiled but not listed in the Cabal file
(#32)
- A warning is displayed for any modules that should be added to
other-modulesin the Cabal file - These modules are taken into account when determining whether a package needs to be built
- A warning is displayed for any modules that should be added to
- Respect TemplateHaskell addDependentFile dependency changes
(#105)
- TH dependent files are taken into account when determining whether a package needs to be built.
- Overhauled target parsing, added
--testand--benchoptions #651- For details, see Build commands documentation
Other enhancements:
- Set the
HASKELL_DIST_DIRenvironment variable #524 - Track build status of tests and benchmarks #525
--no-run-tests#517- Targets outside of root dir don’t build #366
- Upper limit on number of flag combinations to test #543
- Fuzzy matching support to give better error messages for close version numbers #504
--local-bin-pathglobal option. Use to change where binaries get placed on a--copy-bins#342- Custom snapshots #111
- –force-dirty flag: Force treating all local packages as having dirty files (useful for cases where Stack can’t detect a file change)
- GHC error messages: display file paths as absolute instead of relative for better editor integration
- Add the
--copy-binsoption #569 - Give warnings on unexpected config keys #48
- Remove Docker
pass-hostoption - Don’t require
cabal-installto upload #313 - Generate indexes for all deps and all installed snapshot packages #143
- Provide
--resolver globaloption #645- Also supports
--resolver nightly,--resolver lts, and--resolver lts-X
- Also supports
- Make
stack build --flagerror when flag or package is unknown #617 - Preserve file permissions when unpacking sources #666
stack buildetc work outside of a projectlist-dependenciescommand #638--upgrade-cabaloption tostack setup#174--execoption #651--only-dependenciesimplemented correctly #387
Bug fixes:
- Extensions from the
other-extensionsfield no longer enabled by default #449 - Fix: haddock forces rebuild of empty packages #452
- Don’t copy over executables excluded by component selection #605
- Fix: Stack fails on Windows with git package in
stack.yamland no git binary on path #712 - Fixed GHCi issue: Specifying explicit package versions (#678)
- Fixed GHCi issue: Specifying -odir and -hidir as .stack-work/odir (#529)
- Fixed GHCi issue: Specifying A instead of A.ext for modules (#498)
0.1.2.0 - 2015-07-05
- Add
--pruneflag tostack dot#487 - Add
--[no-]external,--[no-]include-baseflags tostack dot#437 - Add
--ignore-subdirsflag to init command #435 - Handle attempt to use non-existing resolver #436
- Add
--forceflag toinitcommand - exec style commands accept the
--packageoption (see Reddit discussion) stack uploadwithout arguments doesn’t do anything #439- Print latest version of packages on conflicts #450
- Flag to avoid rerunning tests that haven’t changed #451
- Stack can act as a script interpreter (see [Script interpreter] (https://github.com/commercialhaskell/stack/wiki/Script-interpreter) and Reddit discussion)
- Add the
--file-watchflag to auto-rebuild on file changes #113 - Rename
stack docker exectostack exec --plain - Add the
--skip-msysflag #377 --keep-going, turned on by default for tests and benchmarks #478concurrent-tests: BOOL#492- Use hashes to check file dirtiness #502
- Install correct GHC build on systems with libgmp.so.3 #465
stack upgradechecks version before upgrading #447
0.1.1.0 - 2015-06-26
- Remove GHC uncompressed tar file after installation #376
- Put stackage snapshots JSON on S3 #380
- Specifying flags for multiple packages #335
- single test suite failure should show entire log #388
- valid-wanted is a confusing option name #386
stack initin multi-package project should use local packages for dependency checking #384- Display information on why a snapshot was rejected #381
- Give a reason for unregistering packages #389
stack execaccepts the--no-ghc-package-pathparameter- Don’t require build plan to upload #400
- Specifying test components only builds/runs those tests #398
STACK_EXEenvironment variable- Add the
stack dotcommand stack upgradeadded #237--stack-yamlcommand line flag #378--skip-ghc-checkcommand line flag #423
Bug fixes:
- Haddock links to global packages no longer broken on Windows #375
- Make flags case-insensitive #397
- Mark packages uninstalled before rebuilding #365
0.1.0.0 - 2015-06-23
- Fall back to Cabal dependency solver when a snapshot can’t be found
- Basic implementation of
stack new#137 stack solvercommand #364stack pathcommand #95- Haddocks #143:
- Build for dependencies
- Use relative links
- Generate module contents and index for all packages in project
0.0.3 - 2015-06-17
--prefetch#297uploadcommand ported from stackage-upload #225--only-snapshot#310--resolver#224stack init#253--extra-include-dirsand--extra-lib-dirs#333- Specify intra-package target #201
0.0.2 - 2015-06-14
- Fix some Windows specific bugs #216
- Improve output for package index updates #227
- Automatically update indices as necessary #227
- –verbose flag #217
- Remove packages (HTTPS and Git) #199
- Config values for system-ghc and install-ghc
- Merge
stack depsfunctionality intostack build installcommand #153 and #272- overriding architecture value (useful to force 64-bit GHC on Windows, for example)
- Overhauled test running (allows cycles, avoids unnecessary recompilation, etc)
0.0.1 - 2015-06-09
- First public release, beta quality