Progress on migrating to Rescript

In the worst case, if the image size cannot be reliably reduced, we could also switch to the Ocaml image and just use ReasonML as an alternative syntax :smile: :rocket:

But as you said, there’s always a way. Let’s see if we can find it :smile:

1 Like

Isaac also pinged Jeremy to ask if the size is okay or no :slight_smile:

1 Like

I am hoping to revive this thread a little, as I would like to give the ReasonML track some much needed love, in collaboration with what has already been achieved here so far.

I managed to get the Docker image down to 1.79GB, but I assume this is still way too large. All tests pass with this image.

I have tried going the other way around too, starting with an OCaml base image, but the sizes still come in at around 2GB.

The track is currently outdated. Bucklescript is not really used in Reason anymore as that evolved into Rescript, and that has its own syntax etc. Without Melange it will just be weird OCaml.

Is this a block on upgrading this track?

1 Like

@iHiD Do you have any guidance on max image sizes here?

2 Likes

This would be helpful info for me as well since the Pyret devs moved the optional image library into the standard library recently. That’ll bring in some hefty dependencies when we update the test runner to support the starter2025 environment once it’s available outside their online editor.

I’ve had some success shrinking Docker images recently so I’ll take a look at ReasonML + Melange.

1 Like

Melange requires both opam and Node & Jest so it’ll be over a gigabyte minimum just for those two. I’ve got it down to 1.69 GB at the moment, but I think we’d need to do remove parts of the Melange environment to see what’s not actually needed at runtime. Even then, the test runner will be at last double or triple its current size (378 MB) so that’s discouraging.

1 Like

Moving from BuckleScript to Rescript 10 (for compiling, not syntax) is an option. ReScript 11 dropped support for Reason’s syntax, but using 10 brings us up to 2023 from 2021 when BuckleScript was last used. That might be a good incremental change that won’t bloat the runner. We’re swapping one legacy compiler for another though at the end of the day.