Support (be compatible with) Fable #28
Replies: 6 comments 3 replies
-
@alfonsogarciacaro where is the latest version on Fable TP that |
Beta Was this translation helpful? Give feedback.
-
Hi @sergey-tihon! Fable 0.7 should work with Type Providers, the main problem with Fable 1.0 is it's a netcore app and TPs won't work with netcore until netstandard 2.0 is released (July?). I've been thinking about giving support to the Swagger TP. At the beginning I thought it would be better to create a specific version of the TP for Fable, but now I'm considering it it's easier to just provide replacements for the classes needed by the Swagger TP (basically the @sergey-tihon, what do you think? Should we start working of this even if it only works with Fable 0.7? Or may it wait until netstandard2.0 is released and TPs work with netcore? |
Beta Was this translation helpful? Give feedback.
-
I think that we should go with Fable 1.0 ... As I understand everything is unclear with type provider. netstandard 2.0 may help with erased type providers, but probably not with generative. I've created template sample generative type provider https://github.com/sergey-tihon/generative-typeprovider-vnext with goal to find out the way of mastering type providers that work "everywhere". I agree with you that TP should be designed with idea that emitted code may be executed in JS world and provider replacements on rough edges. So I guess that we should wait for |
Beta Was this translation helpful? Give feedback.
-
I stumbled upon this today. My workaround is using NSwag to create a TypeScript client from swagger.json, then using ts2fable... |
Beta Was this translation helpful? Give feedback.
-
Now that 2.0 is in preview 2, did anyone try making this work with .net core? |
Beta Was this translation helpful? Give feedback.
-
There are still several problems with preview 2, specially with the SDK, so I would wait until preview 3 at least before trying anything. Also, the main problem to adapt the Swagger provider is it uses System.Http classes in the erasure code, which are not compatible with Fable at the moment. There are two possible solutions for this:
Unfortunately I don't have time after FableConf, but if someone wants to undertake this I can provide guidance. |
Beta Was this translation helpful? Give feedback.
-
Should be possible to use Swagger Provider from Fable.
There are some issues with reading AST of provided types
fsharp/fsharp-compiler-docs#568 (comment)
P.S.: Working RegExp provider
Beta Was this translation helpful? Give feedback.
All reactions