Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start implementing #3006 #3120

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
1453345
Start implementing #3006
alexeyzab Apr 12, 2017
1abf31e
Don't clean packages listed as extra-deps
chreekat Apr 12, 2017
0799f12
Update install_and_upgrade.md
xeoneux Apr 19, 2017
964fb8a
Merge pull request #3132 from xeoneux/patch-1
borsboom Apr 19, 2017
811e510
Have ConfigCache distinguish between local and upstream src #2147
mgsloan Apr 20, 2017
c21ab19
ChangeLog entry for #2147
mgsloan Apr 20, 2017
53d70ae
Make "stack ghci" skip build for local targets if in DB
mgsloan Apr 20, 2017
4179967
Fix rebuild on changing package location in stack.yaml
mgsloan Apr 20, 2017
8c87d12
Use StaticSize 64 ByteString for pdSHA256
alexeyzab Apr 22, 2017
45e2ba5
Merge pull request #3122 from chreekat/dont-clean-extras
mgsloan Apr 23, 2017
07a0884
pvp-bounds -revision
snoyberg May 1, 2017
aaecb6a
Merge pull request #3149 from commercialhaskell/upload-pvp-revision
borsboom May 1, 2017
376342e
Simplify Stack.Upload API
snoyberg May 1, 2017
ca6ba8f
save-hackage-creds config value
snoyberg May 1, 2017
1471dd1
Print warning when unexpected cred file exists
snoyberg May 1, 2017
ea10057
Merge pull request #3150 from commercialhaskell/upload-cleanup
snoyberg May 2, 2017
b2c47f4
#3126 Use MinGW bin folder for dynamic libraries searching
May 4, 2017
bbc1291
Documentation update
May 4, 2017
0ddbaa7
Fixed pid1 ownership inside fpco/stack-build docker image (#3159)
lehins May 8, 2017
9f8eb94
Fix reference to Homebrew FAQ on compiling
tchajed May 13, 2017
7cc680c
Improve the doc on `~/.stack/global-project/stack.yaml` (#3141)
albertnetymk May 21, 2017
4ac8605
Add missing word to CONTRIBUTING.md. (#3164)
peterstuart May 21, 2017
39723e2
stack uninstall: Update the static help message (#3135)
Tarrasch May 21, 2017
24e30de
Reword message shown when binary upgrade is skipped (#3158)
doersino May 21, 2017
8156dd5
Prevent build failure with cabal
Blaisorblade May 21, 2017
3517a35
Merge branch 'stable'
Blaisorblade May 21, 2017
6406dbc
Use https for docs link in default stack.yaml
tchajed May 22, 2017
b80a9f4
Suppress password echoing from stack upload on MinTTY consoles (#3143)
RyanGlScott May 22, 2017
ecca2b0
No warning on using the import parser
snoyberg May 24, 2017
8585cca
Strip CRs in import lines
snoyberg May 24, 2017
352172c
Merge pull request #3182 from tchajed/stack-init-https
snoyberg May 24, 2017
f2cbb71
Merge pull request #3185 from commercialhaskell/script-on-windows
snoyberg May 24, 2017
66a02ce
Fixed link in changelog
May 30, 2017
9f01ebc
Use enums instead of naked booleans
sergv Apr 14, 2017
536461a
Filter out linker warnings on ghc 7.8
sergv Apr 14, 2017
fa69941
Add more signatures for local functions
sergv Apr 23, 2017
dce9840
Filter linker warnings only for ghc 7.8
sergv Apr 23, 2017
e4672da
Remove name shadowing of `reldir`.
decentral1se Jun 3, 2017
06de280
Merge pull request #3127 from sergv/improve-filtering-of-ghc-messages
mgsloan Jun 6, 2017
a8f8239
ChangeLog entry for #3127
mgsloan Jun 6, 2017
7c08f52
Warn when binary installed by "stack upgrade" isn't visible on PATH
mgsloan Jun 6, 2017
a41a1c7
Add Stack.CheckInstall to cabal file
mgsloan Jun 6, 2017
85f582b
Build local package located in the local directory
martin-kolinek May 6, 2017
86951f5
First build then show warnings from check
martin-kolinek May 6, 2017
064d1c4
Enable tests when building sdist tarball
martin-kolinek May 6, 2017
f0a1e5d
Find the package based on its name
martin-kolinek May 13, 2017
4a493ce
Suport for subdirs
martin-kolinek May 15, 2017
f7275f8
Extracted sdist and upload options into a separate record
martin-kolinek May 20, 2017
bccfc5f
Moved ignoreCheck inside checkSDistTarball
martin-kolinek May 21, 2017
2916a26
Add flag to enable/disable building of sdist tarball
martin-kolinek May 21, 2017
5eb2ed3
Don't build when not asked to
martin-kolinek May 24, 2017
450ec31
Integration test
martin-kolinek May 24, 2017
118e8f8
Renamed option to --test-tarball
martin-kolinek May 24, 2017
22b302c
Updated changelog
martin-kolinek May 24, 2017
97cd182
Improve readability
martin-kolinek May 24, 2017
52e8918
HLint fixes
martin-kolinek May 24, 2017
6d0a49a
Cleaned up test files
martin-kolinek May 29, 2017
e578211
Renamed test packages
martin-kolinek May 29, 2017
89fa672
When using Nix, depend on git.
domenkozar Jun 9, 2017
67fd83b
Fix GHCi → ghci
Jun 11, 2017
a239ea7
Show UnknownPackage plan construction errors unless redundant #3172
mgsloan Jun 11, 2017
6793421
Special message when UnkownPackage is wired in #3172
mgsloan Jun 11, 2017
dbd077a
Add error to "stack new" for wired-in-packages #3172
mgsloan Jun 11, 2017
53b993c
ChangeLog entry for #3172
mgsloan Jun 11, 2017
0e5a2e1
Merge pull request #3193 from lwm/fix-warnings
mgsloan Jun 11, 2017
5ddb7be
Merge pull request #3173 from tchajed/update-homebrew-instructions
mgsloan Jun 11, 2017
a13eb4b
Merge branch 'master' into varosi/mingw_bin
mgsloan Jun 11, 2017
78ebdf5
Merge pull request #3160 from varosi/varosi/mingw_bin
mgsloan Jun 11, 2017
62220ce
Merge pull request #3187 from martin-kolinek/sdist-build
mgsloan Jun 11, 2017
b31c8b5
Merge pull request #3211 from Pastafarianist/patch-1
mgsloan Jun 11, 2017
aa063a5
Merge pull request #3205 from domenkozar/nix-use-git
mgsloan Jun 11, 2017
527d361
Fix changelog after #3205
domenkozar Jun 13, 2017
fb3f76f
Rename PathException to InvalidPathException to avoid conflict with p…
felixonmars Jun 20, 2017
b104f18
Merge remote-tracking branch 'origin/stable'
borsboom Jun 26, 2017
789fbe4
Merge pull request #3224 from felixonmars/patch-2
snoyberg Jun 27, 2017
bc85681
Merge pull request #3215 from domenkozar/fix-changelog
snoyberg Jun 27, 2017
db2c141
Allow errors 2.2
felixonmars Jun 27, 2017
7a66d56
Unpack by hash
snoyberg Jun 27, 2017
8b0d087
Mark as experimental
snoyberg Jun 27, 2017
5d9b31f
Merge pull request #3236 from commercialhaskell/unpack-by-hash
snoyberg Jun 28, 2017
740a15c
Minor doc improvements
snoyberg Jun 26, 2017
6241653
Remove a bunch of unneeded info from BuildPlan
snoyberg Jun 26, 2017
7abbb18
Do not store core package info in build plan
snoyberg Jun 26, 2017
dec7759
Remove a few more unneeded fields
snoyberg Jun 26, 2017
475db27
Move towards SnapshotDef/ResolvedSnapshot
snoyberg Jun 26, 2017
286c8ce
Rename Resolved to Loaded
snoyberg Jun 26, 2017
32e18a5
Remove debugging lines
snoyberg Jun 26, 2017
c213a52
Able to load up SnapshotDef and begin LoadedSnapshot
snoyberg Jun 27, 2017
cc92bd6
Introduce PackageIdentifierRevision
snoyberg Jun 28, 2017
062db98
Move from GitSHA1 to SHA256
snoyberg Jun 28, 2017
d9d8ec2
Build all exes once; then only specified (#3229)
chrisdone Jun 28, 2017
d4e6552
Include package name in exes message (#3229)
chrisdone Jun 28, 2017
6fb4aa6
A working loadResolver
snoyberg Jun 29, 2017
6a2b66d
Stack.Fetch: lookup with revision
snoyberg Jun 30, 2017
030f6c1
Implemented Stack.Snapshot
snoyberg Jun 30, 2017
52b8ac7
Compiles again
snoyberg Jun 30, 2017
87b2b14
Implement checkDepsMet
snoyberg Jun 30, 2017
1b8893b
Simple scripts work
snoyberg Jun 30, 2017
fcdbde1
Implement most of resolvePackageLocation
snoyberg Jun 30, 2017
fb535cc
Load snapshots that include non-index files (does not compile)
snoyberg Jun 30, 2017
06c987c
Fix build with path 0.6.1
felixonmars Jul 1, 2017
116a54a
Fix a typo: transfering -> transferring
felixonmars Jul 1, 2017
a8976ce
Generalize a bit
snoyberg Jul 2, 2017
6047a31
Implement global hints
snoyberg Jul 2, 2017
0798dcb
Move some helpers to the top level
snoyberg Jul 2, 2017
cde461c
Begin moving SourceMap to Snapshot logic
snoyberg Jul 2, 2017
5c9bc50
IT BUILDS A PACKAGE!!!
snoyberg Jul 2, 2017
97c5a74
SinglePackageLocation
snoyberg Jul 2, 2017
63bfd37
Distinguish actual and wanted compiler at the type level
snoyberg Jul 2, 2017
0cc7205
More type safety for PackageLocation vs SinglePackageLocation funcs
snoyberg Jul 2, 2017
f9aaadd
Remove unneeded data type RemotePackageType
snoyberg Jul 3, 2017
0ad348e
MonadUnliftIO
snoyberg Jul 3, 2017
4f46ad9
Clean up LocalPackages
snoyberg Jul 3, 2017
546c360
Fix exception strictness
snoyberg Jul 3, 2017
a3dea33
Better Show instances for exception
snoyberg Jul 4, 2017
25ded52
Split off PackageLocationIndex
snoyberg Jul 4, 2017
f3fe186
unpackPackageIdent
snoyberg Jul 4, 2017
edba223
Clean up Stack.BuildPlan
snoyberg Jul 4, 2017
1f8b609
Implement getToolMap (fixes #595)
snoyberg Jul 4, 2017
f76a61b
Total overhaul of target parsing for extensible snapshots
snoyberg Jul 4, 2017
fddf58e
Fix a logic bug in upgrading packages
snoyberg Jul 4, 2017
4cc4807
Some dead code removal
snoyberg Jul 4, 2017
cb9e844
Clean up warnings and FIXMEs
snoyberg Jul 4, 2017
e7c9402
Test suite passes!
snoyberg Jul 4, 2017
4dce5a2
More warning and FIXME cleanup
snoyberg Jul 4, 2017
4b77dff
Defer an error to ConstructPlan
snoyberg Jul 4, 2017
714e548
Remove out-of-date FIXMEs
snoyberg Jul 4, 2017
6e94b77
A bunch of other FIXME cleanups
snoyberg Jul 4, 2017
6e3449d
Remove no longer relevant test module
snoyberg Jul 5, 2017
a4df29b
Fix a warning
snoyberg Jul 5, 2017
e0a9bbb
Merge pull request #3241 from felixonmars/fix-typo
snoyberg Jul 5, 2017
37eb826
Fix warnings and hlint errors
snoyberg Jul 5, 2017
1656964
subdirs should be optional
snoyberg Jul 5, 2017
368fa68
Custom snapshots: add back compiler: support
snoyberg Jul 5, 2017
2dd4e75
stack init: deal with possibly missing fields
snoyberg Jul 5, 2017
8ac537d
splitUnmetDeps for parent packages too
snoyberg Jul 5, 2017
a313a0b
Fix sdist
snoyberg Jul 5, 2017
7b9b0bd
Allow subdirs of filepaths (cuz why not?)
snoyberg Jul 5, 2017
30d3e86
Fix broken PackageIdentifierRevision display
snoyberg Jul 5, 2017
763d774
Better upgrade messages
snoyberg Jul 5, 2017
0781770
Fix integration test by bypassing Hackage revisions :(
snoyberg Jul 5, 2017
1a5ea3d
FIXME in changelog about extensible snapshots
snoyberg Jul 5, 2017
442e552
Include hash in custom snapshot cache file name
snoyberg Jul 5, 2017
9d139e2
Disallow PLFilePath in custom snapshots
snoyberg Jul 5, 2017
8170475
Fix compilation failure
snoyberg Jul 5, 2017
8108c1c
Clean up a warning
snoyberg Jul 5, 2017
08e996d
Fix some Haddock markup
snoyberg Jul 6, 2017
ae1441f
Move custom snapshot name inside the snapshot
snoyberg Jul 6, 2017
daf00fd
Remove lsResolver
snoyberg Jul 6, 2017
d5668d5
Allow overriding compiler in custom snapshot
snoyberg Jul 6, 2017
a350223
Use ‘text-metrics-0.3.0’
mrkkrp Jul 6, 2017
ffd1284
Merge remote-tracking branch 'origin/master' into extensible-snapshots
snoyberg Jul 9, 2017
bdafe1a
Replace error calls with proper exceptions
snoyberg Jul 9, 2017
a6de932
Resolve a bunch of FIXMEs
snoyberg Jul 9, 2017
e4a51da
Generalize type of runOnce
snoyberg Jul 9, 2017
731c1bb
Update YAML docs
snoyberg Jul 9, 2017
25f5366
Subdirs in HTTP; allow overriding hidden
snoyberg Jul 9, 2017
d7c6cdc
Avoid deleting local files (yeah, that is bad)
snoyberg Jul 12, 2017
01b4f43
Merge pull request #3249 from commercialhaskell/extensible-snapshots
snoyberg Jul 13, 2017
e13988b
Merge remote-tracking branch 'origin/exe-targets-3229'
snoyberg Jul 13, 2017
feb3b36
Merge branch 'use-text-metrics-0.3.0' of https://github.com/mrkkrp/stack
snoyberg Jul 13, 2017
f0724c6
Merge branch 'patch-2' of https://github.com/felixonmars/stack
snoyberg Jul 13, 2017
c81569b
Merge branch 'path-0.6.1' of https://github.com/felixonmars/stack
snoyberg Jul 13, 2017
696d9b4
Merge branch '3006-speed-up-store-instances' of https://github.com/al…
snoyberg Jul 13, 2017
54ff632
Unify on StaticSHA256
snoyberg Jul 13, 2017
44f3b5d
Update ChangeLog.md
alexeyzab Jul 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ and use the provided template to include all necessary details.

The more detailed your report, the faster it can be resolved and will ensure it
is resolved in the right way. Once your bug has been resolved, the responsible
will tag the issue as _Needs confirmation_ and assign the issue back to you.
Once you have tested and confirmed that the issue is resolved, close the issue.
If you are not a member of the project, you will be asked for confirmation and
we will close it.
person will tag the issue as _Needs confirmation_ and assign the issue back to
you. Once you have tested and confirmed that the issue is resolved, close the
issue. If you are not a member of the project, you will be asked for
confirmation and we will close it.


## Documentation
Expand Down
53 changes: 52 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Release notes:

Major changes:

* Complete overhaul of how snapshots are defined, the `packages` and
`extra-deps` fields, and a number of related items. For full
details, please see
[the writeup on these changes](https://www.fpcomplete.com/blog/2017/07/stacks-new-extensible-snapshots). [PR #3249](https://github.com/commercialhaskell/stack/pull/3249),
see the PR description for a number of related issues.

Behavior changes:

* `stack profile` and `stack trace` now add their extra RTS arguments for
Expand Down Expand Up @@ -37,9 +43,40 @@ Other enhancements:
* `--[no-]haddock-hyperlink-source` flag added which allows toggling
of sources being included in Haddock output.
See [#3099](https://github.com/commercialhaskell/stack/issues/3099)
* `stack ghci` will now skip building all local targets, even if they have
downstream deps, as long as it's registered in the DB.
* The pvp-bounds feature now supports adding `-revision` to the end of
each value, e.g. `pvp-bounds: both-revision`. This means that, when
uploading to Hackage, Stack will first upload your tarball with an
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](http://www.snoyman.com/blog/2017/04/stackages-no-revisions-field)—as
a method to ensure PVP compliance without having to proactively fix
bounds issues for Stackage maintenance.
* Expose a `save-hackage-creds` configuration option
* On GHC <= 7.8, filters out spurious linker warnings on windows
See [#3127](https://github.com/commercialhaskell/stack/pull/3127)
* Better error messages when creating or building packages which alias
wired-in packages. See
[#3172](https://github.com/commercialhaskell/stack/issues/3172).
* MinGW bin folder now is searched for dynamic libraries. See [#3126](https://github.com/commercialhaskell/stack/issues/3126)
* When using Nix, nix-shell now depends always on git to prevent runtime errors
while fetching metadata
* The `stack unpack` command now accepts a form where an explicit
Hackage revision hash is specified, e.g. `stack unpack
foo-1.2.3@gitsha1:deadbeef`. Note that this should be considered
_experimental_, Stack will likely move towards a different hash
format in the future.
* `GitSHA1` is now `StaticSHA256` and is implemented using the `StaticSize 64 ByteString` for improved performance.
See [#3006](https://github.com/commercialhaskell/stack/issues/3006)

Bug fixes:

* Building all executables only happens once instead of every
time. See
[#3229](https://github.com/commercialhaskell/stack/issues/3229) for
more info.
* Fixes case where `stack build --profile` might not cause executables /
tests / benchmarks to be rebuilt.
See [#2984](https://github.com/commercialhaskell/stack/issues/2984)
Expand All @@ -56,7 +93,17 @@ Bug fixes:
package database for wired-in-packages (ghc, base, etc).
See [#3084](https://github.com/commercialhaskell/stack/issues/3084)
* Fixes `stack --docker build` when user is part of libvirt/libvirtd
groups on Ubuntu Yakkety (16.10). See [#3092]
groups on Ubuntu Yakkety (16.10).
See [#3092](https://github.com/commercialhaskell/stack/issues/3092)
* Switching a package between extra-dep and local package now forces
rebuild (previously it wouldn't if versions were the same).
See [#2147](https://github.com/commercialhaskell/stack/issues/2147)
* `stack upload` no longer reveals your password when you type it on
MinTTY-based Windows shells, such as Cygwin and MSYS2.
See [#3142](https://github.com/commercialhaskell/stack/issues/3142)
* `stack script`'s import parser will now properly parse files that
have Windows-style line endings (CRLF)


## 1.4.0

Expand Down Expand Up @@ -150,6 +197,8 @@ Other enhancements:
* Upgraded `http-client-tls` version, which now offers support for the
`socks5://` and `socks5h://` values in the `http_proxy` and `https_proxy`
environment variables.
* Binary "stack upgrade" will now warn if the installed executable is not
on the PATH or shadowed by another entry.

Bug fixes:

Expand Down Expand Up @@ -1058,6 +1107,8 @@ Other enhancements:
* `stack build --fast` turns off optimizations
* Show progress while downloading package index
[#1223](https://github.com/commercialhaskell/stack/issues/1223).
* Allow running tests on tarball created by sdist and upload
[#717](https://github.com/commercialhaskell/stack/issues/717).

Bug fixes:

Expand Down
2 changes: 1 addition & 1 deletion doc/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ modified version of a dependency that hasn't yet been released upstream.

Please note that when adding upstream packages directly to your project it is
important to distinguish _local packages_ from the upstream _dependency
packages_. Otherwise you may have trouble running `stack GHCi`. See
packages_. Otherwise you may have trouble running `stack ghci`. See
[stack.yaml documentation](yaml_configuration.md#packages) for more details.

## Flags and GHC options
Expand Down
122 changes: 40 additions & 82 deletions doc/custom_snapshot.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,59 @@
# Custom Snapshots

Custom snapshots allow you to create your own snapshots, which provide a list of
specific hackage packages to use, along with flags and ghc-options. The
definition of a basic snapshot looks like the following:
Custom snapshots were totally reworked with the extensible snapshots
overhaul in Stack 1.6.0, see
[the writeup](https://www.fpcomplete.com/blog/2017/07/stacks-new-extensible-snapshots)
and
[PR #3249](https://github.com/commercialhaskell/stack/pull/3249)). This
documentation covers the new syntax only.

Custom snapshots allow you to create your own snapshots, which provide
a list of packages to use, along with flags, ghc-options, and a few
other settings. Custom snapshots may extend any other snapshot that
can be specified in a `resolver` field. The packages specified follow
the syntax of `extra-deps` in the `stack.yaml` file, with one
exception: to ensure reproducibility of snapshots, local directories
are not allowed for custom snapshots (as they are expected to change
regularly).

```yaml
resolver: ghc-8.0
resolver: lts-8.21 # Inherits GHC version and package set
compiler: ghc-8.0.1 # Overwrites GHC version in the resolver, optional

name: my-snapshot # User-friendly name

# Additional packages, follows extra-deps syntax
packages:
- unordered-containers-0.2.7.1
- hashable-1.2.4.0
- text-1.2.2.1
- unordered-containers-0.2.7.1
- hashable-1.2.4.0
- text-1.2.2.1

# Override flags, can also override flags in the parent snapshot
flags:
unordered-containers:
debug: true

# Packages from the parent snapshot to ignore
drop-packages:
- wai-extra

# Packages which should be hidden (affects script command's import
# parser
hidden:
wai: true
warp: false

# Set GHC options for specific packages
ghc-options:
warp:
- -O2
```

If you put this in a `snapshot.yaml` file in the same directory as your project,
you can now use the custom snapshot like this:

```yaml
resolver:
name: simple-snapshot # Human readable name for the snapshot
location: simple-snapshot.yaml
resolver: snapshot.yaml
```

This is an example of a custom snapshot stored in the filesystem. They are
Expand All @@ -38,24 +68,6 @@ For efficiency, URLs are treated differently. If I uploaded the snapshot to
`https://domain.org/snapshot-1.yaml`, it is expected to be immutable. If you
change that file, then you lose any reproducibility guarantees.

## Extending snapshots

The example custom snapshot above uses a compiler resolver, and so has few
packages. We can also extend existing snapshots, by using the usual
[resolver setting found in stack configurations](yaml_configuration.md#resolver).
All possible resolver choices are valid, so this means that custom snapshots can
even extend other custom snapshots.

Lets say that we want to use `lts-7.1`, but use a different version of `text`
than the one it comes with, `1.2.2.1`. To downgrade it to `1.2.2.0`, we need a
custom snapshot file with the following:

```yaml
resolver: lts-7.1
packages:
- text-1.2.2.0
```

### Overriding the compiler

The following snapshot specification will be identical to `lts-7.1`, but instead
Expand Down Expand Up @@ -117,57 +129,3 @@ ghc-options:
text:
developer: true
```

## YAML format

In summary, the YAML format of custom snapshots has the following fields which
are directly related to the same fields in the
[build configuration format](yaml_configuration.md):

* `resolver`, which specifies which snapshot to extend. It takes the same values
as the [`resolver` field in stack.yaml](yaml_configuration.md#resolver).

* `compiler`, which specifies or overrides the selection of compiler. If
`resolver` is absent, then a specification of `compiler` is required. Its
semantics are the same as the
[`compiler` field in stack.yaml](yaml_configuration.md#compiler).

Some fields look similar, but behave differently:

* `flags` specifies which cabal flags to use with each package. In order to
specify a flag for a package, it *must* be listed in the `packages` list.

* `ghc-options`, which specifies which cabal flags to use with each package. In
order to specify ghc-options for a package, it *must* be listed in the
`packages` list. The `*` member of the map specifies flags that apply to every
package in the `packages` list.

There are two fields which work differently than in the build configuration
format:

* `packages`, which specifies a list of hackage package versions. Note that
when a package version is overridden, no `flags` or `ghc-options` are taken
from the snapshot that is being extended. If you want the same options as the
snapshot being extended, they must be re-specified.

* `drop-packages`, which specifies a list of packages to drop from the snapshot
being overridden.

## Future enhancements

We plan to enhance extensible snapshots in several ways in the future. See
[issue #1265, about "implicit snapshots"](https://github.com/commercialhaskell/stack/issues/1265).
In summary, in the future:

1) It will be possible to use a specific git repository + commit hash in the
`packages` list, like in regular stack.yaml configuration. Currently, custom
snapshots only work with packages on hackage.

2) `stack.yaml` configurations will implicitly create a snapshot. This means
that the non-local packages will get shared between your projects, so there is
less redundant compilation!

3) `flags` and `ghc-options` for packages which are not listed in `packages` are
silently ignored. See
[#2654](https://github.com/commercialhaskell/stack/issues/2654) for the current
status of this.
18 changes: 6 additions & 12 deletions doc/install_and_upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,9 @@ such.
## macOS

We generally test on the current version of macOS, but Stack is known to work
on El Capitan, Yosemite and Mavericks as well, and may also work on older
on Sierra, El Capitan, Yosemite and Mavericks as well, and may also work on older
versions (YMMV).

**macOS Sierra warning**: There are new limitations in the dynamic linker that
are causing problems for GHC versions earlier than 8.0.2 when building projects with many
dependencies. GHC 8.0.2 is first used in LTS 8.0. See
[#2577](https://github.com/commercialhaskell/stack/issues/2577) for more
information.

### Installer script

Run:
Expand All @@ -88,10 +82,7 @@ Run:

### Using Homebrew

**macOS Sierra warning**: Homebrew's haskell-stack formula may not currently
work on Sierra, so we suggest using the manual method above for now.

If you have a popular [brew](http://brew.sh/) tool installed, you can just do:
If you have the popular [brew](https://brew.sh/) tool installed, you can just do:

brew install haskell-stack

Expand All @@ -100,7 +91,7 @@ but tend to be updated within a day or two.
* Normally, Homebrew will install from a pre-built binary (aka "pour from a
bottle"), but if `brew` starts trying to build everything from source (which
will take hours), see
[their FAQ on the topic](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md#why-do-you-compile-everything).
[their FAQ on the topic](https://github.com/Homebrew/brew/blob/master/docs/FAQ.md#why-do-you-compile-everything).

### Notes

Expand All @@ -113,6 +104,9 @@ problems, see the linked FAQ entries:

* [GHC 7.8.4 fails with `/usr/bin/ar: permission denied`](faq.md#usr-bin-ar-permission-denied)
* [DYLD_LIBRARY_PATH is ignored](faq.md#dyld-library-path-ignored)


If you are on OS X 10.12 ("Sierra") and encounter [GHC panic while building, see this issue](https://github.com/commercialhaskell/stack/issues/2577)

## Ubuntu

Expand Down
Loading