-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking change in v2 related to non-F# objects? #20
Comments
The debugger is now using Thoth.Json as Fable 2 removed Because the debugger is also using version 2 of Thoth.Json if it doesn't understand the type it will generate an error. Thoth.Json isn't able to serialize/deserialize an unknown type. However, in version 3 of Thoth.Json, we added the possibility to extends the known types by Thoth.Json docs. I don't know if this is possible to extend it in order to support non F# types. Perhaps, by defining a binding for the type it can be possible or perhaps I need to allow adding non F# type support to Thoth.Json with the limitation that the type is identifiable using I didn't release Thoth.Json v3 yet because I didn't get a lot of feedback on it. And wanted to finish the docs upgrade. As a quick fix, I think you will need to copy the |
Hm, maybe then Thoth is just no applicable for us and we need a way to opt-out and use normal Js-object -> Json serialization? I can try to find a workaround where I use Thoth for fable components and use "simple" js serialization for typescript components |
If you can think of a sensible extensibility point for the debugger to take
the serializer that would be great too.
|
fixes elmish#20 Actually, I think this should have created problems for anyone not using F#-unions.
fixes #20 Actually, I think this should have created problems for anyone not using F#-unions.
@MangelMaxime apparently this wasn't an issue with Thoth after all. There was just code added which assumed that the type is a F#-DU which it obviously isn't in my scenario... |
Good catch :) |
Description
I have not quite debugged our issue but I feel like the upgrade to fable 2 broke the debugger for us
Repro code
This is a bit hard because basically what we do is embed TypeScript "elmish" components (basically
update
/view
/init
written in typescript) into our fable emlish application. This worked fine.The problem I see is this:
The parameter seems to originate from the following Typescript definition:
Expected and actual results
Expected: Debugger can work with non-F# objects
Actual: Debugger fails
Related information
Fable.Elmish (2.0.3)
"fable-compiler": { "version": "2.1.10",
Fable.Core (2.0.3)
The text was updated successfully, but these errors were encountered: