New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 697605 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 15
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

mojom does not consider MinVersion when declared in enum

Project Member Reported by khmel@chromium.org, Mar 1 2017

Issue description

When 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.

 
Components: -Internals>Mojo Internals>Mojo>Bindings
Do 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!

Comment 2 by khmel@chromium.org, 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.
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.

Comment 4 by khmel@chromium.org, Mar 1 2017

Great, thank you for explanations! Please feel free to update this bug way you think.
Status: WontFix (was: Untriaged)
Closing based on the discussion.

Sign in to add a comment