mojom does not consider MinVersion when declared in enum |
||
Issue descriptionWhen I add new enum value prefixed with [MinVersion = N] compiled code contains old version. As workaround I can add dummy method to force doing this: [MinVersion = N] void Dummy(); Only in last case version is updated. It would be nice if adding only enum value should be also sufficient for uprev.
,
Mar 1 2017
I used second case you described. Real example is here: https://codereview.chromium.org/2723263003/diff/60001/components/arc/common/auth.mojom This is not blocker for us and we can handle this acceptable way.
,
Mar 1 2017
Thanks for the info, Yury! Btw, in case you didn't notice, [MinVersion] doesn't really have any effect on enums, except for documentation purposes. For enum versioning, the attribute [Extensible] is the only thing that matters.
,
Mar 1 2017
Great, thank you for explanations! Please feel free to update this bug way you think.
,
Nov 15
Closing based on the discussion. |
||
►
Sign in to add a comment |
||
Comment 1 by yzshen@chromium.org
, Mar 1 2017Do you mean adding new values to an enum nested in an interface like this: interface Foo { [Extensible] enum Bar { v0, [MinVersion=1]v1 }; SendBar(Bar bar); }; The enum is currently considered as a separate type, so it won't affect the interface's versioning. It is similar to: [Extensible] enum Foo_Bar { v0, [MinVersion=1]v1 }; interface Foo { SendBar(Foo_Bar bar); }; Does it affect your use case in any significant way? I would be happy to learn about. Thanks!