Progress on migrating to Rescript

Hello fellow ReasonML enthusiasts :wave:

I was checking out some of the exercies on this track and noticed that they are still based on BuckleScript which has since rebranded to ReScript back in 2020 :scream_cat:

On GitHub, there are some issues and contributions regarding migrating to ReScript but it seems there hasnā€™t been much progress on this migration for quite some time.

Itā€™s quite complicated to solve the exercises in this state. As a learner itā€™s quite hard to depend on the docs from either ReasonML, BuckleScript or Rescript, since the versions are quite outdated.

Is it the intention to continue with the migration to help resolve this situation?
Thereā€™s quite a lot of exercises to migrate which would take some effort but maybe could it be better to move to a supported platform?

Also asking first because I see that all open PRs relate to migrating some exercises are still open

Hoping I could help with this effort or any better alternative that could help learners find some reliable way forward.

Hello :slight_smile: Thanks for posting!

Iā€™m not sure we have anyone that really knows/can own the ReasonML/Rescript track currently. @BNAndras and @IsaacG have both committed in recent times but I donā€™t think to any great extent, which is why this is stalled.

If youā€™d like to take the work on, Iā€™d be happy for you to do so? :slight_smile:

Iā€™ve mostly been doing sporadic maintenance tasks on the track. I wouldnā€™t even know where to start on continuing the migration unfortunately. That said, I can help out where I can once we start.

1 Like

Thanks for your responses.

I would be happy to dedicate some hours towards this but itā€™s quite unclear where to start.

It seems the options available are:

  • Compile to JavaScript via ReScript. Basically going ahead with the migration
  • Migrate the build system from Bucklescript to dune, using native OCaml tools and avoiding the compilation to JS. dune is already used in the OCaml track and maybe thereā€™s a chance to reuse even more stuff like the templates / tests?
  • Compile to JavaScript via Melange in combination with dune. Melange supports the ReasonML syntax. No need for migrating everything, probably just the build system and tests.

If I had to choose one I would go for the second option. Iā€™m not sure the compilation to JS is necessary.

Maybe ReScript should be a totally separate track since the languages are now quite different from each other.

Thanks! :slight_smile:

From reading around, this seems to me to be the right approach. They seem to both be active languages. So maybe starting a new track for ReScript would be best?

@ErikSchierboom Do you have any wisdom?

1 Like

I agree that a separate ReScript track is worthwhile.

Switching ReasonML to ReScript in place would break over 2k student solutions. Current students may also want to keep doing ReasonML content instead of ReScript. The most recent exercise completion was this weekend so thereā€™s still ongoing activity on the track.

A separate track for ReScript lets the maintainers start with a blank slate rather than updating things in place. Thatā€™d be invaluable and allow them more momentum once the effort gets underway.

However, I think we should take a look at the ReasonML track. If ReScript does takes off, itā€™ll have maintainers, but ReasonML might not. Are there any changes we could make to that track so itā€™s easier for us to maintain as a community?

3 Likes

Switching ReasonML to ReScript in place would break over 2k student solutions. Current students may also want to keep doing ReasonML content instead of ReScript.

100% agree

However, I think we should take a look at the ReasonML track. If ReScript does takes off, itā€™ll have maintainers, but ReasonML might not. Are there any changes we could make to that track so itā€™s easier for us to maintain as a community?

Happy to help with keeping the ReasonML track functioning.

Migrate the build system from Bucklescript to dune, using native OCaml tools and avoiding the compilation to JS.

I still believe this is the best option to ease the burden on maintenance by using supported build tools (dune) which seems like the default for OCaml and its ecosystem (including ReasonML)

Removing the tools dependent on the JS ecosystem should make the setup much simpler.

Thanks for your contributions, and happy to help with whichever direction seems the best for all.

1 Like

Iā€™m happy with a split if the differences are more than just trivial (which I assume they are).

1 Like