diff --git a/CURATORS.md b/CURATORS.md index 1bbbc442..d1cdbdcc 100644 --- a/CURATORS.md +++ b/CURATORS.md @@ -422,20 +422,16 @@ errors for builds, tests and benchmarks. ### Large scale enabling/disabling of packages -`etc/commenter` is a binary that mostly automates the translation of -`./check` errors into lines that go into `build-constraints.yaml`. It -can only handle bounds issues, compilation issues still need to be -handled manually. - -It disables all offending packages/test suites/benchmarks, so it is -only meant to be used when we close bounds issues and want to disable -packages, and when upgrading GHC. +`etc/commenter` is a binary that automates `build-constraints.yaml` workflows. #### Setup This is currently a rust program, You can install the rust toolchain by using [rustup](https://rustup.rs/). -Then `cargo install --locked --path etc/commenter` +For some commands you also need etc/commenter/latest-version installed. +``` +stack install --stack-yaml etc/commenter/latest-version/stack.yaml +``` #### Example usage @@ -456,7 +452,7 @@ testing-feat (GHC 9 bounds issues, Grandfathered dependencies) (not present) dep Now run: ``` -./check 2>&1 >/dev/null | commenter add +./check 2>&1 >/dev/null | ./commenter add ``` You will get this output: @@ -483,8 +479,8 @@ Re-run this command until no more packages are disabled. We can periodically remove all packages under the bounds sections and then re-run the disabling flow above until we get a clean plan. This will automatically pick up packages that have been fixed. ``` -commenter clear -./check 2>&1 >/dev/null | commenter add +./commenter clear +./check 2>&1 >/dev/null | ./commenter add ``` Repeat the second command until no updates are made to build-constraints.yaml. @@ -493,7 +489,7 @@ Repeat the second command until no updates are made to build-constraints.yaml. Run `stack update` before doing this. -`commenter outdated` looks through all bounds issues and library +`./commenter outdated` looks through all bounds issues and library compilation failures and compares the marked version with the latest hackage release. Example output is ``` @@ -504,7 +500,7 @@ aeson mismatch, auto: 1.5.6.0, hackage: 2.0.2.0 where "manual" means the bound was added manually by a curator, perhaps due to a compilation failure so we could try re-enabling the package. "auto" means it's part of the sections generated by -`commenter`, to update that run the `Re-enabling` step as documented +`./commenter`, to update that run the `Re-enabling` step as documented above. `outdated` only finds packages that are in the auto generated @@ -520,7 +516,7 @@ To diff existing snapshots, or to evaluate changes before they end up in a snapshot you can run: ``` -commenter diff-snapshot +./commenter diff-snapshot ``` Existing snapshots can be retrieved from https://github.com/commercialhaskell/stackage-snapshots. Preliminary snapshots can be generated by running relevant parts of `automated/build.sh`, at the time of writing: @@ -535,7 +531,7 @@ TARGET=nightly-2021-01-14 \ # the date doesn't matter #### Finding disabled packages with lots of dependents -`commenter disabled` prints the number of transitive dependents a disabled package has. Low hanging fruit to get a lot of packages included again. +`./commenter disabled` prints the number of transitive dependents a disabled package has. Low hanging fruit to get a lot of packages included again. Example output: ``` diff --git a/commenter b/commenter new file mode 100755 index 00000000..d2a1b93c --- /dev/null +++ b/commenter @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +if ! command -v cargo +then + echo "Rust doesn't seem to be installed. https://rustup.rs/" + exit 1 +fi + +if [ "$1" = "outdated" ]; +then + if ! command -v latest-version &> /dev/null + then + echo "This command requires latest-version in your PATH" + echo "Install it with: " + echo "stack install --stack-yaml etc/commenter/latest-version/stack.yaml" + exit 1 + fi +fi + +cargo run -q --release --manifest-path etc/commenter/Cargo.toml $@ diff --git a/etc/commenter/src/lib.rs b/etc/commenter/src/lib.rs index afebf260..b15612fb 100644 --- a/etc/commenter/src/lib.rs +++ b/etc/commenter/src/lib.rs @@ -164,7 +164,7 @@ fn latest_version(packages: impl Iterator) -> BTreeMap