haskell / play-haskell

Haskell Playground
125 stars 8 forks source link

Automatic refreshing of GHC versions #5

Open tomsmeding opened 1 year ago

tomsmeding commented 1 year ago

Currently the workers just make the host .ghcup directory available in the containers, meaning that it's up to the worker host administrator to install new GHC versions in ghcup whenever they get released. (Furthermore, said administrator should remember to install ubuntu-compatible ones, if the host OS is not ubuntu.)

It would be nice to have some sort of automatic installation of new GHCs, including cleanup of older minor versions. Perhaps this should also mean that the worker has its own separate .ghcup directory?

tomsmeding commented 1 year ago

It may also be nice to auto-refresh prerelease GHC versions using the ghcup functionality described here. However, two blockers for that:

tomsmeding commented 1 year ago

Possible extension to this (suggested by @Kleidukos): have some spec (json?) that gives a list of ghc versions including a list of exposed packages and a freeze file for each, and have the playground automatically install/remove ghcup ghc versions according to that list, and build/remove template projects according to that list. Then we have a nice declarative system to manage ghc versions across workers, and we also avoid the problem of there being potentially different library versions across the workers.