nilslice / protolock

Protocol Buffer companion tool. Track your .proto files and prevent changes to messages and services which impact API compatibility.
https://protolock.dev
BSD 3-Clause "New" or "Revised" License
600 stars 36 forks source link

Enum aliases not supported #127

Open rodaine opened 4 years ago

rodaine commented 4 years ago

Using protolock v0.15.0, with the following proto:

syntax="proto3";

enum Foo {
  BAR = 0;
  BAZ = 1;
}

After committing the lockfile, and making the following (backwards compatible) changes:

syntax="proto3";

enum Foo {
  option allow_alias = true;
  BAR = 0;
  BAZ = 1;
  QUUX = 1;
}

Running protolock status, we get the following error:

→ protolock status
CONFLICT: "Foo" field: "QUUX" integer: 1 has an updated name, previously "BAZ" [foo.proto]
rodaine commented 4 years ago

For details on enum aliasing: https://developers.google.com/protocol-buffers/docs/proto3#enum

nilslice commented 4 years ago

thanks for reporting, I will take a look asap. turns out I configured github to stop notifying me for all repos? oops.

nilslice commented 4 years ago

quick update -- I haven't had a chance to really dig in here.. if anyone else feels like they want to give it a shot, please do!

adding the help wanted label