Require enum values to be specified in the API description
ia0 opened this issue · comments
Julien Cretin commented
Currently enums in the API description don't take values. Their values is simply defined by their order like in Rust. This is problematic because, contrary to Rust, those enums may be compiled with different versions between the platform and the applets. And it is very easy to inadvertently break the API by inserting a new enum variant anywhere else than the end of the list of variants.
This issue suggests to change the API description to always specify the enum value:
enum Foo {
Bar = 0,
Baz = 1,
}
This would then be obvious that changing the value is a breaking change.