You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before v4.0.2 (e.g.. v4.0.1) my code was working fine, however in v4.0.2 there were added some changes into fable-library/Utils.ts (related to currying helpers) that causes the error.
Actual result:: Uncaught SyntaxError: The requested module '/fable_modules/fable-library.4.0.2/Util.js' does not provide an export named 'curry1' is thrown on the app load, not allowing it to run.
Related information
Fable version: >= 4.0.2 & <= 4.1.3
Operating system: Windows 10 22H2
The text was updated successfully, but these errors were encountered:
Thanks for the report. I think we can add a workaround for your case, although one "problem" is you're passing a function of arity-2 to an argument with arity-1 forcing it with a dynamic cast !! (ref). A better solution would be to wrap the function: onChange = fun v -> field.onChange null v. This way you don't get only the code to compile but you have better control of the actual behavior (not sure how that code was working so far).
It's true Fable should respect the type cast and don't try to curry/uncurry, but historically many Fable apps with dynamic bindings rely on Fable trying to make a guess on how function arguments must be uncurried so we are ignoring the type cast in these cases.
Ah, ok, makes sense. This is actually the code taken from the other repo and I haven't payed enough attention to it - just have noticed that it works on one Fable version and does not on the other. Thank you very much for the clarification of this detail of the !! operator, pretty sure this can be very helpful somewhere in the future, especially when writing bindings to 3rd-party libraries (like in the example provided above) 👍
Description
Before v4.0.2 (e.g.. v4.0.1) my code was working fine, however in v4.0.2 there were added some changes into
fable-library/Utils.ts
(related to currying helpers) that causes the error.Repro code
https://github.com/ArtemyB/Feliz.ReactHookForm/tree/b61d0a1e87859a19b586e33de8d277e45ec98a34
To run the app:
pnpm install
pnpm start
Expected and actual results
Expected result: app loads without any problems.
Actual result::
Uncaught SyntaxError: The requested module '/fable_modules/fable-library.4.0.2/Util.js' does not provide an export named 'curry1'
is thrown on the app load, not allowing it to run.Related information
The text was updated successfully, but these errors were encountered: