salesforce / proto-backwards-compat-maven-plugin

A Maven plugin for protecting against backwards incompatible changes to your gRPC .proto files.
BSD 3-Clause "New" or "Revised" License
13 stars 11 forks source link

Problem running 1.0.6 and 1.0.7 with proto.lock checked in. #31

Open lastcmaster opened 3 years ago

lastcmaster commented 3 years ago

When running the plugin 1.0.6 or 1.0.7, I get the following error on proto.lock when stored with version control:

[INFO] --- proto-backwards-compatibility:1.0.7:backwards-compatibility-check (default) @ jcute-serdoc --- [INFO] protolock cmd line: /Users/glz/projects/depot/common/jcute/4.2/main/jcute-serdoc/target/protolock-bin/protolock status --lockdir=/Users/glz/projects/depot/common/jcute/4.2/main/jcute-serdoc/src/main/proto --protoroot=/Users/glz/projects/depot/common/jcute/4.2/main/jcute-serdoc/src/main/proto debug [INFO] protolock cmd line: /Users/glz/projects/depot/common/jcute/4.2/main/jcute-serdoc/target/protolock-bin/protolock commit --lockdir=/Users/glz/projects/depot/common/jcute/4.2/main/jcute-serdoc/src/main/proto --protoroot=/Users/glz/projects/depot/common/jcute/4.2/main/jcute-serdoc/src/main/proto debug [INFO] open /Users/glz/projects/depot/common/jcute/4.2/main/jcute-serdoc/src/main/proto/proto.lock: permission denied

When the change is committed, the file is set to read only and in 1.0.6 the flow was changed to always force a protolock commit while 1.0.5 only ran the status command

[INFO] --- proto-backwards-compatibility:1.0.5:backwards-compatibility-check (default) @ jcute-serdoc --- [INFO] Backwards compatibility check passed.

So the proto.lock file must always be checked out for a build but that collides with the need to have all files checked in for a released build.

We need a flag or option to only run the status check fo released builds.

rmichela commented 3 years ago

What version control system are you using that requires files to be preemptively checked out to be opened RW, even if there are no modifications?

lastcmaster commented 3 years ago

Perforce

lastcmaster commented 2 years ago

Patch to fix perforce compatibility with no change in function for git users. p4compat.patch.gz

rmichela commented 2 years ago

Thank you! Is it possible to submit this as a PR?

lastcmaster commented 2 years ago

PR sent.