We are happy to announce that we finally released the first beta of ReScript 12 .
This comes with the new build system (codename rewatch) enabled by default.
Please try it out in your projects and report any issues you find.
Installation
npm create rescript-app@next
Select 12.0.0-beta.1 and proceed the installation process
(this works in existing projects as well, package.json required)
or, for purists:
npm install rescript@next
Opt-out to legacy build system
ReScript 12 still comes with the old, ninja-based build system (bsb). To use it, simply add legacy before the command.
E.g. rescript build → rescript legacy build
This can also be useful to test if something does not work anymore with the newer build system that worked fine with the older one (or vice versa).
Outlook
Please share and test as much as you can. Our new goal is to release v12 in September, but there will be release candidate versions still in July or August.
I’m running beta1 in a production system that runs 24/7 with high-performance parts, lots of system calls, approx 12k lines of code. It’s great and feels like an rc, and has felt like an rc even since it was in alpha.
The one thing that needs to stabilize are certain apis (e.g., rescript-vitest-plugin is broken now because of rewatch).
Also finally, I can’t give this community a big enough thanks. NOTHING comes close to rescript in terms of dx for me in the js universe. my main gripes with rescript: 1) lacking early return 2) some stdlib apis are somewhwt lacking, could be more complete and 3) i don’t like camel case, would prefe rsnake case throughout but yeah, this is a reasonable choice given js universe…
thanks to all of the team and community for having created this absolutely fantastic language/compiler/etc which is ultimately the only sane way to write node apps today. (ok sometimes i have to revert to typescript because i can’t do type magic in rescript which is sometimes helpful, type unions and whatnot)
I’ve been glad to early.
The language server (v 1.63.0-next-e18a3cd.0) doesn’t refresh errors in my code.
When I have an error (neovim shows the error correctly) and I fix it, it still shows me the error (s screenshot).
I have to restart the server or neovim to update the state.
Maybe someone with VSCode or some other IDE can try it out .
Yes, edit 3 fixes the problem Everything looks fine now.
The snippet should also be included in the lsp-config repo of neovim. Maybe I will create a pr there.
Where would you add the snippet? In the docs of the language server? Does VSCode handle it automatically?
I don’t know what the best location is to add the snippet. I suppose it is where neovim users would find some info. I didn’t find anything on the rescript org side.
yeah, just using vite-plugin-rescript (sorry, i misnamed it previously) gives this:
[@jihchi/vite-plugin-rescript] error: unexpected argument '-w' found
tip: to pass '-w' as a value, use '-- -w'
Usage: rescript.exe build [OPTIONS] [FOLDER]
For more information, try '--help'.
ExecaError: Command failed with exit code 2: rescript build -with-deps -w
error: unexpected argument '-w' found
tip: to pass '-w' as a value, use '-- -w'
Usage: rescript.exe build [OPTIONS] [FOLDER]
For more information, try '--help'.