on master help sign in
Merge pull request #4704 from commercialhaskell/new-check
34d6eb4Michael Snoyman
.gitignore+3
@@ -5,3 +5,6 @@ lts-*.yaml
5*.swp
5*.swp
6check-plan.yaml
6check-plan.yaml
7*~
7*~
8+/constraints.yaml
9+/snapshot.yaml
10+/snapshot-incomplete.yaml
CURATORS.md+12−12
@@ -18,8 +18,8 @@ This section sketches out at a high level how the entire Stackage build/curation
18process works:
18process works:
19
19
20* [build-constraints.yaml](https://github.com/commercialhaskell/stackage/blob/master/build-constraints.yaml) specifies packages to be included in Stackage
20* [build-constraints.yaml](https://github.com/commercialhaskell/stackage/blob/master/build-constraints.yaml) specifies packages to be included in Stackage
21−* [stackage-curator](http://www.stackage.org/package/stackage-curator) combines build-constraints.yaml with the current state of Hackage to create a build plan for a Stackage Nightly
21+* [curator](https://github.com/commercialhaskell/stack/tree/master/subs/curator) combines build-constraints.yaml with the current state of Hackage to create a build plan for a Stackage Nightly
22−* stackage-curator can check that build plan to ensure all version bounds are consistent
22+* `curator` can check that build plan to ensure all version bounds are consistent
23 * The [Travis job](https://github.com/commercialhaskell/stackage/blob/master/.travis.yml) performs these two steps to provide immediate feedback on pull requests
23 * The [Travis job](https://github.com/commercialhaskell/stackage/blob/master/.travis.yml) performs these two steps to provide immediate feedback on pull requests
24* Docker Hub [builds](https://github.com/commercialhaskell/stackage/blob/master/Dockerfile) a [Docker image](https://hub.docker.com/r/commercialhaskell/stackage/) for running builds
24* Docker Hub [builds](https://github.com/commercialhaskell/stackage/blob/master/Dockerfile) a [Docker image](https://hub.docker.com/r/commercialhaskell/stackage/) for running builds
25* The stackage-build server (described below) is able to run automated builds using the [build.sh script](https://github.com/commercialhaskell/stackage/blob/master/automated/build.sh)
25* The stackage-build server (described below) is able to run automated builds using the [build.sh script](https://github.com/commercialhaskell/stackage/blob/master/automated/build.sh)
@@ -72,7 +72,7 @@ Most common technique, just prevent a new version of a library from
72being included immediately. This also applies to when only benchmarks
72being included immediately. This also applies to when only benchmarks
73and tests are affected.
73and tests are affected.
74
74
75−* Copy the stackage-curator output and create a new issue, see e.g
75+* Copy the `curator` output and create a new issue, see e.g
76https://github.com/commercialhaskell/stackage/issues/2108
76https://github.com/commercialhaskell/stackage/issues/2108
77
77
78* Add a new entry under the "stackage upper bounds" section of `build-constraints.yaml`. For the above example it would be
78* Add a new entry under the "stackage upper bounds" section of `build-constraints.yaml`. For the above example it would be
@@ -84,7 +84,7 @@ https://github.com/commercialhaskell/stackage/issues/2108
84```
84```
85
85
86* Commit (message e.g. "Upper bound for #2108")
86* Commit (message e.g. "Upper bound for #2108")
87−* Optionally: Verify with `stackage-curator check` locally
87+* Optionally: Verify with `./check` locally
88* Push
88* Push
89* Verify that everything works on the build server (you can restart the build or wait for it to to run again)
89* Verify that everything works on the build server (you can restart the build or wait for it to to run again)
90
90
@@ -110,7 +110,7 @@ new package may appear if its dependencies were part of this issue but
110have been updated since the last time we checked. We want to give
110have been updated since the last time we checked. We want to give
111these new packages ample time to be upgraded.
111these new packages ample time to be upgraded.
112
112
113−If stackage-curator is happy commit the change ("Remove upper bounds
113+If `curator` is happy commit the change ("Remove upper bounds
114and close #X"). After doing this the next nightly build may fail
114and close #X"). After doing this the next nightly build may fail
115because some packages didn't have an upper bound in place, but
115because some packages didn't have an upper bound in place, but
116compilation failed. In this case revert the previous commit so any
116compilation failed. In this case revert the previous commit so any
@@ -367,30 +367,30 @@ We do not run the full stackage build locally as that might take too
367much time. However, some steps on the other hand are much faster to do
367much time. However, some steps on the other hand are much faster to do
368yourself, e.g. verifying constraints without building anything.
368yourself, e.g. verifying constraints without building anything.
369
369
370−To get started, install `stackage-curator` via Git, or [the Linux binary]:
370+To get started, install `curator` via Git:
371
371
372```
372```
373−$ git clone git@github.com:fpco/stackage-curator.git
373+$ git clone git@github.com:commercialhaskell/stack.git
374−$ cd stackage-curator && stack install
374+$ cd stack && stack install curator
375```
375```
376
376
377−It is a good idea to upgrade `stackage-curator` at the start of your week.
377+It is a good idea to upgrade `curator` at the start of your week.
378Then, clone the stackage repo, get the latest packages and run dependency
378Then, clone the stackage repo, get the latest packages and run dependency
379resolution:
379resolution:
380
380
381```
381```
382$ git clone git@github.com:commercialhaskell/stackage.git
382$ git clone git@github.com:commercialhaskell/stackage.git
383−$ stack update && stackage-curator check
383+$ cd stackage
384+$ ./check
384```
385```
385
386
386This can be used to make sure all version bounds are in place, including for
387This can be used to make sure all version bounds are in place, including for
387test suites and benchmarks, to check whether bounds can be lifted, and to get
388test suites and benchmarks, to check whether bounds can be lifted, and to get
388[tell-me-when-its-released] notifications.
389[tell-me-when-its-released] notifications.
389
390
390−`stackage-curator` does not build anything, so you wont see any compilation
391+`curator` does not build anything, so you wont see any compilation
391errors for builds, tests and benchmarks.
392errors for builds, tests and benchmarks.
392
393
393−[the Linux binary]: https://s3.amazonaws.com/stackage-travis/stackage-curator/stackage-curator.bz2
394[tell-me-when-its-released]: https://github.com/commercialhaskell/stackage/blob/master/CURATORS.md#waiting-for-new-releases
394[tell-me-when-its-released]: https://github.com/commercialhaskell/stackage/blob/master/CURATORS.md#waiting-for-new-releases
395
395
396## Adding new curators
396## Adding new curators
check+10−2
@@ -1,6 +1,14 @@
1−#!/bin/sh
1+#!/bin/bash
2
2
3# Convenience script for checking constraints locally
3# Convenience script for checking constraints locally
4
4
5cd `dirname $0`
5cd `dirname $0`
6+
7+export GHCVER=$(sed -n "s/^ghc-version: \"\(.*\)\"/\1/p" "build-constraints.yaml")
8+
9+NIGHTLY="nightly-$(date +%Y-%m-%d)"
10+curator update &&
11+ curator constraints --target=$NIGHTLY &&
12+ curator snapshot-incomplete &&
13+ curator snapshot &&
6−exec stack exec --resolver ghc-8.6.5 stackage-curator check
14+ stack --resolver ghc-$GHCVER exec curator check-snapshot