[ANN] ReScript 10 - First Alpha Release

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 : )

48 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

yes. I published it immediately as v14.2.1.

1 Like

Could anyone of our team contributors update the latest package file of ci into the npm? I’m very happy to use and feedback the bugs of the latest compiler. The current compiler version rescript@10.0.0-alpha.1 on npm failed to build rescript project on windows10.