-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
73d28ec
to
9c5dc88
Compare
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 solid overall, but I have some questions.
-
How much is the module size increase when manually inlining nested enums and deriving serialization, vs. when using
forward
? -
I am not sure how it is ensured that the forward with
cis2
for example ensures thatrepr
isu8
. -
It would be good to have examples of how an error is manifested when generating the schema using
forward
, but when the inner type is not an enum. So we can document this error case that is not caught by the compiler.
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.
Ok, but if you can provide some data on the size difference (or lack thereof) that would be great.
For the wCCD example: the schema is unchanged in size when using forward attribute, but it should produce the exact same thing, so this is expected.
With |
Purpose
Related to Concordium/concordium-rust-smart-contracts#307.
Support
forward
attribute in derive macros forSerial
,Deserial
,DeserialWithState
andSchemaType
.Should be merged before Concordium/concordium-rust-smart-contracts#314
Checklist
hard-to-understand areas.