Zaid-Ajaj / Fable.Remoting

Type-safe communication layer (RPC-style) for F# featuring Fable and .NET Apps
https://zaid-ajaj.github.io/Fable.Remoting/
MIT License
272 stars 54 forks source link

Remove ITypeResolver to support Fable 4 #313

Closed kerams closed 1 year ago

kerams commented 1 year ago

Support for type injection is removed from Fable(.Core) 4, hence this workaround.

I've thought about dropping the Fable 2 tests and adding 4, but versions 3 and 4 of the compiler are distributed as dotnet tools and I don't think it's possible to have multiple versions side-by-side.

Zaid-Ajaj commented 1 year ago

OK you can ignore my comments, the inlining is still needed and I believe you cannot make the function body private when we do that.

kerams commented 1 year ago

Yep, without inline Fable cannot insert the type object, and with inline the extracted method has to be public. I chose not to call it something like buildProxyInternal, so that it does not stand out in Intellisense. I thought it was a small price to pay for potentially reducing duplication in the bundle.

Zaid-Ajaj commented 1 year ago

Published as of Fable.Remoting.Client v7.22