Merge pull request #3053 from fpco/more-maintainer-updates

Build with Stack, LTS Haskell and GHC
This commit is contained in:
Michael Snoyman 2017-12-04 13:25:56 +02:00 committed by GitHub
commit 4b4d5f4bb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,30 @@ After doing that commit with a message like "add foo-bar" and send a pull reques
The continuous integration job will do some checks to see if your package's dependencies are up-to-date.
The CI job notably doesn't compile packages, run tests, build documentation, or find missing C libraries.
If you want to be proactive or if CI fails, you can make sure that your package builds against the newest versions of all dependencies like this:
If you want to be proactive or if CI fails, you can make sure that your package builds against the latest nightly:
```
# Build from the tarball on Hackage to check for missing files
$ stack unpack yourpackage && cd yourpackage-*
# Generate a pristine stack.yaml, adding any missing extra-deps
$ rm -f stack.yaml && stack init --resolver nightly --solver
# Build, generate docs, test, and build benchmarks
$ stack build --resolver nightly --haddock --test --bench --no-run-benchmarks
```
This approach works well, but has two limitations you should be aware
of:
* It won't notify you of restrictive upper bounds in your package if
Stackage has the same upper bounds. For that reason, we recommend
using [Packdeps](http://packdeps.haskellers.com/) (see "Following
dependency upgrades" below).
* If the latest Stackage Nightly is missing some of the latest
packages, your build above may succeed whereas the Travis job may
fail. Again: Packdeps will help you detect this situation.
Alternatively, you can build with `cabal`. Note that this may end up
using older dependency versions:
```
$ ghc --version # Should be the same as the latest nightly, it's in the title of https://www.stackage.org/nightly
@ -139,6 +162,13 @@ If your package ends up being temporarily disabled from Stackage
Nightly, please simply send a pull request to add it back once it and
its dependencies are compatible with the newest GHC version.
Note that it is _not_ a goal of LTS Haskell to track the latest
version of GHC. If you want the latest and greatest, Stackage Nightly
is your best bet. In particular, LTS Haskell will often—but not
always—avoid upgrading to the first point release of GHC
releases (e.g., 8.2.1) to allow further testing and to get the
benefits of the first bugfix release (e.g., 8.2.2).
## Adding a package to an LTS snapshot
The steps above affect the Stackage Nightly builds, but do not directly affect