Unable to install GHC head version
The following error occurs (https://github.com/composewell/streamly/runs/5014667413?check_suite_focus=true):
[ Error ] Download failed: Process "curl" with arguments ["-fL", "-o",
[ ... ] "/tmp/ghcup-5518e54f8c013197/ghc-x86_64-deb9-linux-integer-simple.tar.xz.tmp",
[ ... ] "https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-deb9-linux-integer-simple.tar.xz?job=validate-x86_64-linux-deb9-integer-simple"] failed with exit code 22.
[ Error ] Also check the logs in /home/runner/.ghcup/logs
Error: All install methods for ghc head failed
The deb9 install link that it is using does not work manually as well. However, the following deb10 link works:
$ ghcup install ghc -u https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-deb10-linux-integer-simple.tar.xz?job=validate-x86_64-linux-deb10-integer-simple head
Not sure why it is using deb9, gitlab runners do not even have any deb9 based ubuntu I guess.
It's using deb9 because that's what was used at the time and iirc was closest to the ubuntu 18.04 that was the default? It's a bit of a hacky hardcoded url and it'd be nice if it was supported "natively" with ghcup rather than taking advantage of knowing the right magic gitlab url to grab a CI job, but that's fine. I'll update the url soon (or a PR would be equally welcome)
A potential future solution for this might be via ghcup release channels, as suggested in #108 (but that would require GHC CI to generate a ghcup metadata file at a well-known URL).
As an alternative, how about leaving the weird hard-coded URL decision to the user, by making the GHC download URL an input (and even dropping explicit HEAD support?). I.e., leave it to the user to set
ghc-version: head
ghc-download-url: https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-deb10-linux-integer-simple.tar.xz?job=validate-x86_64-linux-deb10-integer-simple
which would translate into a call of ghcup install ghc -u ${ghc-download-url} ${ghc-version}.
I like that. The behavior could depend entirely on if ghc-download-url is set at all (rather than defaulting to gitlab). For backwards compatibility, head could default to the deb11 URL unless ghc-download-url is set.
If we're going to do that, it might be nice to potentially support ghc-download-url as either a string or an object so that windows/linux/macos URLs can be specified. But that might be better done indirectly by supporting ghcup release channels?
@robx wrote:
https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-deb10-linux-integer-simple.tar.xz?job=validate-x86_64-linux-deb10-integer-simple
This URL is broken as of today (2022-12-22):
$ wget https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-deb10-linux-integer-simple.tar.xz?job=validate-x86_64-linux-deb10-integer-simple
--2022-12-22 12:16:10-- https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-deb10-linux-integer-simple.tar.xz?job=validate-x86_64-linux-deb10-integer-simple
Resolving gitlab.haskell.org (gitlab.haskell.org)... 145.40.64.137
Connecting to gitlab.haskell.org (gitlab.haskell.org)|145.40.64.137|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-12-22 12:16:12 ERROR 404: Not Found.
(Same for deb11 variant.)
This issue has a new reincarnation here:
- #137
Please continue discussion there.
Solved by #279.