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

Deterministic definition order. #110

Closed thespags closed 5 years ago

thespags commented 5 years ago

For readability it would be nice if the proto paths would sorted alphabetically

{
  "definitions": [
    {
      "protopath": "fub:/:baz:/:some_proto.proto",
     ....
    },
   {
      "protopath": "other:/:foo:/:other_proto.proto",
   {
  ]
}
nilslice commented 5 years ago

Hey @thespags -

Are you on the latest version? I believe this was introduced a couple releases ago.

thespags commented 5 years ago

Let me upgrade the version and try it out. I'll update and close if that's the fix. Thanks!

rmichela commented 5 years ago

I upgraded the maven protolock plugin to use 0.12.0. https://github.com/salesforce/proto-backwards-compat-maven-plugin/pull/4

thespags commented 5 years ago

After upgrading to 0.12.0 we are seeing deterministic ordering based on the name. Looks good thanks!