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

Added configuration parameter lockDir to specify where proto.lock lives #16

Closed seime closed 5 years ago

seime commented 5 years ago

Passing <option>--lockdir=somewhere_else</option> does not work, the plugin always checks the proto root directory for proto.lock .

This PR adds a new configuration parameter lockDir

salesforce-cla[bot] commented 5 years ago

Thanks for the contribution! Before we can merge this, we need @seime to sign the Salesforce.com Contributor License Agreement.

seime commented 5 years ago

I'm curious, what prompted the need for this change?

We generate some proto descriptors from xml schema, and as with all generated sources/resources we place them in the (maven) target folder before packaging and deploying them as jar files.

The plugin was hardcoded to always look for proto.lock inside the proto source folder, and if not found it would just renitialize a new proto.lock there each time. Even if --lockdir would be specified the maven plugin wouldn't honour that and just renitialize a new proto.lock inside the temp folder. This caused changes silently to be accepted (except for a log statement saying that it was initialized)

rmichela commented 3 years ago

Released in 1.0.6