-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: test serde stability in types #295
base: main
Are you sure you want to change the base?
Conversation
Structures that are marked with WARNING are tested for stability when serialized to JSON and CBOR formats.
] | ||
} | ||
}, | ||
"_phantom": null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we have now this in our format. Removing it breaks both JSON and CBOR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! This would also be great to do for protocol messages s.t. we know when we need to push a new protocol version.
The question whether we want to switch to protobuf there. In that case, this would be lost effort. For types stored in the database though this is important. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Converted to draft because I want to cover all types that implement serde in types. |
We decided not to switch to protobuf. So, this concern is obsolete now. |
@boxdot Do you mind if I ask why you decided not to switch to protobuf there? |
The main reason is that many types originate from the OpenMLS implementation and are serialized using the TLS codec. So, if we were to use Protobuf, it would essentially be a thin wrapper containing binary blobs of MLS types. Mixing TLS encoding (TLS codec) with Protobuf in this way feels odd. |
Structures that are marked with WARNING are tested for stability when serialized to JSON and CBOR formats.