[ANN] ReScript 10 - First Alpha Release

Hello everyone!

We are happy to announce that rescript@10.0.0-alpha.1 is now available on npm and ready for our first testing phase.

Installation

npm install rescript@next

We also published a corresponding @rescript/std library (for those who need it):

npm install @rescript/std@next

Important:

  • No playground version available yet. Will come later at the full release.
  • Editor extension should work as expected, new version will land as soon as the latest bugs are fixed

Changes

Full changelog can be found here:

Call for Testing

This is a new major release, so we want to make sure that we are not introducing any unintentional breaking changes.

If possible, try out v10 in your existing projects, and if there are any issues, make sure to open tickets in the compiler, syntax or rescript-vscode issue trackers.

If thereā€™s a problem with a particular ReScript library, let the maintainers know as well so we can work on a seamless migration path!

First Community Release :tada:

The v10 release was a very important step to a community managed development process.

We want to thank all participants finding / fixing bugs, exploring new functionality, taking care of CI and infrastructure, and even taking care of the actual npm release.

Github contributors:
An-Tu
Sehun0819
a-c-sreedhar-reddy
ah-yu
amiralies
aspeddro
cannorin
cometkim
glennsl
jchavarri
namenu

Special thanks to @Hongbo for building important core infrastructure / research, @cristianoc / @zth for taking care of the engineering / guidance of our community contributors, @ostera for setting up M1 automation, @cknitt / @fham for maintaining the new CI build pipelines and doing the npm release, @moondaddi for working on the new JSX draft (still WIP), @nkrkv / @augustine / @Minnozz / @jihchi for helping me transferring the latest docs to Belt / Js.

Most importantly, thanks everyone for creating a good foundation and take ownership of the platform. We are now able to build, develop, release all parts of the system, which allows us to gradually simplify the onboarding process for new contributors.

Enjoy!

48 Likes

Wow! I will try it right now! :+1::+1::+1:

Congrats on the first community alpha release!

It is great to see a vibrant community and more people get involved.

Today happens to be my birthday, a happy coincidence : )

49 Likes

Happy Birthday, @Hongbo! :tada: :red_gift_envelope: :cake:

3 Likes

Itā€™s really nice to see a new release with lots of various contributors. Thank you all !

7 Likes

Fantastic guys! What an amazing effort. Also congrats @Hongbo !!!

4 Likes

Looks fantastic! Thank you for release :fire:

Iā€™ve update my packages and personal projects and came across few things that affected me:

  • Compiler started adding empty strings around values in template literals (Example)
  • A forced new line after switch case with code block looks a little bit off to me, but I can understand the reasoning behind it (Example)
  • @spyder rescript-nodejs stopped compiling because of the Not a valid global name on the lines. Am I right that in the v10 it should be interoped as type settingsObject = {@optional someField: int}?
  • Received a new FFI warning while using optional chaining inside %raw. Interesting
  • Undocumented breaking change of the Js.String2.match_. From (Js.String2.t, Js.Re.t) => option<array<Js.String2.t>> to (Js.String2.t, Js.Re.t) => option<array<option<Js.String2.t>>>. And it looks like it was the correct type before.
1 Like

Itā€™s the = "" which causes that. I have prepared for this in webapi but forgot to check the nodejs bindings.

While yes the new record style will be fantastic for interop I do not plan to require v10 when it launches. Switching to that style will be a major breaking change (even if itā€™s a good one) for users of my libraries.

1 Like

No, it wasnā€™t correct before. Thereā€™s a scenario that requires the contents of the array to be optional.

2 Likes

Isnā€™t it actually the missing @obj decorator? On an object constructor function like this, what would the name in double-quotes be anyway? It doesnā€™t bind to any actual JavaScript function.

Yes thatā€™s the bug, which Iā€™ve already released a patch to fix, but the error is caused by the empty string external :slight_smile:

This patch? Added missing @obj to http2 settings object API. This API was broken,ā€¦ Ā· TheSpyder/rescript-nodejs@7321ede Ā· GitHub

There could be issues with rescript-relay . See #5493.

Thereā€™s really an issue with rescript-relay

Yes itā€™s in the release notes.
Would you contribute the smallest repro in an issue. That will help speed up resolution.

1 Like

Thereā€™s an example project in the rescript-relay repo. Iā€™ve cloned it, installed rescript@next and got the error.

1 Like

Build failed on windows10

It turns out that because of using comment caused this error.
image
After removing it and build again, it failed with another error:
image

This is now fixed in rescript-relay@1.0.0-beta.24.

For PPX authors experiencing the same issue (should be anyone using ppxlib), what I did to solve the issue is here: https://github.com/zth/rescript-relay/pull/372

3 Likes

Thank you for the fix!

Iā€™m so pleased to have the V10 alpha release. It has been a while to see the release with awesome new features. Thank core team for your efforts! Cheers!

2 Likes