The benefits of this would be:
- having to support one less syntax in the compiler
- one less syntax for contributors to have to keep in their head
- more comprehensive testing of .res(i) compiler
- better support for IDE tooling within the repo (via rescript-vscode plugin)
Since this is a lot of work, it could be broken down in the following way:
- update
refmt
to handle converting more BuckleScript syntax in files, see https://github.com/rescript-lang/rescript-compiler/issues/5339 - using the updated
refmt
write a script to convert all of the file .ml(i) files in jscomp/test to .res(i) files (this is a good starting place for converting things because these files don’t depend on each other) - write a script to update jscomp/others (and anything any other BuckleScript dependencies those files may have)
I’ve already done some experimenting with this and have had success converting some tests in jscomp/test using refmt and then tweaking things by hand a bit. I tried the same thing with a few files in jscomp/others, but noticed that any dependencies of a file also needed to be updated. Having a script that updates all files in jscomp/others automatically is really the only reasonable way to update these files.