elmish / debugger

Time-traveling debugger and import export for Elmish apps
https://elmish.github.io/debugger
Other
41 stars 10 forks source link

Fall graciously when coders cannot be generated #26

Closed alfonsogarciacaro closed 5 years ago

alfonsogarciacaro commented 5 years ago

First attempt at fixing #25, please have a look if you have a moment. I've made so you can pass anything for deflating/inflating (not only Thoth.Json) although the ITransformer interface may not be very intuitive. Let me try this in my project before merging.

et1975 commented 5 years ago

I don't see a need for interfaces since there's no state to share between the methods or calls, but seems ok otherwise.

alfonsogarciacaro commented 5 years ago

It was just to group the two functions and give them a name. But actually in my tests I've notice the generated encoder can fail not at the time of creation but also later so I do need to keep some state (to prevent logging too many warnings) but I've done it just using a closure, so we can change the interface back to two functions if you prefer.

Anyways, this should be working now. So you it's ok to merge and push :)

BTW, do you know why Appveyor is failing? The log is empty.

et1975 commented 5 years ago

Appveyor doesn't have RTM VS2019 images yet it seems.

we can change the interface back to two functions if you prefer.

Yes please.

alfonsogarciacaro commented 5 years ago

Done :)

et1975 commented 5 years ago

Thank you! I'll release it shortly...