TheSpyder / rescript-webapi

ReScript bindings to the DOM and other Web APIs
http://tinymce.github.io/rescript-webapi/api/Webapi/
Other
149 stars 36 forks source link

Rescript 11 (WIP) #125

Closed mvaled closed 1 year ago

mvaled commented 1 year ago

This PR shows that we can upgrade to the upcoming release of rescript.

We could even remove the only dev dependency; but it's not required.

TheSpyder commented 1 year ago

That's good to know, thank you! I'm not yet sure what I want to do with ReScript 11, but it looks like uncurried: false is enough.

Many of these JS output changes are from ReScript 10, I haven't done any serious changes to webapi since that was released.

mvaled commented 1 year ago

Hi @TheSpyder

I only created this PR because at first it gave me some issues.

Indeed, I'm not sure either if webapi benefits from the new things in Rescript 11. But it's good to know that it works with it; provided you set your project to "uncurried": false.

In the future, however, we might want to update it to adopt the new uncurried standard, so that projects be not required to set this flag. Otherwise, we might cause friction between the language and the library.

TheSpyder commented 1 year ago

I'm happy to add uncurried false to the bsconfig here, that's not a problem.

Support for uncurried mode is no simple task for this library. Some of the changes I'd like to do will make that easier, but it's a lot of work.

mvaled commented 1 year ago

I'm not sure if that would work, i.e a project with "uncurried": true depending on a project that has it set to false. I could test this idea.

TheSpyder commented 1 year ago

I haven't tried either, but one of my other projects also depends on false - and parts of it actually don't work with false at the moment (I mentioned this to the devs but haven't logged a ticket for it yet).

TheSpyder commented 1 year ago

0.9.0 has been published, and I believe it works with uncurried mode thanks to #123