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 using the pantry package #4254

Merged
merged 249 commits into from
Aug 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
e3b4cf8
Begin the move to Pantry
snoyberg Jul 16, 2018
5379771
Move more types into the pantry subdir
snoyberg Jul 16, 2018
7050741
Use Cabal types in pantry
snoyberg Jul 16, 2018
0527a63
Implement getPackageVersions
snoyberg Jul 16, 2018
79b6913
loadFromIndex
snoyberg Jul 17, 2018
23972ae
Remove unneeded updateAllIndices wrapper
snoyberg Jul 17, 2018
bf6e2c5
Remove need for resolvePackagesAllowMissing
snoyberg Jul 17, 2018
67cb34d
Silence overwhelming SQL logging
snoyberg Jul 17, 2018
acd0213
Remove unpackPackageIdents
snoyberg Jul 17, 2018
d7beab7
Drop need for resolvePackages
snoyberg Jul 17, 2018
4d3c0fa
Implement the unpack command
snoyberg Jul 17, 2018
7aecad8
Update changelog and close #4137
snoyberg Jul 17, 2018
33ef253
Do an efficient incremental cache update
snoyberg Jul 17, 2018
3cfea9a
More accurate log message
snoyberg Jul 17, 2018
26dd4c3
Better retention of cabal file size
snoyberg Jul 18, 2018
aa9b6db
Calculate the Hackage tarball metadata
snoyberg Jul 18, 2018
d427696
Move around the duplicate update logic
snoyberg Jul 18, 2018
b8ce1e0
Start adding the Tree data types
snoyberg Jul 18, 2018
f1a3a97
Fix the 1024 null bytes, and clean up docs/naming
snoyberg Jul 18, 2018
f2990ea
Make it shallower
snoyberg Jul 18, 2018
f80a284
Prepare for archive code
snoyberg Jul 19, 2018
8c9d41e
Bookkeeping around Hackage trees (revisions, ugh)
snoyberg Jul 19, 2018
65e0ede
Loading trees from Hackage works
snoyberg Jul 19, 2018
8ccbf05
Unpacking a tree works!
snoyberg Jul 19, 2018
c438a10
Archive caching
snoyberg Jul 19, 2018
742a822
Start refactoring the PackageLocation stuff
snoyberg Jul 19, 2018
9d50562
Remove the CabalLoader concept
snoyberg Jul 20, 2018
f276dee
Start moving PackageLocation into pantry, lots of stuff is b0rken
snoyberg Jul 20, 2018
55ac92b
Move over to Cabal types
snoyberg Jul 20, 2018
db366f4
RawPackageLocation
snoyberg Jul 25, 2018
ebd3edf
Implement a few more undefineds, get it closer
snoyberg Jul 25, 2018
bb45bf6
Slightly clearer error messages
snoyberg Jul 25, 2018
b2bca1c
CPS transform things
snoyberg Jul 25, 2018
ff679ca
Shared database connection, not a pool
snoyberg Jul 25, 2018
56aea74
Optimize a common cabal file lookup
snoyberg Jul 25, 2018
48919bb
Fix Cabal's parser for package identifiers
qrilka Jul 25, 2018
2a4ff3f
Fix some more undefineds/FIXMEs
snoyberg Jul 26, 2018
3e378a7
Merge remote-tracking branch 'origin/master' into pantry
snoyberg Jul 26, 2018
af2a017
Clean unused imports
qrilka Jul 26, 2018
b9f2e78
More details on difference with Cabal in package identifier parsing
qrilka Jul 26, 2018
221a373
Merge pull request #4175 from qrilka/pantry
snoyberg Jul 26, 2018
2446c17
Merge branch 'pantry' of github.com:commercialhaskell/stack into pantry
snoyberg Jul 26, 2018
cec3a2e
Fix compilation from backed-out change
snoyberg Jul 26, 2018
185f14a
Move RawPackageLocationOrPath into pantry
snoyberg Jul 26, 2018
90142f9
More standardized OrPath data types
snoyberg Jul 26, 2018
9977448
Thread OrPath through a bunch of places, drop an undefined
snoyberg Jul 26, 2018
66d550b
Holy moly, stack build works on stack again!
snoyberg Jul 26, 2018
6b483a0
Clean up the pantry types a bit
snoyberg Jul 26, 2018
a1482e0
Move more cabal and hpack logic into pantry
snoyberg Jul 26, 2018
adbb52d
All of the undefineds are in pantry now
snoyberg Jul 27, 2018
a895b32
Start to clean up the PSIndex mess, yay Pantry!
snoyberg Jul 27, 2018
0e9b528
Get the Stack unit test suite running/passing again
snoyberg Jul 29, 2018
40ce34d
Convert Stackage snapshots to new format
snoyberg Jul 30, 2018
b1ed081
More work on completing snapshots
snoyberg Jul 30, 2018
8bf2425
Able to convert (at least some) LTSes
snoyberg Jul 30, 2018
8d97405
traverseConcurrentlyWith
snoyberg Jul 30, 2018
71f5e28
getHackageTarballKey
snoyberg Jul 30, 2018
6f2d180
CRLF hack
snoyberg Jul 30, 2018
70e811e
WIP towards getting snapshots working again
snoyberg Jul 31, 2018
815bf42
It finally builds again!
snoyberg Jul 31, 2018
b7ff2c3
And remove an unneeded undefined
snoyberg Jul 31, 2018
ca1872f
Start curator work, make pantry a package
snoyberg Aug 2, 2018
61f5246
Comment out convert-old-stackage
snoyberg Aug 2, 2018
cddc419
More work on fetching and validating archives
snoyberg Aug 2, 2018
214cce8
Implement loading from url with caching in SQLite
qrilka Aug 1, 2018
230952e
Fix default repo name
snoyberg Aug 2, 2018
84641ee
Merge branch 'pantry' of https://github.com/qrilka/stack into pantry
snoyberg Aug 2, 2018
7bcfec4
Treat the bs as a ByteString (cc @qrilka)
snoyberg Aug 2, 2018
3a255ce
Compiling works again
snoyberg Aug 2, 2018
58fa9b6
Write-up on #3922
snoyberg Aug 2, 2018
6eb3004
Implement some more undefineds so we can build Stack with Stack
snoyberg Aug 2, 2018
aa4e1c1
Fix exception display
snoyberg Aug 2, 2018
63138cb
Add missing other-module
snoyberg Aug 2, 2018
519a06a
Merge remote-tracking branch 'origin/master' into pantry
snoyberg Aug 2, 2018
ac4e3ff
Merge remote-tracking branch 'origin/stable' into pantry
snoyberg Aug 2, 2018
10b27cf
Add infer-license extra-dep
snoyberg Aug 2, 2018
b615c3f
Handle preferred-versions files from Hackage
snoyberg Aug 2, 2018
2f64d8f
Fix warnings, implement missing patterns
snoyberg Aug 3, 2018
8816aef
Cleaned up more warnings, doesn't compile
snoyberg Aug 3, 2018
aac3571
Clean up all warnings
snoyberg Aug 3, 2018
c3510b2
hlint suggestions
snoyberg Aug 3, 2018
6d235e9
Resolve a bunch of FIXMEs
snoyberg Aug 3, 2018
9cdee30
Tweak Travis for GHC 8.4.3
snoyberg Aug 3, 2018
b70ddd5
Remove invalid UNPACK pragmas (Version is now a sum type)
snoyberg Aug 6, 2018
4447fee
Add TMP env var for AppVeyor
snoyberg Aug 6, 2018
147116b
Get convert-old-stackage compiling
snoyberg Aug 6, 2018
7be2b7e
Fix haddocks
snoyberg Aug 6, 2018
c6ad243
Ensure dir for SQLite database exists
snoyberg Aug 6, 2018
e6e1ba5
Use destroyAllResources
snoyberg Aug 6, 2018
5f9fc50
Fix undefineds in convert-old-stackage.hs
snoyberg Aug 6, 2018
b7bb765
No blob key check as archive could contain outdated cabal file
qrilka Aug 7, 2018
9ac504a
Merge pull request #4207 from qrilka/pantry
snoyberg Aug 7, 2018
282c8bc
Simplify binary serialization of trees (no hexing hashes)
snoyberg Aug 7, 2018
2f72898
Helper script to convert old Stackage snapshots
snoyberg Aug 7, 2018
e445576
Move stack.yaml up a level
snoyberg Aug 7, 2018
7534592
Merge remote-tracking branch 'origin/master' into pantry
snoyberg Aug 7, 2018
5b1de26
Pull repos
snoyberg Aug 7, 2018
6f99841
gitignore for conversion
snoyberg Aug 7, 2018
c999ec4
Raw -> Unresolved renaming
qrilka Aug 7, 2018
ba1ed24
Curator can create snapshot files
snoyberg Aug 8, 2018
2b067da
Ignore some temp files
snoyberg Aug 8, 2018
d67707b
Ready to unpack in curator
snoyberg Aug 8, 2018
71e9c82
Curator: unpack and build (needs moar stack)
snoyberg Aug 8, 2018
c6968b5
Prev. PackageLocation got suffix Immutable, file paths - mutable
qrilka Aug 8, 2018
2da7518
Add some missing grandfathered deps
snoyberg Aug 8, 2018
589130c
Merge pull request #4219 from qrilka/pantry
snoyberg Aug 8, 2018
3fb0976
Merge branch 'pantry' of github.com:commercialhaskell/stack into pantry
snoyberg Aug 8, 2018
9a2c388
Fix compilation
snoyberg Aug 8, 2018
e924c78
Control whether we use preferred versions
snoyberg Aug 8, 2018
ee3d639
Stack understands the curator block
snoyberg Aug 8, 2018
98a5253
More grandfathering
snoyberg Aug 8, 2018
2694a95
Upper bound on scalendar
snoyberg Aug 8, 2018
13c024f
Resolve multiple candidates from preprocessors (fixes #4076)
snoyberg Aug 8, 2018
e1a23c8
Another warning reduction like #4076
snoyberg Aug 8, 2018
c2f594e
Improve warning display
snoyberg Aug 8, 2018
c0d47ee
Defer loading local package file information
snoyberg Aug 9, 2018
cf85716
Give a little more information on dependency cycle failures
snoyberg Aug 9, 2018
5283ff1
Add some workarounds for limitations in Stack
snoyberg Aug 9, 2018
4f6c663
Get pantry test suite started
snoyberg Aug 9, 2018
71c79e4
Get rid of a warning, make tests pass
snoyberg Aug 9, 2018
050e06b
Implement WantedCompiler parsing
snoyberg Aug 9, 2018
22c6464
Parsing a tree
snoyberg Aug 9, 2018
dcbcae1
Fix loading of ZIP files, add a test
snoyberg Aug 9, 2018
a4050a3
Tree serialization spec: run faster
snoyberg Aug 9, 2018
d722e09
Get Git repos working
snoyberg Aug 9, 2018
ed017c6
Mercurial support
snoyberg Aug 9, 2018
8d13f15
Don't forget to change commits
snoyberg Aug 9, 2018
c0ac9ec
Add missing HasProcessContext constraint
snoyberg Aug 9, 2018
72a58ef
Merge remote-tracking branch 'origin/stable' into pantry
snoyberg Aug 9, 2018
25f3cbb
Fix some `Show` usages
snoyberg Aug 9, 2018
3e4c5aa
Properly allow relative file paths to snapshots
snoyberg Aug 9, 2018
5bc362a
Strip multiple leading dirs (handles ./ paths)
snoyberg Aug 9, 2018
32cea4e
Delete leftover directories
snoyberg Aug 9, 2018
60a3cad
Fix some hlint warnings
snoyberg Aug 9, 2018
b047761
Fix global hint stuff
snoyberg Aug 9, 2018
3205408
Fix a bad change
snoyberg Aug 9, 2018
ceff380
packages cannot contain URLs
snoyberg Aug 9, 2018
d412911
More info on failure, more reliable runs
snoyberg Aug 9, 2018
7a0666e
Add missing stack.yaml
snoyberg Aug 9, 2018
f402f5a
Add a missing space
snoyberg Aug 9, 2018
444d094
Fix a few more integration tests
snoyberg Aug 9, 2018
3ec63ce
Try disabling WAL and enabling foreign keys
snoyberg Aug 10, 2018
d08fafd
make-global-hints.hs
snoyberg Aug 13, 2018
aa58b56
Move global hints out of snapshots
snoyberg Aug 13, 2018
22f85f4
Complete PackageIdentifierRevision as well
snoyberg Aug 13, 2018
cfb96c2
Merge remote-tracking branch 'origin/master' into pantry
snoyberg Aug 13, 2018
45294dc
Fix an hlint warning
snoyberg Aug 13, 2018
17e09b9
Sanity checks on cabal files
snoyberg Aug 13, 2018
75e11e3
Revert to GHC 8.2/LTS-11, use a custom snapshot
snoyberg Aug 13, 2018
d863ab2
Travis: 8.2.2 for stack.yaml
snoyberg Aug 13, 2018
6766c70
Merge remote-tracking branch 'origin/master' into pantry
snoyberg Aug 13, 2018
9a0332a
Add a comment, remove a TODO
snoyberg Aug 13, 2018
68b8a29
Implement Docker image tag logic
snoyberg Aug 14, 2018
eaeae10
Docker: copy entire pantry directory
snoyberg Aug 14, 2018
c2fff0f
Clean up a bunch of FIXMEs
snoyberg Aug 14, 2018
314fff2
Handle trailing commas in ghc package modules
snoyberg Aug 14, 2018
46f7ee7
Fix the integration test suites (at least locally)
snoyberg Aug 14, 2018
dae7e1e
Better error on too-new cabal spec
snoyberg Aug 14, 2018
ff05a84
Helper integration test suite scripts
snoyberg Aug 14, 2018
31dbf96
Write-up on curator tool
snoyberg Aug 14, 2018
97fa18c
configure-args comment
snoyberg Aug 14, 2018
0657080
Correct PackageIdentifier->PackageName (fixes #4215)
snoyberg Aug 14, 2018
2fdd3c3
Replace some show with displayC
snoyberg Aug 14, 2018
d51965a
Merge remote-tracking branch 'origin/master' into pantry
snoyberg Aug 14, 2018
58d46fb
Remove dependency on Network.HTTP.StackClient
snoyberg Aug 15, 2018
b5acd51
Slim down Network.HTTP.StackClient
snoyberg Aug 15, 2018
74f10c4
pantry: remove usage of Path.Find
snoyberg Aug 15, 2018
d56af9b
Make pantry a dependency of stack
snoyberg Aug 15, 2018
fecd986
Remove an unneeded import
snoyberg Aug 15, 2018
77a5977
Start moving files around for hidden internals
snoyberg Aug 15, 2018
ba8895d
Expose less from pantry, much nicer SHA256 module
snoyberg Aug 15, 2018
1a98bff
Use permissions code from directory
snoyberg Aug 15, 2018
55f79cf
Fill in package metadata for pantry
snoyberg Aug 15, 2018
ec88727
Do warnings check in convert-old-stackage.hs
snoyberg Aug 15, 2018
32b1b69
Implement a bunch of FIXMEs and replace errors in pantry
snoyberg Aug 15, 2018
edd6bc6
Resolve most FIXMEs
snoyberg Aug 15, 2018
15ef88e
Remove a data constructor
snoyberg Aug 15, 2018
79ce2ac
`stack freeze` command
qrilka Aug 16, 2018
7b57b08
Turned unit tests into property tests
Aug 17, 2018
089e9e2
curator CLI
bergmark Aug 16, 2018
a6ece48
Merge pull request #4237 from bergmark/curator-cli
snoyberg Aug 19, 2018
103d324
Merge pull request #4240 from NorfairKing/unit-to-property
snoyberg Aug 19, 2018
56977c0
Merge remote-tracking branch 'origin/pantry' into pantry
snoyberg Aug 19, 2018
6e84f11
Fix some warnings
snoyberg Aug 19, 2018
4396664
Remove pantry dir copying code for Docker
snoyberg Aug 20, 2018
b920393
Merge branch 'master' into pantry
snoyberg Aug 20, 2018
7ab87ec
Merge remote-tracking branch 'origin/master' into pantry
snoyberg Aug 20, 2018
0615468
Update ChangeLog for pantry changes
snoyberg Aug 20, 2018
46ef0cb
Remove build-constraints.yaml (way too big a diff!)
snoyberg Aug 21, 2018
459e62a
Only update cache when needed
snoyberg Aug 21, 2018
90859bf
Implement fuzzy name lookup logic
snoyberg Aug 21, 2018
5bb1d30
Require SHA1 for completing repos (fixes #4218)
snoyberg Aug 21, 2018
4d2283a
Begin cleaning up Pantry module docs
snoyberg Aug 21, 2018
288131d
Pin revision to prevent test breakage
qrilka Aug 21, 2018
b108f02
More verbose and easy to understand output
qrilka Aug 21, 2018
6e89c5d
Switch to Unresolved data type
snoyberg Aug 21, 2018
230237e
Docs for stack freeze
qrilka Aug 21, 2018
eef0507
Fix curator compilation (thanks @qrilka)
snoyberg Aug 21, 2018
238a9ee
Merge remote-tracking branch 'origin/pantry' into pantry
qrilka Aug 21, 2018
2f2b751
New output format in tests
qrilka Aug 21, 2018
6263e7e
Improve naming in Pantry.Storage
snoyberg Aug 21, 2018
d6dd593
Introduce the Package type
snoyberg Aug 21, 2018
7f50951
Merge pull request #4220 from qrilka/pantry
snoyberg Aug 21, 2018
9cad4a2
Fix a hash
snoyberg Aug 21, 2018
f053132
Fix some hlint warnings
snoyberg Aug 21, 2018
90730be
Remove some TH usage
snoyberg Aug 22, 2018
1c96444
Finish cleaning up and documenting the Pantry module
snoyberg Aug 22, 2018
4f74f94
Print warnings as needed on second parse
snoyberg Aug 22, 2018
3f4c212
Fix curator compilation
qrilka Aug 22, 2018
b802f4f
Remove the ignore-revision-mismatch stuff
snoyberg Aug 22, 2018
ae74950
Fix some refactoring bugs
snoyberg Aug 22, 2018
aec661b
Fix JSON serialization for archives
snoyberg Aug 22, 2018
28e5927
Minor freeze UI improvements
snoyberg Aug 22, 2018
228fcf0
Clean up YAML config docs for Pantry
snoyberg Aug 22, 2018
a5d0248
Add note to update architecture.md #4251
snoyberg Aug 22, 2018
890f96d
Add note that GUIDE is out of date #4252
snoyberg Aug 22, 2018
2cb6cb4
Fix a name conflict warning
snoyberg Aug 22, 2018
8f65c1f
Remove the CRLF hack
snoyberg Aug 22, 2018
94600af
Add note that Git repos are shared
snoyberg Aug 22, 2018
903b5b8
Replaced displayC with monomorphic functions
qrilka Aug 22, 2018
a9ba308
Arguably better boolean blindness names
snoyberg Aug 22, 2018
4992881
Merge pull request #4253 from commercialhaskell/pantry-remove-displayc
snoyberg Aug 22, 2018
d7154b7
Remove the convert-old-stackage stuff
snoyberg Aug 22, 2018
09dde44
Fix build of curator
snoyberg Aug 22, 2018
3e4eeba
Remove unneeded TODO (thanks @dbaynard)
snoyberg Aug 22, 2018
658418a
Merge branch 'master' into pantry
snoyberg Aug 22, 2018
80f6c07
Explain how to update frozen information (CC @dbaynard)
snoyberg Aug 22, 2018
01f9e84
Merge in the stack freeze info
snoyberg Aug 22, 2018
aa670e6
Attempt to use PRAGMA busy_timeout
snoyberg Aug 23, 2018
7e38e09
More reliable persistent-sqlite extra-dep
snoyberg Aug 23, 2018
fb6f819
Ugly, temporary hack for store build issues
snoyberg Aug 23, 2018
3211dd5
Migrate some remains of code to use Cabal types/functions
qrilka Aug 23, 2018
2b846ff
Check in pantry.cabal
snoyberg Aug 23, 2018
784535e
Support symlinks to parent dir
snoyberg Aug 23, 2018
7cfef74
Move parsing functions into pantry
qrilka Aug 23, 2018
ba15062
Remove unused pragmas
qrilka Aug 23, 2018
0e1e10e
Add lower bound on hpack
snoyberg Aug 23, 2018
a52bacb
Normalize safely across Windows and Unix
snoyberg Aug 23, 2018
0621362
Fix warnings
snoyberg Aug 23, 2018
c8b2031
parsePackageNameFromFilePath out of pantry, new pantryexceptions
qrilka Aug 23, 2018
1479f77
More Windows path stuff
snoyberg Aug 23, 2018
67f95cd
Merge branch 'remove-stack-types' of https://github.com/qrilka/stack …
snoyberg Aug 23, 2018
a1ddae6
Fix some warnings
snoyberg Aug 23, 2018
bcd33fa
Typo correction from @mihaimaruseac
snoyberg Aug 23, 2018
b80ac84
Include a fix for snoyberg/tar-conduit#21
snoyberg Aug 23, 2018
3b9e296
Add support for location: back
snoyberg Aug 26, 2018
966804b
Fix test suite broken by changes in freeze output
snoyberg Aug 26, 2018
4fa1987
Use Gitlab build image that has Mercurial
snoyberg Aug 26, 2018
f1169e3
Merge remote-tracking branch 'origin/master' into pantry
snoyberg Aug 26, 2018
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ tags
/etc/scripts/stack-scripts.cabal
.hspec-failures
better-cache/
subs/
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: registry.gitlab.fpcomplete.com/fpco/default-build-image:4116
image: registry.gitlab.fpcomplete.com/fpco/default-build-image:4297

cache:
key: "$CI_BUILD_NAME"
Expand Down
2 changes: 0 additions & 2 deletions .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
- error: {lhs: "Network.HTTP.Client.parseUrlThrow", rhs: "Network.HTTP.StackClient.parseUrlThrow"}
- error: {lhs: "Network.HTTP.Client.path", rhs: "Network.HTTP.StackClient.path"}
- error: {lhs: "Network.HTTP.Client.responseHeaders", rhs: "Network.HTTP.StackClient.responseHeaders"}
- error: {lhs: "Network.HTTP.Client.withResponse", rhs: "Network.HTTP.StackClient.withResponseByManager"}
- error: {lhs: "Network.HTTP.Conduit.requestHeaders", rhs: "Network.HTTP.StackClient.requestHeaders"}
- error: {lhs: "Network.HTTP.Simple.HttpException", rhs: "Network.HTTP.StackClient.HttpException"}
- error: {lhs: "Network.HTTP.Simple.addRequestHeader", rhs: "Network.HTTP.StackClient.addRequestHeader"}
Expand Down Expand Up @@ -88,4 +87,3 @@
- error: {lhs: "Network.HTTP.Types.hContentMD5", rhs: "Network.HTTP.StackClient.hContentMD5"}
- error: {lhs: "Network.HTTP.Types.methodPut", rhs: "Network.HTTP.StackClient.methodPut"}
- ignore: {name: "Use alternative", within: "Network.HTTP.StackClient"}
- ignore: {name: "Use withResponseByManager", within: "Network.HTTP.StackClient"}
43 changes: 43 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,37 @@ Release notes:

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.tar` style indices. See
[#4137](https://github.com/commercialhaskell/stack/issues/4137).
* Support for archives and repos in the `packages` section has
been removed. Instead, you must use `extra-deps` for such
dependencies. `packages` now only supports local filepaths.
* Addition of new configuration options for specifying a "pantry
tree" key, which provides more reproducibility around builds,
and (in the future) will be used for more efficient package
content downloads. You can also specify package name and version
for more efficient config parsing.
* __NOTE__ The new `stack freeze` command provides support
for automatically generating this additional
information.
* Package contents and metadata are stored in an SQLite database
in place of files on the filesystem. The `pantry` library can be
used for interacting with these contents.
* Internally, Stack has changed many datatypes, including moving
to Cabal's definition of many data types. As a result of such
changes, existing cache files will in general be invalidated,
resulting in Stack needing to rebuild many previously cached
builds in the new version. Sorry :(.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bump to version 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with such a version bump for this set of changes, especially if 2.0 ends up including #3922 and Backpack. @borsboom thoughts?

* A new command, `stack freeze` has been added which outputs
project and snapshot definitions with dependencies pinned to
their exact versions.
* The `ignore-revision-mismatch` setting is no longer needed, and
has been removed.

Behavior changes:

Other enhancements:
Expand All @@ -27,9 +58,21 @@ Other enhancements:
redefine the default styles that stack uses to color some of its output. See
`stack --help` for more information.
* New build option `--ddump-dir`. (See [#4225](https://github.com/commercialhaskell/stack/issues/4225))
* Stack parses and respects the `preferred-versions` information from
Hackage for choosing latest version of a package in some cases,
e.g. `stack unpack packagename`.
* Git repos are shared across multiple projects. See
[#3551](https://github.com/commercialhaskell/stack/issues/3551)

Bug fixes:

* Ignore duplicate files for a single module when a Haskell module was
generated from a preprocessor file. See
[#4076](https://github.com/commercialhaskell/stack/issues/4076).
* Only track down components in current directory if there are no
hs-source-dirs found. This eliminates a number of false-positive
warnings, similar to
[#4076](https://github.com/commercialhaskell/stack/issues/4076).
* Handle a change in GHC's hi-dump format around `addDependentFile`,
which now includes a hash. See
[yesodweb/yesod#1551](https://github.com/yesodweb/yesod/issues/1551)
Expand Down
5 changes: 5 additions & 0 deletions doc/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ This guide takes a new stack user through the typical workflows. This guide
will not teach Haskell or involve much code, and it requires no prior experience
with the Haskell packaging system or other build tools.

__NOTE__ This document is probably out of date in some places and
deserves a refresh. If you find this document helpful, please drop a
note on [issue
#4252](https://github.com/commercialhaskell/stack/issues/4252).

## Stack's functions

stack handles the management of your toolchain (including GHC — the Glasgow
Expand Down
6 changes: 6 additions & 0 deletions doc/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# Architecture

__NOTE__ MSS 2018-08-22 This document is out of date, and will be made
more out of date by
[#3922](https://github.com/commercialhaskell/stack/issues/3922). I
intend to update it when implementing #3922. Tracked in
[#4251](https://github.com/commercialhaskell/stack/issues/4251).

## Terminology

* Package identifier: a package name and version, e.g. text-1.2.1.0
Expand Down
130 changes: 1 addition & 129 deletions doc/custom_snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,132 +2,4 @@

# Custom Snapshots

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: 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

# 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: snapshot.yaml
```

This is an example of a custom snapshot stored in the filesystem. They are
assumed to be mutable, so you are free to modify it. We detect that the snapshot
has changed by hashing the contents of the involved files, and using it to
identify the snapshot internally. It is often reasonably efficient to modify a
custom snapshot, due to stack sharing snapshot packages whenever possible.

## Using a URL instead of a filepath

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.

### Overriding the compiler

The following snapshot specification will be identical to `lts-7.1`, but instead
use `ghc-7.10.3` instead of `ghc-8.0.1`:

```yaml
resolver: lts-7.1
compiler: ghc-7.10.3
```

### Dropping packages

The following snapshot specification will be identical to `lts-7.1`, but without
the `text` package in our snapshot. Removing this package will cause all the
packages that depend on `text` to be unbuildable, but they will still be present
in the snapshot.

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

### Specifying ghc-options

In order to specify ghc-options for a package, you use the same syntax as the
[ghc-options](yaml_configuration.md#ghc-options) field for build configuration.
The following snapshot specification will be identical to `lts-7.1`, but
provides `-O1` as a ghc-option for `text`:

```yaml
resolver: lts-7.1
packages:
- text-1.2.2.1
ghc-options:
text: -O1
```

This works somewhat differently than the stack.yaml `ghc-options` field, in that
options can only be specified for packages that are mentioned in the custom
snapshot's `packages` list. It sets the ghc-options, rather than extending those
specified in the snapshot being extended.

Another difference is that the `*` entry for `ghc-options` applies to all
packages in the `packages` list, rather than all packages in the snapshot.

### Specifying flags

In order to specify flags for a package, you use the same syntax as the
[flags](yaml_configuration.md#flags) field for build configuration. The
following snapshot specification will be identical to `lts-7.1`, but
it enables the `developer` cabal flag:

```yaml
resolver: lts-7.1
packages:
- text-1.2.2.1
flags:
text:
developer: true
```
This content has been moved to the [docs on pantry](pantry.md).
Loading