Skip to content

Conversation

@webwarrior-ws
Copy link
Contributor

Fixes #87
Made ILightningSerializable<'T>.Deserialize method return
deserialized object instead of mutating this instance.
Removed mutable modifier from all record fields in message types.

Made ILightningSerializable<'T>.Serialize method return
deserialized object instead of mutating `this` instance.
Removed `mutable` modifier from all record fields
Added DummyInstanceHolder class for holding
ILightningSerializable<'T> instances used for deserialization.
Added comment describing why this workaround as well as
[<CLIMutable>] annotations on records are needed.
Copy link
Owner

@joemphilips joemphilips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LGTM. Interesting hack.
You are correct that all these mess in deserialization is caused by the lack of static abstract members. But probably we cannot use it in the future even after F#7 gets stable, for the backward compatibility reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deserialize method should not return unit

2 participants