haskell / ghcup-metadata

GHCup metadata repository
33 stars 30 forks source link

GHCup metadata

This repo is a collection of different GHCup metadata. These are mappings from tool versions (e.g. GHC 9.6.5) to bindist URLs (e.g. https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-fedora33-linux.tar.xz), depending on architecture (e.g. X86_64), platform (e.g Linux) and possibly distro (e.g. Fedora).

For end users

Metadata variants (distribution channels)

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

If you want only vanilla upstream bindists and opt out of all unofficial stuff, you'd run:

ghcup config set url-source https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.0.8.yaml

Also check the config.yaml documentation.

Contributions

The default channel (ghcup-A.B.C.yaml)

This channel is strictly maintained by the GHCup project. Most bindists here are built downstream by the GHCup developers, e.g.:

For GHC bindists there is no automation yet and it is done manually (e.g. for FreeBSD and Alpine i386).

You can suggest updates to tool versions via raising an issue or a PR.

The vanilla channel (ghcup-vanilla-A.B.C.yaml)

These are technically maintained by the upstream developers (GHC, HLS, cabal and stack developers). GHCup developers do not interfere with decisions in general and do only little QA.

You can suggest updates to tool versions via raising an issue or a PR, but you may also want to CC some of the upstream developers.

For GHC:

For Cabal:

For Stack:

For HLS:

Other channels

Other channels are maintained in collaboration.

Understanding tags

Tags are documented here. Search for data Tag. Some tags are unique. Uniqueness is checked by cabal run ghcup-gen -- check -f ghcup-<yaml-ver>.yaml.

If you want to check prereleases, do: cabal run ghcup-gen -- check -f ghcup-prereleases-<yaml-ver>.yaml --channel=prerelease

During a PR

The following things are relevant when raising a PR.

ghcup-gen

ghcup-gen is a cabal project that lives in this repository to aid with various metadata tasks. Run cabal run ghcup-gen -- --help for more information.

To test that the yaml is valid and certain tags are unique, you can run:

cabal run ghcup-gen -- check -f ghcup-0.0.8.yaml

To test that all bindists you just added are fetchable, you can run e.g.:

cabal run ghcup-gen -- check-tarballs -f ghcup-0.0.8.yaml -u 'ghc-9\.6\.6'

Bindist CI

There is a manual workflow that runs smoke tests on all supported platforms against a tool version (e.g. installing GHC and compiling a hello world): https://github.com/haskell/ghcup-metadata/actions/workflows/bindists.yaml

To execute it your branch must exist on the main repository and you must have privileges to the repository. If you don't, ask the ghcup maintainer or some of the listed upstream maintainers.

Some of the failures are expected (e.g. armv7 on GHC).

GPG signing

Other information/help

An introduction into GHCup can be found in this presentation: https://www.haskell.org/ghcup/talks/Zurihac2024/GHCup.html

You can also join the Matrix channel if you need help.