Library of cut out people for illustrating architectural visualizations. The selection includes thousands of high-quality cutouts for post-production of architectural renderings.
This page is intended to fully document all configuration options available inthe stack.yaml file. Note that this page is likely to be both incomplete andsometimes inaccurate. If you see such cases, please update the page, and ifyou're not sure how, open an issue labeled 'question'.
- Building Docker images can be slow, and Docker’s build system is also missing some critical security features, in particular the ability to use build secrets without leaking them. So over the past few years the Docker developers have been working on a new backend for building images, BuildKit. With the release of Docker 20.10 in late 2020, BuildKit is finally marked as stable–and you don.
- For almost all PCs. This includes most machines with Intel/AMD/etc type processors and almost all computers that run Microsoft Windows, as well as newer Apple Macintosh systems based on Intel processors. Server install image. The server install image allows you to install Ubuntu permanently on a computer for use as a server.
The stack.yaml configuration options break down into project-specific options in:
<project dir>/stack.yaml
and non-project-specific options in:
/etc/stack/config.yaml
-- for system global non-project default options~/.stack/config.yaml
-- for user non-project default options- The project file itself may also contain non-project specific options
Note: When stack is invoked outside a stack project it will source projectspecific options from ~/.stack/global-project/stack.yaml
. When stack isinvoked inside a stack project, only options from <project dir>/stack.yaml
areused, and ~/.stack/global-project/stack.yaml
is ignored.
Note 2: A common source of confusion is the distinction between configurationin a stack.yaml
file versus a cabal file. If you're trying to understand thisbreakdown, see stack vs cabal config.
Project-specific config¶
Project-specific options are only valid in the stack.yaml
file local to aproject, not in the user or global config files.
Note: We define project to mean a directory that contains a stack.yaml
file, which specifies how to build a set of packages. We define package tobe a package with a .cabal
file or Hpack package.yaml
file.
In your project-specific options, you specify both which local packages tobuild and which dependencies to use when building these packages. Unlike theuser's local packages, these dependencies aren't built by default. They only getbuilt when needed.
Shadowing semantics, describedhere, areapplied to your configuration. So, if you add a package to your packages
list,it will be used even if you're using a snapshot that specifies a particularversion. Similarly, extra-deps
will shadow the version specified in theresolver.
resolver¶
Note: Starting with Stack 2.0, snapshot
is accepted as a synonym for resolver
. Only one of these fields is permitted, not both.
Specifies which snapshot is to be used for this project. A snapshotdefines a GHC version, a number of packages available forinstallation, and various settings like build flags. It is called aresolver since a snapshot states how dependencies are resolved. Thereare currently four resolver types:
- LTS Haskell snapshots, e.g.
resolver: lts-2.14
- Stackage Nightly snapshot, e.g.
resolver: nightly-2015-06-16
- No snapshot, just use packages shipped with the compiler
- For GHC this looks like
resolver: ghc-7.10.2
- For GHC this looks like
- Custom snapshot, via a URL or relative file path. (See pantry docs for more information.)
Each of these resolvers will also determine what constraints are placed on thecompiler version. See the compiler-check option for someadditional control over compiler version.
Since Stack 1.11, the resolver field corresponds to a Pantry snapshotlocation. See the docs on pantry for more information.
packages¶
NOTE Beginning with Stack 1.11, Stack has moved over to Pantry formanaging extra-deps, and has removed some legacy syntax for specifyingdependencies in packages
. See some conversion notes below.
A list of packages that are part of your local project. These arespecified via paths to local directories. The paths are consideredrelative to the directory containing the stack.yaml
file. Forexample, if your stack.yaml
is located at /foo/bar/stack.yaml
, andyou have:
Your configuration means 'I have packages in /foo/bar/hello
and/foo/bar/there/world
.
If these packages should be treated as dependencies instead, specifythem in extra-deps
, described below.
The packages
field is optional. If omitted, it is treated as:
Each package directory specified must have a valid cabal file or hpackpackage.yaml
file present. Note that the subdirectories of thedirectory are not searched for cabal files. Subdirectories will haveto be specified as independent items in the list of packages.
Meaning that your project has exactly one package, and it is locatedin the current directory.
Project packages are different from snapshot dependencies (viaresolver
) and extra dependencies (via extra-deps
) in multipleways, e.g.:
- Project packages will be built by default with a
stack build
without specific targets. Dependencies will only be built if they are depended upon. - Test suites and benchmarks may be run for project packages. They are never run for extra dependencies.
Legacy syntax Prior to Stack 1.11, it was possible to specifydependencies in your packages
configuration value as well. Thissupport has been removed to simplify the file format. Instead, thesevalues should be moved to extra-deps
. As a concrete example, youwould convert:
into
And, in fact, the packages
value could be left off entirely sinceit's using the default value.
extra-deps¶
This field allows you to specify extra dependencies on top of what isdefined in your snapshot (specified in the resolver
field mentionedabove). These dependencies may either come from a local file path or aPantry package location.
For the local file path case, the same relative path rules as apply topackages
apply.
Pantry package locations allow you to include dependencies from threedifferent kinds of sources:
- Hackage
- Archives (tarballs or zip files, either local or over HTTP(S))
- Git or Mercurial repositories
Here's an example using all of the above:
If no extra-deps
value is provided, it defaults to an empty list,e.g.:
For more information on the format for specifying dependencies, pleasesee the Pantry docs.
flags¶
Flags can be set for each package separately, e.g.
If a specified flag is different than the one specified for a snapshot package,then the snapshot package will automatically be promoted to be an extra-dep.
drop-packages¶
Packages which, when present in the snapshot specified in resolver
,should not be included in our package. This can be used for a fewdifferent purposes, e.g.:
- Ensure that packages you don't want used in your project cannot be used in a
package.yaml
file (e.g., for license reasons) - Prevent overriding of a global package like
Cabal
. For more information, see stackage#4425 - When using a custom GHC build, avoid incompatible packages (see this comment).
Since Stack 2.0
user-message¶
A user-message is inserted by stack init
when it omits packages or addsexternal dependencies. For example:
This messages is displayed every time the config is loaded by stack and servesas a reminder for the user to review the configuration and make any changes ifneeded. The user can delete this message if the generated configuration isacceptable.
Non-project-specific config¶
Non-project config options may go in the global config (/etc/stack/config.yaml
) or the user config (~/.stack/config.yaml
).
docker¶
See Docker integration.
nix¶
(since 0.1.10.0)
See Nix integration.
connection-count¶
Integer indicating how many simultaneous downloads are allowed to happen
Default: 8
hide-th-loading¶
Strip out the 'Loading ..' lines from GHC build output, produced when using Template Haskell
Default: true
local-bin-path¶
Target directory for stack install
and stack build --copy-bins
.
Default: ~/.local/bin
package-indices¶
Since Stack 1.11, this field may only be used to specify a singlepackage index, which must use the Hackage Security format. For themotivation for this change, please see issue #4137.Therefore, this field is most useful for providing an alternateHackage mirror either for:
- Bypassing a firewall
- Faster download speeds
The following is the default setting for this field:
If you provide a replacement index which does not mirror Hackage, itis likely that you'll end up with significant breakage, such as mostsnapshots failing to work.
Note: since Stack v2.1.3, ignore-expiry
was changed to true
bydefault. For more information on this change, seeissue #4928.
system-ghc¶
Enables or disables using the GHC available on the PATH. (Make sure PATH is explicit, i.e., don't use ~.)Useful to enable if you want to save the time, bandwidth or storage space needed to setup an isolated GHC.Default is false
unless the Docker or Nix integration is enabled.In a Nix-enabled configuration, stack is incompatible with system-ghc: false
.
install-ghc¶
Whether or not to automatically install GHC when necessary. SinceStack 1.5.0, the default is true
, which means Stack will not ask youbefore downloading and installing GHC.
skip-ghc-check¶
Should we skip the check to confirm that your system GHC version (on the PATH)matches what your project expects? Default is false
.
require-stack-version¶
Require a version of stack within the specified range(cabal-style)to be used for this project. Example: require-stack-version: ' 0.1.*'
Default: '-any'
arch/os¶
Set the architecture and operating system for GHC, build directories, etc. Values are those recognized by Cabal, e.g.:
You likely only ever want to change the arch value. This can also be set via the command line.
Downloaded Newer Image For Windows 10
extra-include-dirs/extra-lib-dirs¶
A list of extra paths to be searched for header files and libraries, respectively. Paths should be absolute
Since these are system-dependent absolute paths, it is recommended that youspecify these in your config.yaml
within the stack root (usually, ~/.stack
or, on Windows, %LOCALAPPDATA%Programsstack
). If you control the buildenvironment in your project's stack.yaml
, perhaps through docker or othermeans, then it may well make sense to include these there as well.
with-gcc¶
Specify a path to gcc explicitly, rather than relying on the normal path resolution.
with-hpack¶
Use an Hpack executable, rather than using the bundled Hpack.
compiler-check¶
(Since 0.1.4)
Specifies how the compiler version in the resolver is matched against concrete versions. Valid values:
match-minor
: make sure that the first three components match, but allow patch-level differences. For example< 7.8.4.1 and 7.8.4.2 would both match 7.8.4. This is useful to allow for custom patch levels of a compiler. This is the defaultmatch-exact
: the entire version number must match preciselynewer-minor
: the third component can be increased, e.g. if your resolver isghc-7.10.1
, then 7.10.2 will also be allowed. This was the default up through stack 0.1.3
compiler¶
(Since 0.1.7)
Overrides the compiler version in the resolver. Note that the compiler-check
flag also applies to the version numbers. This uses the same syntax as compilerresolvers like ghc-8.6.5
. This can be used to override thecompiler for a Stackage snapshot, like this:
Building GHC from source (experimental)¶
(Since 2.0)
Stack supports building the GHC compiler from source. The version to build andto use is defined by a a Git commit ID and an Hadrian 'flavour' (Hadrian is thebuild system of GHC) with the following syntax:
In the following example the commit ID is '5be7ad..' and the flavour is'quick':
By default the code is retrieved from the main GHC repository. If you want toselect another repository, set the 'compiler-repository' option:
Note that Stack doesn't check the compiler version when it uses a compiler builtfrom source. Moreover it is assumed that the built compiler is recent enough asStack doesn't enable any known workaround to make older compilers work.
Building the compiler can take a very long time (more than one hour). Hint: forfaster build times, use Hadrian flavours that disable documentation generation.
The Mojave 10.14.1 update does NOT install properly on unsupported machines, and could result in an unbootable OS. If you want to install the 10.14.1 update (and are not currently running 10.14.1), perform the following steps. Install mojave os. The final official version of macOS 10.14 Mojave, the latest operating system for Macs and MacBooks, has been released, and it in this guide we'll show you how to download and install it safely.
Global packages¶
The GHC compiler you build from sources may depend on unreleased versions ofsome global packages (e.g. Cabal). It may be an issue if a package you try tobuild with this compiler depends on such global packages because Stack may notbe able to find versions of those packages (on Hackage, etc.) that arecompatible with the compiler.
The easiest way to deal with this issue is to drop the offending packages asfollows. Instead of using the packages specified in the resolver, the globalpackages bundled with GHC will be used.
Another way to deal with this issue is to add the relevant packages asextra-deps
built from source. To avoid mismatching versions, you can useexactly the same commit id you used to build GHC as follows:
Bootstrapping compiler¶
Building GHC from source requires a working GHC (known as the bootstrapcompiler). As we use a Stack based version of Hadrian (hadrian/build.stack.sh
inGHC sources), the bootstrap compiler is configured into hadrian/stack.yaml
andfully managed by Stack.
ghc-options¶
(Since 0.1.4)
Allows specifying per-package and global GHC options:
Since 1.6.0, setting a GHC options for a specific package willautomatically promote it to a local package (much like setting acustom package flag). However, setting options via $everything
on all flagswill not do so (seeGithub discussionfor reasoning). This can lead to unpredictable behavior by affectingyour snapshot packages.
The behavior of the $locals
, $targets
, and $everything
specialkeys mirrors the behavior for theapply-ghc-options
setting, which affectscommand line parameters.
NOTE: Prior to version 1.6.0, the $locals
, $targets
, and$everything
keys were not supported. Instead, you could use '*'
forthe behavior represented now by $everything
. It is highlyrecommended to switch to the new, more expressive, keys.
apply-ghc-options¶
(Since 0.1.6)
Which packages do ghc-options on the command line get applied to? Before 0.1.6, the default value was targets
Note that everything
is a slightly dangerous value, as it can break invariants about your snapshot database.
rebuild-ghc-options¶
(Since 0.1.6)
Should we rebuild a package when its GHC options change? Before 0.1.6, this wasa non-configurable true. However, in most cases, the flag is used to affectoptimization levels and warning behavior, for which GHC itself doesn't actuallyrecompile the modules anyway. Therefore, the new behavior is to not recompileon an options change, but this behavior can be changed back with the following:
configure-options¶
Options which are passed to the configure step of the Cabal build process.These can either be set by package name, or using the $everything
,$targets
, and $locals
special keys. These special keys have the samemeaning as in ghc-options
.
(Since 2.0)
ghc-variant¶
(Since 0.1.5)
Specify a variant binary distribution of GHC to use. Known values:
standard
: This is the default, uses the standard GHC binary distributionintegersimple
: Use a GHC bindist that uses integer-simple instead of GMP- any other value: Use a custom GHC bindist. You should specify setup-info or setup-info-locations so
stack setup
knows where to download it, or pass thestack setup --ghc-bindist
argument on the command-line
This option is incompatible with system-ghc: true
.
ghc-build¶
(Since 1.3.0)
Specify a specialized architecture bindist to use. Normally this isdetermined automatically, but you can override the autodetected value here.Possible arguments include standard
, gmp4
, tinfo6
, and nopie
.
setup-info-locations¶
(Since 2.3)
Possible usages of this config are:1. Using stack
offline or behind a firewall2. Extending the tools known to stack
such as cutting-edge versions of ghc
or builds for custom linux distributions.
The setup-info
dictionary specifies locations for installation of Haskell-related tooling - it maps (Tool, Platform, Version)
to the location where it can be obtained, such as (GHC, Windows64, 8.6.5)
to the url hosting the *.tar.xz
for GHC's installation.
By default, it's obtained from stack-setup-2.yaml.
The setup-info
dictionary is constructed in the following order:1. setup-info
yaml configuration - inline config2. --setup-info-yaml
command line arguments - urls or paths, multiple locations may be specified.3. setup-info-locations
yaml configuration - urls or paths
The first location which specifies the location of a tool (Tool, Platform, Version)
takes precedence, so one can extend the default tools with a fallback to the default setup-info
location:
The default setup-info
location is included only if no locations in the setup-info-locations
config or the --setup-info-yaml
command line argument were specified.
Thus the following will cause stack setup
not to consult github for the setup-info
:
Relative paths are resolved relative to the stack.yaml
file - either in the local project or the global stack.yaml
in the stack directory.
Relative paths may also be used inside paths to tool installs - such as for ghc or 7z, which allows vendoring the tools inside a monorepo.For example:
Directory structure:
In the project's stack.yaml
:
In installs/my-stack-setup.yaml
:
setup-info¶
(Since 0.1.5)
Allows augmenting from where tools like GHC and msys2 (on Windows) aredownloaded. Most useful for specifying locations of custom GHC binarydistributions (for use with the ghc-variant option).
The format of this field is the same as in the default stack-setup-2.yaml: Itunes for mac download latest version.
This configuration adds the specified setup info metadata to the default;Specifying this config does not prevent the default stack-setup-2.yaml
from being consulted as a fallback.
If you need to replace the default setup-info, add the following:
pvp-bounds¶
(Since 0.1.5)
NOTE As of Stack 1.6.0, this feature does not reliably work, dueto issues with the Cabal library's printer. Stack will generate awarning when a lossy conversion occurs, in which case you may need todisable this setting. See#3550 formore information.
When using the sdist
and upload
commands, this setting determines whetherthe cabal file's dependencies should be modified to reflect PVP lower and upperbounds. Values are none
(unchanged), upper
(add upper bounds), lower
(addlower bounds), and both (and upper and lower bounds). The algorithm it followsis:
- If an upper or lower bound already exists on a dependency, it's left alone
- When adding a lower bound, we look at the current version specified by stack.yaml, and set it as the lower bound (e.g.,
foo >= 1.2.3
) - When adding an upper bound, we require less than the next major version (e.g.,
foo < 1.3
)
For more information, see the announcement blog post.
NOTE Since Stack 1.5.0, each of the values listed above supportsadding -revision
to the end of each value, e.g. pvp-bounds:both-revision
. This means that, when uploading to Hackage, Stack willfirst upload your tarball with an unmodified .cabal
file, and thenupload a cabal file revision with the PVP bounds added. This can beuseful—especially combined with theStackage no-revisions feature—asa method to ensure PVP compliance without having to proactively fixbounds issues for Stackage maintenance.
modify-code-page¶
(Since 0.1.6)
Modify the code page for UTF-8 output when running on Windows. Default behavioris to modify.
explicit-setup-deps¶
(Since 0.1.6)
Decide whether a custom Setup.hs
script should be run with an explicit list ofdependencies, based on the dependencies of the package itself. It associates thename of a local package with a boolean. When it's true
, the Setup.hs
scriptis built with an explicit list of packages. When it's false
(default), theSetup.hs
script is built without access to the local DB, but can access anypackage in the snapshot / global DB.
Note that in the future, this will be unnecessary, once Cabal provides fullsupport for explicit Setup.hs dependencies.
NOTE: since 1.4.0, Stack has support for Cabal's custom-setup
block(introduced in Cabal 1.24). If a custom-setup
block is provided in a .cabal
file, it will override the setting of explicit-setup-deps
, and instead relyon the stated dependencies.
allow-newer¶
(Since 0.1.7)
Ignore version bounds in .cabal files. Default is false.
Note that this also ignores lower bounds. The name 'allow-newer' is chosen tomatch the commonly used cabal option.
allow-different-user¶
(Since 1.0.1)
Allow users other than the owner of the stack root directory (typically ~/.stack
)to use the stack installation. The default is false
. POSIX systems only.
The intention of this option is to prevent file permission problems, for exampleas the result of a stack
command executed under sudo
.
The option is automatically enabled when stack
is re-spawned in a Docker process.
build¶
(Since 1.1.0)
Allows setting build options which are usually specified on the CLI. Here arethe settings with their defaults:
The meanings of these settings correspond directly with the CLI flags of thesame name. See the build command docs and theusers guide for more info.
dump-logs¶
(Since 1.3.0)
Control which log output from local non-dependency packages to print to theconsole. By default, Stack will only do this when building a single targetpackage or if the log contains warnings, to avoid generating unnecessarilyverbose output.
templates¶
Templates used with stack new
have a number of parameters that affect thegenerated code. These can be set for all new projects you create. The result ofthem can be observed in the generated LICENSE and cabal files. The value for allof these parameters must be strings.
The parameters are: author-email
, author-name
, category
, copyright
, year
and github-username
.
- author-email - sets the
maintainer
property in cabal - author-name - sets the
author
property in cabal and the name used in LICENSE - category - sets the
category
property in cabal. This is used in Hackage. For examples of categories see Packages by category. It makes sense forcategory
to be set on a per project basis because it is uncommon for all projects a user creates to belong to the same category. The category can be set per project by passing-p 'category:value'
to thestack new
command. - copyright - sets the
copyright
property in cabal. It is typically the name of the holder of the copyright on the package and the year(s) from which copyright is claimed. For example:Copyright (c) 2006-2007 Joe Bloggs
- year - if
copyright
is not specified,year
andauthor-name
are used to generate the copyright property in cabal. Ifyear
is not specified, it defaults to the current year. - github-username - used to generate
homepage
andsource-repository
in cabal. For instancegithub-username: myusername
andstack new my-project new-template
would result:
These properties can be set in config.yaml
as follows: Mysql workbench macos install.
Additionally, stack new
can automatically initialize source control repositoriesin the directories it creates. Source control tools can be specified with thescm-init
option. At the moment, only git
is supported.
save-hackage-creds¶
Controls whether, when using stack upload
, the user's Hackageusername and password are stored in a local file. Default: true.
Since 1.5.0
hackage-base-url¶
Sets the address of the Hackage server to upload the package to. Default ishttps://hackage.haskell.org/
.
Since 1.9.1
ignore-revision-mismatch¶
This flag was introduced in Stack 1.6, and removed in Stack 1.11 withthe move to Pantry. You will receive a warning if this configurationvalue is set.
urls¶
Customize the URLs where stack
looks for snapshot build plans.
The default configuration is
jobs¶
Specifies how many build tasks should be run in parallel. This can be overloadedon the commandline via -jN
, for example -j2
. The default is to use thenumber of processors reported by your CPU. One usage for this might be to avoidrunning out of memory by setting it to 1, like this:
work-dir¶
Specifies relative path of work directory (default is .stack-work
. This canalso be specified by env var or cli flag, in particular, the earlier items inthis list take precedence:
--work-dir DIR
passed on the commandlinework-dir
in stack.yamlSTACK_WORK
environment variable
Since 0.1.10.0
skip-msys¶
Skips checking for and installing msys2 when stack is setting up theenvironment. This is only useful on Windows machines, and usually doesn't makesense in project configurations, just in config.yaml
. Defaults to false
, soif this is used, it only really makes sense to use it like this:
Since 0.1.2.0
concurrent-tests¶
This option specifies whether test-suites should be executed concurrently witheach-other. The default for this is true, since this is usually fine and itoften means that tests can complete earlier. However, if some test-suitesrequire exclusive access to some resource, or require a great deal of CPU ormemory resources, then it makes sense to set this to false
(the default istrue
).
Since 0.1.2.0
extra-path¶
This option specifies additional directories to prepend to the PATH environmentvariable. These will be used when resolving the location of executables, andwill also be visible in the PATH
variable of processes run by stack.
For example, to prepend /path-to-some-dep/bin
to your PATH:
One thing to note is that other paths added by stack - things like the project'sbin dir and the compiler's bin dir - will take precedence over those specifiedhere (the automatic paths get prepended).
Since 0.1.4.0
local-programs-path¶
This overrides the location of the programs directory, where tools like ghc andmsys get installed.
Status: Downloaded Newer Image For
On most systems, this defaults to a folder called programs
within the stack root directory. On Windows, if the LOCALAPPDATA
environmentvariable exists, then it defaults to %LOCALAPPDATA%Programsstack
, whichfollows Windows' conventions.
NOTE: On Windows, if there is a space character in the %LOCALAPPDATA%
path(which may be the case if the relevant user account name and its correspondinguser profie path have a space) this may cause problems with building packagesthat make use of the GNU project's autoconf
package and configure
shellscript files. That may be the case particularly if there is no correspondingshort name ('8 dot 3' name) for the folder in the path with the space (which maybe the case if '8 dot 3' names have been stripped or their creation not enabledby default). If there are problems building, it will be necessary to overridethe default location of stack's programs directory to specify an alternativepath that does not contain space characters. Examples of packages on Hackagethat make use of configure
are network
and process
.
Since 1.3.0
default-template¶
This option specifies which template to use with stack new
, when none isspecified. The default is called new-template
. The other templates are listedin the stack-templates repo.
Downloaded Newer Image For Windows 7
color¶
This option specifies when to use color in output. The option is used ascolor: <WHEN>
, where <WHEN>
is 'always', 'never', or 'auto'. On Windowsversions before Windows 10, for terminals that do not support color codes, thedefault is 'never'; color may work on terminals that support color codes.
The color use can also be set at the command line using the equivalent--color=<WHEN>
global option. Color use set at the command line takesprecedence over that set in a yaml configuration file.
Downloaded Newer Image For Mac
(The British English spelling (colour) is also accepted. In yaml configurationfiles, the American spelling is the alternative that has priority.)
stack-colors¶
Stack uses styles to format some of its output. The default styles do not workwell with every terminal theme. This option specifies stack's output styles,allowing new styles to replace the defaults. The option is used asstack-colors: <STYLES>
, where <STYLES>
is a colon-delimited sequence ofkey=value, 'key' is a style name and 'value' is a semicolon-delimited list of'ANSI' SGR (Select Graphic Rendition) control codes (in decimal). Use thecommand stack ls stack-colors --basic
to see the current sequence.
The 'ANSI' standards refer to (1) standard ECMA-48 'Control Functions for CodedCharacter Sets' (5th edition, 1991); (2) extensions in ITU-T Recommendation(previously CCITT Recommendation) T.416 (03/93) 'Information Technology – OpenDocument Architecture (ODA) and Interchange Format: Character ContentArchitectures' (also published as ISO/IEC International Standard 8613-6); and(3) further extensions used by 'XTerm', a terminal emulator for the X WindowSystem. The 'ANSI' SGR codes are described in aWikipedia articleand those codes supported on current versions of Windows inMicrosoft's documentation.
For example, users of the popularSolarized Darkterminal theme might wish to set the styles as follows:
The styles can also be set at the command line using the equivalent --stack-colors=<STYLES>
global option. Styles set at the command line take precedence over those set ina yaml configuration file. (In respect of styles used in verbose output, some ofthat output occurs before the configuration file is processed.)
(The British English spelling (colour) is also accepted. In yaml configurationfiles, the American spelling is the alternative that has priority.)
hide-source-paths¶
Stack will use the -fhide-source-paths
option by default for GHC >= 8.2, unless thisoption is set to false
as in the following example:
Build output when enabled:
Build output when disabled:
recommend-stack-upgrade¶
When Stack notices that a new version of Stack is available, should it notify the user?
Since 2.0
stack-developer-mode¶
Turns on a mode where some messages are printed at WARN level instead of DEBUG level, especially useful for developers of Stack itself. For official distributed binaries, this is set to false
by default. When you build from source, it is set to true
by default.
Since 2.3.3
snapshot-location-base¶
Sets the base location of LTS Haskell/Stackage Nightly snapshots. Default is https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/ (as set in the pantry
library).
For example:
has the following effect:* lts-X.Y
expands to https://example.com/snapshots/location/lts/X/Y.yaml
* nightly-YYYY-MM-DD
expands to https://example.com/snapshots/location/nightly/YYYY/M/D.yaml
This field is convenient in setups that restrict access to GitHub, for instance closed corporate setups. In this setting, it is common for the development environment to have general access to the internet, but not for testing/building environments. To avoid the firewall, one can run a local snapshots mirror and then use a custom snapshot-location-base
in the closed environments only.
Since 2.5.0