Module documentation for 0.4.0.1
There are no documented modules for this package.
A CLI tool for building Haskell projects easily over Stackage major versions.
This is how I do my Haskell build CI for projects locally with stack.
stack-all by default runs
stack build over Stackage Nightly and
LTS major versions (current default is nightly & LTS 19, 18, 16, 14, 13, 12, 11)
corresponding to latest major ghc minor versions,
with appropriate stack
stack only works if a
stack.yaml file exists.
stack.yaml file is found,
stack-all will create one.
Of course it may still fail to build, but this allows for
quickly trying to build a package that does not include stack support.
stack-all can use
stack-ltsXX.yaml files to override the default
stack.yaml file for particular Stackage major versions.
Note that a
stack-ltsXX.yaml file will also be used for
older LTS major versions until another
stack-ltsYY.yaml file is found.
stack-nightly.yaml is also supported, but used only for nightly.
For example if you have
in your project,
stack.yaml will be used as normal to build nightly, lts-18 and lts-16,
stack-lts14.yaml will be used for building lts-14 and lts-13,
stack-lts12.yaml will be used for lts-12, lts-11 (and older).
stack-all overrides the exact resolver with the latest minor snapshot,
the exact minor Stackage version specified in the
doesn’t actually matter:
stack-all always uses the latest published
minor releases of Stackage major versions.
stack-ltsXX.yaml files can be easily created using
stack-all --make-lts ltsXX (or
-s ltsXX for short).
(Other versioned stack.yaml filenames like stack-ghc-8.8.yaml are not currently supported.)
Specifying LTS versions
You can abbreviate
lts-XX args to
ltsXX on the commandline.
lts is also accepted and resolved to the latest major LTS version.
--newest options to specify the range of
lts versions to build over:
You can specify the oldest major LTS to build for with eg
stack-all -o lts13.
Otherwise if not configured the default oldest LTS is currently
Similarly you can specify the newest LTS version to build from with
stack-all -n lts16. (The default is to build from nightly.)
Alternatively, one can give one or more explicit LTS major versions to build
for as arguments: eg
stack-all lts14 if you only wish to build that version.
Configuring the oldest and/or newest LTS to build
You can configure the oldest working LTS major version for your project
by running for example
stack-all -c -o lts-13 which generates a
project config file like this:
[versions] # lts-12 too old oldest = lts-13
(the comment line can be used to document why the older LTS doesn’t work). This specifies that the oldest LTS version to build for is lts-13.
The newest LTS to build with stack-all can similarly be configured:
stack-all -c -n lts18 or setting
newest = lts-18.
Running other stack commands
stack-all just runs the stack
build command over
Stackage major versions.
You can also specify a stack command to run with options on the commandline: eg
$ stack-all test --no-rerun-tests
stack test over the LTS versions instead.
Happy stack building!
The project is released on Hackage.
You can also build from git source with
stack install or
The project is hosted at https://github.com/juhp/stack-all under a BSD license.
Release history for stack-all
- fix build with simple-cmd-0.2.4
- ‘lts’ alias can now be used as a commandline version argument
- stack-nightly.yaml is now only used for building nightly
- if creating stack.yaml use latest lts snapshot resolver from snapshot.json
- support aeson-2.0
- newest LTS for a project can now be configured
- use cached-json-file for snapshots.json
- add –keep-going
- exclude lts17 now by default
- use hackage.stackage.org/snapshots.json:
- to determine the latest LTS major version
- to resolve major LTS version to latest minor snapshot and also print it
- cache snapshots.json locally in ~/.cache/stack-all/ for a few hours
- new –make-lts command to generate a stack-ltsXX.yaml file from newer one
- create a stack.yaml file if only an .cabal file is found
- if stack fails, print the ~/.stack snapshot path for reference
- better error messages when reading snapshot option/arg (TristanCacqueray)
- search parent dirs for stack project dir, like stack
- snapshot options/args can now be in compact ltsXY form as well as lts-XY
- support stack commands and options
- –create-config comment line mentions older version
- show error for unversioned “stack-lts.yaml”
- add lts-17
- fix ordering of stack-lts-*.yaml
- allow –newest to override oldest lts config
- initial release with –create-config, –debug, –cmd, –newest
- VersionSpec: –all-lts, –oldest, and lts args