Home

Awesome

curator

Runtime image

Snapshot curator tool for, e.g., creating Stackage snapshots.

This is the "curator 2.0", replacing https://github.com/fpco/stackage-curator. It relies on pantry for finding appropriate packages, and Stack for performing the builds. It is intended to be much simpler to maintain than the old stackage-curator tool.

Incomplete!

This tool is not yet complete. Here's a (likely incomplete) list of things that still need to be handled to replace stackage-curator:

Basic workflow

Here's a rundown of how this tool is intended to be used.

We update the Hackage index to get a list of all of the most recent package versions. This is pantry's updateHackageIndex command.

We start with build-constraints.yaml, the configuration file in commercialhaskell/stackage. This specifies all of the packages we want to include in a snapshot, along with a bunch of configuration.

We parse build-constraints.yaml and convert it into the constraints.yaml file, which contains a more properly structures set of constraints. We'll continue to let users edit the build-constraints.yaml file, since it's more user-friendly. But constraints.yaml gives us more flexibility.

Curator team: at this point, you can edit constraints.yaml to make tweaks to the build plan. This replaces the old CONSTRAINTS environment variable.

We combine the constraints.yaml file and the information from Hackage to produce snapshot-incomplete.yaml. This has a concrete list of all of the packages we intend to include in the snapshot. Again, this file can be manually modified if desired.

The snapshot-incomplete.yaml file does not have all of the cryptographic hashes necessary for fully reproducible builds. We next generate snapshot.yaml with all of this information. This file should never be manually edited, instead edits should occur at the snapshot-incomplete.yaml and constraints.yaml phases.

The snapshot.yaml file gets checked for its consistency ensuring the following:

We unpack all of the package specified by snapshot.yaml into a local directory, and generate a stack.yaml that gives instructions to build all of those packages.

We build the packages, run test suites, and generate Haddocks.

TODO Grab artifacts and upload them to the right place.