You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CIP25 for example uses CDDL to specify a set of keys that can be present, but allows people to extend the base specification with whichever key they need. This doesn't work with the current generated code as a UnknownKey error will be thrown. There should be a way to avoid this error either by
changing the cddl definition (adding * any => any as a key in the map)
having some way in cddl-codegen to specify not to generate an error for this specific type.
If we have to do (2), it may be that we finally have to implement some DSL that parses comment blocks to get information about how to generate the code for a specific type (which would help with #44 anyway)
Here is JS code that reproduces the error, but you could easily write a Rust test for the same thing
CIP25 for example uses CDDL to specify a set of keys that can be present, but allows people to extend the base specification with whichever key they need. This doesn't work with the current generated code as a
UnknownKey
error will be thrown. There should be a way to avoid this error either by* any => any
as a key in the map)If we have to do (2), it may be that we finally have to implement some DSL that parses comment blocks to get information about how to generate the code for a specific type (which would help with #44 anyway)
Here is JS code that reproduces the error, but you could easily write a Rust test for the same thing
The text was updated successfully, but these errors were encountered: