Open dsiu opened 1 year ago
Ah it doesn't work with uncurried mode. I'll have to add an extra setting to the bsconfig file.
Adding “uncurried”: false
in bsconfig.json
works as expected.
But it also means top level projects that depends on rescript-mocha
would need to do the same in their bsconfig.json
as well.
Any tips on making Internal.res
uncurried? I will study the code a bit more to see if I can come up with a fix.
(I am asking posting a question on ReScript forum to see if there is directive to enable curried
on a per-file basis.
Thanks,
I designed it with currying in mind so it might be a difficult conversion.
My other projects (most of which I took over maintenance on, didn't write myself) also require uncurried false so this doesn't surprise me.
@TheSpyder : I took a look at your modern-api
branch and removed some type annotation in the make*
functions, and it seems to compile and work under uncurried
mode in ReScript V11. The generated js code looks pretty clean.
Here is the commit: https://github.com/dsiu/rescript-mocha/commit/432cfd0154a208da819a4453b750f2c43d78f50e
I can make a pull request if needed.
Oh I haven't thought about that branch in a long time (over a year, as it turns out). I knew I had a lot going on personally but didn't think it had been that long...
I just discovered a stack of uncommitted changes on my dev machine from June 2022 🤣
it looks like I was trying to migrate more towards uncurried code - this was all done before uncurried
mode was confirmed - so I think it does make sense to update. I'll see if I can integrate your changes into that branch along with my uncommitted changes and make it a major release version. Thank you!
Awesome. I can help too if needed.
I haven't been actively using this project, nor has anyone in the community, so I forgot about this (I do remember reading your message at the time, but just found it again while clearing out my inbox).
I've pushed up those uncommitted changes to the modern-api
branch. I don't know if they work, or what my intent was, but if you'd like to combine them with your branch and make a PR I'm happy to provide feedback.