Open mands opened 9 years ago
I just tried to reproduce with 'a = int
and without the postState
and tags
fields, and it worked correctly. What do you instantiate 'a
as, and what do the types PostState
and Tag
look like? The problem is probably in one of those.
Thanks for looking. So PostState
and Tag
are simple discrimiated unions as below,
type PostState = Processing | Ready | Disabled | Flagged | Deleted
type Tag =
| Tag of string
| Author of string
| Group of string
'a
is a more complex nested type that is itself parametersied depending on whether it is running on the client or server. I've put together a small test case and will narrow down the fields in 'a
in order to narrow down the type that is causing the problem and get back to you. Thanks.
Can you still reproduce this issue with 3.0.46-rc1?
I've been building a site using UI.Next on the client only along with client-server RPC. Over the past few weeks I've been updating it to the latest WebSharper 3 alpha and it's been quite painless.
Unfortunately the update from 3.0.26-alpha to 3.0.36-alpha seems to have broken RPC for a single type. All other types can be serialised fine, however this type returns
null
and crashes on the client-side withundefined
for any member accesses. The type is a simple record representing something similar to a blog post that is instantiated with another concrete record before passing to the client side.I noticed once during WebSharper compilation that several warnings were shown simlar to 'JSON Schema error from System.String[]' which may be related but I cannot reproduce that. For now I've reverted to 3.0.26-alpha but any help would be appreciated.
Thanks.