exercism / elm-test-runner

GNU Affero General Public License v3.0
3 stars 5 forks source link

Prepare tests runner for elm-test-rs #14

Closed mpizenberg closed 3 years ago

mpizenberg commented 3 years ago

Improvements of the tests runner for elm.

mpizenberg commented 3 years ago

I'm struggling with how to make the elm compiler not hang. Normally, if the elm.json did not change since last time we compile, the compiler should assume that dependencies are good and immediately compile stuff. But if elm.json is updated, the elm compiler checks the dependencies, and for that it does some weird network interaction, resulting in 5s of hanging when there is no network.

So I put much care in trying to keep files timestamps, by using tar to create and extract an archive containing .elm, elm.json and elm-stuff. Yet, when running bin/run-in-docker.sh, we spend more than 5s in the elm compiler where this should take less then 1s. This (tar) is obviously not enough to prevent the network hang of the elm compiler, and I'd like to figure out how to fix it.

mpizenberg commented 3 years ago

I've added tinyproxy to set a small proxy configured to fail all http requests. This effectively makes the elm compiler immediately switch to its offline mode and prevents the 5s hang :)

I've also added a line to "un-skip" all the skipped tests in the tests/Tests.elm file.

mpizenberg commented 3 years ago

Alright I think this is ready for review. Here is a recap of the changes:

mpizenberg commented 3 years ago

PS: the windows script run-in-docker.ps1 needs a small update to match the few changes in run-in-docker.sh.

mpizenberg commented 3 years ago

Excited to be able to test this update of the tests runner once #10 (which is also ready for merge) is merged :)