Releases: nilslice/protolock
New --ignore CLI flag
Thanks to @noel-yap for contributing this feature! To use, pass the --ignore
flag to the CLI along with a comma-separated list of paths.
i.e. protolock init --ignore=build,lib,vendor/protos
This example will ignore any proto included in the build
, lib
, or vendor/protos
paths.
note: make sure to --ignore
the same paths/files in successive invocations of protolock status
.
For more granular support, use a comment hint:
// @protolock:skip
message Foo {
string bar = 1;
int64 baz = 42;
}
Oneof support and more specific binary release names
Thanks to @mmmveggies for helping get oneofs implemented, and @noel-yap for continued improvements to the release process. Much appreciated all around!
Better release binaries
Includes PR from @noel-yap with improved naming of the binaries for quickly knowing if there is support for your machine's architecture. Also, the release script itself has been improved to be more extensible. Thanks, @noel-yap!
Note: the change from macos
-> darwin
, incase binaries were being downloaded programmatically.
Add support for Map types
Bugfix
Comment hints for parser + bugfix
As requested (here: envoyproxy/envoy#3368) hints can be added to your .proto files in the form of comments to tell protolock
that a specific behavior should be followed. Currently, only a single hint is supported: // @protolock:skip
which informs the parse step to exclude the message or service from the proto.lock
file.
The bugfix resolves an issue with nested messages causing false conflicts.
Please continue to report issues or unexpected behavior. Thank you!
OS-agnostic lock file
See issue: #10
Version 0.2.0
contains breaking changes, in that an existing proto.lock
files will not work across unix- vs. windows-like file systems, as the code for version 0.1.0
or prior would write an OS-specific filepath to the lock file.
Old lock files should still work on the same OS they were created in combination with a pre-0.2.0
release of protolock
. But, it is advised to download the latest version of protolock
and run protolock commit
, which will overwrite the lock file using OS-agnostic file paths (i.e. :/:
instead of /
or \
),
Initial release
protolock
will help maintain API compatibility between services using protocol buffers. By enforcing a set of common rules, you and your team can be relieved of mistakes made when modifying .proto messages and services.
Rules Enforced
- No Using Reserved Fields
- No Removing Reserved Fields
- No Changing Field IDs
- No Changing Field Types
- No Changing Field Names
- No Removing Fields Without Reserve
- No Removing RPCs
- No Changing RPC Signature
As mentioned in https://github.com/nilslice/protolock/issues, support for enum
and oneof
primitives is missing, but coming in a future release.
Pre-built binaries are linked to this release, for linux, macOS, and Windows.
Please report any issues or unexpected behavior encountered. Thank you!