ghcup-metadata/README.md
2023-09-30 00:34:13 +08:00

2.4 KiB

GHCup metadata

For end users

Metadata variants (distribution channels)

  • ghcup-A.B.C.yaml: this is the main metadata and what ghcup uses by default
  • ghcup-vanilla-A.B.C.yaml: this is similar to ghcup-A.B.C.yaml, but only uses upstream bindists (no patches/fixes are applied, no missing platforms added)
  • ghcup-prereleases-A.B.C.yaml: this contains pre-releases of all tools
  • ghcup-cross-A.B.C.yaml: this contains (usually experimental) cross compilers

Using the metadata

If you want access to both pre-releases and cross compilers, run:

ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml
ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-cross-0.0.8.yaml

For contributors

Adding a new GHC version

  1. open the latest ghcup-<yaml-ver>.yaml
  2. find the latest ghc version (in yaml tree e.g. ghcupDownloads -> GHC -> 8.10.7)
  3. copy-paste it
  4. adjust the version, tags, changelog, source url
  5. adjust the various bindist urls (make sure to also change the yaml anchors)
  6. run cabal run ghcup-gen -- check -f ghcup-<yaml-ver>.yaml
  7. run cabal run ghcup-gen -- check-tarballs -f ghcup-<yaml-ver>.yaml -u 'ghc-8\.10\.8'
  8. run cabal run ghcup-gen -- generate-hls-ghcs -f ghcup-<yaml-ver>.yaml --format json -o hls-metadata-0.0.1.json
  9. run cabal run ghcup-gen -- generate-table -f ghcup-<yaml-ver>.yaml --stdout and adjust docs/install tables

During a pull request