The gitlab CI infrastructure builds every commit on a wide number of platforms. It would be useful if users could test out various HEAD builds in some fashion using ghcup.
@mpickering this is a bit tricky to get right with ghcup's current static ghc version <-> artifact url mapping design. I.e we'd need some way to infer the version number to distinguish which release of GHC HEAD we have, as well as the ability to request a specific version of GHC HEAD (which isn't even a well-defined one, as e.g. the ones which are generated by my PPA might have the same numeric version but will most likely not match the commits the gitlab CI builder picked for obvious reasons).
If it's always the same tarball name, then we could skip the use of our url mapping file entirely. It won't be very pretty code-wise, but then it would be doable.
@hasufell but how do we detect whether we already have the requested version before starting a multi-MiB download, if the single url we download from keeps mutating? I'd like a reasonably robust scheme and so far this looks like a very unclean hack.
There is a nightly job which gets run from master which could provide a cleaner version to artefact mapping. It's a bit unclear to me how to access this information from the API though and it looks you need to be authenticated to.
the purpose of installing GHC HEAD is for testing; and there you need the ability to select a specific ghc version for figuring out where a regression was introduced or similar (and/or for reproducing bug reports against a specific ghc snapshot); the huge benefit of the gitlab-ci generated artifacts is that the history of binary artifacts is preserved -- one thing I cannot do easily w/ launchpad's apt repos which garbage collect very keenly and basically only support one version per package; also for CI usage you'd typically have local caches and run "install head" frequently, and then you'd end up wasting tons of network bandwidth as well as disk I/O if we don't detect that we already have installed whatever the symbolic "HEAD" indirection points to...
the purpose of installing GHC HEAD is for testing; and there you need the ability to select a specific ghc version for figuring out where a regression was introduced or similar
Not sure that is the primary use case. This sounds like GHC development and I would rather expect people to have the sources checked out and be able to compile and git bisect at will.
have the sources checked out and be able to compile and git bisect at will.
that's an extremely slow process; that's why we've been waiting to have some more automated means of bindist generation of GHC HEAD, so that we could speed up the bisecting process significantly by two or more orders of magnitude
I don't really see why the two are exclusive. You can ask for an artefact specifically or not. They are different use cases and both are possible to implement.
that's an extremely slow process; that's why we've been waiting to have some more automated means of bindist generation of GHC HEAD, so that we could speed up the bisecting process significantly by two or more orders of magnitude
I think that's a different and rather complicated use case to support properly. I was only thinking of a simple use case, which is "just install whatever HEAD points to", which is also basically what autogenerated github archives do.