Closed NobbZ closed 2 years ago
We have similar initial compilations times in the Haskell track, @NobbZ, but rebuilding and testing everything usually takes a little less than 3 minutes.
I guess the cache has almost he same effect as using a docker image, but seems easier to update.
Sometimes I clean all the caches and force a rebuild, specially after significant changes, like changing Stack's snapshot.
Avoiding custom docker images we trade compilation speed by convenience, so that we can just bump the snapshot version and clear the cache to have a newer GHC, libraries and HLint working as expected.
Currently we have a buildtime of about 30 minutes for idris alone if the cache is cold.
Having in mind that idris code can take forever to compile and also having in mind that the haskell track had some trouble because of long build times, I do think we should decrease the time spent in
install
to a minimum. I think this can be done by using docker on CI.I already spend some time on hub.docker.com but only found a single container providing a current version of idris (oleks2/alpine-idris) which has 1.0 installed by default. Even though it claims to be "alpine" (minimal linux installation) the built overlays aren't minimal at all and unnecessary bloated by keeping temporary stuff around that's not necessary anymore after building and installing idris.
When #22 is merged and we agree over the "journey"-style testing, I should be able to create a container which can be used for testing, also I'd keep it as minimal as possible to reduce download times of the container.
Even if I really prefer to use docker to minimalize buildtimes of necessary infrastructure, I do see a big drawback:
The container needs to be prebuilt and hosted elsewhere to make actually use of the time-savers, so changes on the internals require access to the corresponding hub, which makes some things very hard or even impossible for newcommers.
Another question to ask is, if we were hosting it under the name of a normal user or if it could be hosted under the exercism-organisation?
Perhaps @exercism/haskell folks can chime in here as well. If the dockerfile approach is actually usable and infrastructural questions have been answered, they may profit as well from a haskellified version.