(This is probably going off on a tangent, so apologies for that. Feel free to direct me elsewhere.)
Has anyone considered going kind of the opposite way and provide all of Stackage as pre-built binary distro packages so that we don’t need to rebuild everything again and again in CI and on each and every dev’s laptop? I’d really love to be able to do something like:
apt-add-repository ppa:haskell/lts-16
apt install libghc-pandoc-dev
or even better:
apt-add-repository ppa:haskell/stackage
apt install libghc-pandoc-dev-lts16
(I’m reasonably confident that with careful file placement and some use of metapackages and virtual package provides/requires, having one repo with multiple co-installable LTS version should be possible.)
Now why would I want such a thing? One recent example: we updated the https://xmonad.org/ website recently. The first prototype was done using Hakyll, but the GitHub Action to rebuild the website took 45 minutes. Sure, we could get it down to a couple minutes (which is still orders of magnitude more than what we get with GitHub Pages’ Jekyll, btw) with a cache, but this (several hundred megabytes large) cache gets evicted quite soon, so the next time we’d get to updating the website, we’d need to wait another hour. And every contributor who forked the repo and wanted to see what their changes look like would need to wait as well. We ended up using Jekyll instead as all this waste of time and resources isn’t worth it.
We could’ve used Hakyll from Debian, but that only solves our problem. Anyone who needs a different version of Hakyll or Pandoc for any reason is screwed. See Hakyll’s own CI: https://github.com/jaspervdj/hakyll/actions. All builds take something between 30 to 60 minutes. That’s completely unacceptable.
I may be mixing things together. What I’m really proposing is probably two separate things:
- pre-built LTS binaries
- deb packages for those with carefully selected file placement and interdependencies to make them co-installable and easy to use
Alternatively, ghc could be faster, but I don’t think that’s a realistic goal. Most compilers I’ve worked with in my career were slow, and using pre-built dependencies was the only way to make CI reasonably fast. Rust is being mentioned as an example a lot recently, and from my limited experience with it, it’s still slow enough for pre-built binaries to make sense.
Thoughts?