on master help sign in
New local curator check & instructions
commit5641a69e2bfe224c077aa18e91027f31c5556143 authorAdam Bergmark <adam@bergmark.nl> dateTue 9 Jul 2019, 12:26 (7 years ago) parent821c342
3 files changed+25−14
.gitignore+3 CURATORS.md+12−12 check+10−2
.gitignore+3
@@ -5,3 +5,6 @@ lts-*.yaml
55*.swp
66check-plan.yaml
77*~
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
1818process works:
1919
2020* [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
22−* stackage-curator can check that build plan to ensure all version bounds are consistent
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+* `curator` can check that build plan to ensure all version bounds are consistent
2323 * The [Travis job](https://github.com/commercialhaskell/stackage/blob/master/.travis.yml) performs these two steps to provide immediate feedback on pull requests
2424* Docker Hub [builds](https://github.com/commercialhaskell/stackage/blob/master/Dockerfile) a [Docker image](https://hub.docker.com/r/commercialhaskell/stackage/) for running builds
2525* 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
7272being included immediately. This also applies to when only benchmarks
7373and tests are affected.
7474
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
7676https://github.com/commercialhaskell/stackage/issues/2108
7777
7878* 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
8484```
8585
8686* Commit (message e.g. "Upper bound for #2108")
87−* Optionally: Verify with `stackage-curator check` locally
87+* Optionally: Verify with `./check` locally
8888* Push
8989* Verify that everything works on the build server (you can restart the build or wait for it to to run again)
9090
@@ -110,7 +110,7 @@ new package may appear if its dependencies were part of this issue but
110110have been updated since the last time we checked. We want to give
111111these new packages ample time to be upgraded.
112112
113−If stackage-curator is happy commit the change ("Remove upper bounds
113+If `curator` is happy commit the change ("Remove upper bounds
114114and close #X"). After doing this the next nightly build may fail
115115because some packages didn't have an upper bound in place, but
116116compilation 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
367367much time. However, some steps on the other hand are much faster to do
368368yourself, e.g. verifying constraints without building anything.
369369
370−To get started, install `stackage-curator` via Git, or [the Linux binary]:
370+To get started, install `curator` via Git:
371371
372372```
373−$ git clone git@github.com:fpco/stackage-curator.git
374−$ cd stackage-curator && stack install
373+$ git clone git@github.com:commercialhaskell/stack.git
374+$ cd stack && stack install curator
375375```
376376
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.
378378Then, clone the stackage repo, get the latest packages and run dependency
379379resolution:
380380
381381```
382382$ git clone git@github.com:commercialhaskell/stackage.git
383−$ stack update && stackage-curator check
383+$ cd stackage
384+$ ./check
384385```
385386
386387This can be used to make sure all version bounds are in place, including for
387388test suites and benchmarks, to check whether bounds can be lifted, and to get
388389[tell-me-when-its-released] notifications.
389390
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
391392errors for builds, tests and benchmarks.
392393
393−[the Linux binary]: https://s3.amazonaws.com/stackage-travis/stackage-curator/stackage-curator.bz2
394394[tell-me-when-its-released]: https://github.com/commercialhaskell/stackage/blob/master/CURATORS.md#waiting-for-new-releases
395395
396396## Adding new curators
check+10−2
@@ -1,6 +1,14 @@
1−#!/bin/sh
1+#!/bin/bash
22
33# Convenience script for checking constraints locally
44
55cd `dirname $0`
6−exec stack exec --resolver ghc-8.6.5 stackage-curator check
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 &&
14+ stack --resolver ghc-$GHCVER exec curator check-snapshot