It works great here, thanks for all the awesome releases!
On first install it took a very long time, ~3 mins, to do yarn add -D rescript@m1 and when it eventually completed rescript didn’t work. I had to install one more time, which wasn’t slower than usual, and after that it worked.
I tried on this m1 with the command yarn add rescript@10.0.0-m1 which I got from the list of version available after trying yarn add rescript@m1. npm i rescript@m1 takes forever and fails.
ln -s ../byterun/afl.c afl.c
ln -s ../byterun/bigarray.c bigarray.c
make[3]: *** No rule to make target `none.o', needed by `libasmrun.a'. Stop.
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [makeruntimeopt] Error 2
make[1]: *** [opt.opt] Error 2
make: *** [world.opt] Error 2
node:child_process:730
throw err;
^
Error: Command failed: make -j9 world.opt && make install
at checkExecSyncError (node:child_process:690:11)
at Object.execSync (node:child_process:727:15)
at Object.build (/Users/Jaap/Documents/development/family-five/app/node_modules/rescript/s
cripts/buildocaml.js:70:6)
at provideCompiler (/Users/Jaap/Documents/development/family-five/app/node_modules/rescrip
t/scripts/install.js:192:36)
at Object.<anonymous> (/Users/Jaap/Documents/development/family-five/app/node_modules/resc
ript/scripts/install.js:222:1)
at Module._compile (node:internal/modules/cjs/loader:1092:14)
It failed for me at install time
Then I tried the newer 10.0.0-dev.1 which seemed to include a binary. That one worked pretty well. It compiled 50% faster. I would expect more of a performance boost, given comparable executable speedups between rosetta <> arm. However 50% is a great speedup.
Would it be possible for refmt to use the intel binary instead of failing if you have any Reason file in the project. Easily resolved in own projects, but some dependencies might still have Reason files. And even if you don’t use the reason files (not included in bs-dependencies) it does still try to compile them and fails unless you delete the Reason files from node_modules. This might be a bug?
I only use graphql-ppx, but I use an m1 version of that ppx. I know from testing that only a small fraction of time is spend in the ppx compared to the ReScript compiler. Regardless it’s pretty good 10s for a full compile of a 40kloc codebase.