The best way of working with Protocol Buffers.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by amckinney over 3 years ago
buf beta registry tag {create,list}
commands.push
via buf beta push -t
.buf lint
and buf breaking
.Published by bufdev over 3 years ago
Published by johanbrandhorst over 3 years ago
buf beta push
doesn't create a new commit if the content of the push is the same as the latest commit on the branch.buf protoc
would error if a plugin returned an empty error string.Published by bufdev over 3 years ago
protoc
version for compatibility to 3.15.2. The --experimental_allow_proto3_optional
flag is no longer set for versions >=3.15.go_package
values for the Well-Known Types now point at google.golang.org/protobuf instead of github.com/golang/protobuf.Published by bufdev over 3 years ago
Published by bufdev over 3 years ago
Published by amckinney almost 4 years ago
Allows comment ignores of the form // buf:lint:ignore ID
to be cascaded upwards for specific rules.
ENUM_VALUE_PREFIX, ENUM_VALUE_UPPER_SNAKE_CASE
, both the enum value and the enum are checked.FIELD_LOWER_SNAKE_CASE, FIELD_NO_DESCRIPTOR
, both the field and message are checked.ONEOF_LOWER_SNAKE_CASE
, both the oneof and message are checked.RPC_NO_CLIENT_STREAMING, RPC_NO_SERVER_STREAMING, RPC_PASCAL_CASE, RPC_REQUEST_RESPONSE_UNIQUE
, both the method and service are checked.RPC_REQUEST_STANDARD_NAME, RPC_RESPONSE_STANDARD_NAME
, the input/output type, method, and service are checked.Published by johanbrandhorst almost 4 years ago
Published by bufdev almost 4 years ago
opt
in buf.gen.yaml
files to be either a single string, or a list of strings. Both of the following forms are accepted, and result in foo=bar,baz,bat
:version: v1beta1
plugins:
- name: foo
out: out
opt: foo=bar,baz,bat
version: v1beta1
plugins:
- name: foo
out: out
opt:
- foo=bar
- baz
- bat
Published by bufdev almost 4 years ago
buf check lint
to buf lint
.buf check breaking
to buf breaking
.buf check ls-lint-checkers
to buf config ls-lint-rules
.buf check ls-breaking-checkers
to buf config ls-breaking-rules
.protoc-gen-buf-check-lint
to protoc-gen-buf-lint
.protoc-gen-buf-check-breaking
to protoc-gen-buf-breaking
.buf beta config init
.All previous commands continue to work in a backwards-compatible manner, and the previous protoc-gen-buf-check-lint
and protoc-gen-buf-check-breaking
binaries continue to be available at the same paths, however deprecation messages are printed.
Published by bufdev almost 4 years ago
strategy
option to buf.gen.yaml
generation configuration. This allows selecting either plugin invocations with files on a per-directory basis, or plugin invocations with all files at once. See the generation documentation for more details.Published by bufdev almost 4 years ago
SourceCodeInfo
for map fields within nested messages could be dropped.breaking.ignore_unstable_packages = true
.Published by bufdev almost 4 years ago
buf
commands.breaking.ignore_unstable_packages
option to allow ignoring of unstable packages when running buf check breaking
. See the documentation for more details.allow_alias
option that add new aliases to a given number will no longer be considered breaking by ENUM_VALUE_SAME_NAME
. See the documentation for more details.Published by bufdev almost 4 years ago
--experimental_allow_proto3_optional
was not set when proxying to protoc
for the builtin plugins via buf generate
or buf protoc
. This flag is now set for protoc
versions >= 3.12.Published by bufdev almost 4 years ago
--file
flag to --path
and allow --path
to take both files and directories, instead of just files with the old --file
. This flag is used to filter the actual Protobuf files built under an input for most commands. You can now do for example buf generate --path proto/foo
to only generate stubs for the files under proto/foo
. Note that the --file
flag continues to work, but prints a deprecation message.Published by bufdev almost 4 years ago
buf generate
.Published by bufdev almost 4 years ago
git://
protocol handling.Published by bufdev almost 4 years ago
As we work towards v1.0, we are cleaning up the CLI UX. As part of this, we made the following changes:
buf image build
has been moved to buf build
and now accepts images as inputs.buf beta image convert
has been deleted, as buf build
now covers this functionality.-o
flag is no longer required for buf build
, instead defaulting to the OS equivalent of /dev/null
.--source
flag on buf build
has been deprecated in favor of passing the input as the first argument.--source-config
flag on buf build
has been moved to --config
.--input
flag on buf check lint
has been deprecated in favor of passing the input as the first argument.--input-config
flag on buf check lint
has been moved to --config
.--input
flag on buf check breaking
has been deprecated in favor of passing the input as the first argument.--input-config
flag on buf check breaking
has been moved to --config
.--against-input
flag on buf check breaking
has been moved to --against
.--against-input-config
flag on buf check breaking
has been moved to --against-config
.--input
flag on buf generate
has been deprecated in favor of passing the input as the first argument.--input-config
flag on buf generate
has been moved to --config
.--input
flag on buf ls-files
has been deprecated in favor of passing the input as the first argument.--input-config
flag on buf ls-files
has been moved to --config
.We feel these changes make using buf
more natural. Examples:
# compile the files in the current directory
buf build
# equivalent to the default no-arg invocation
buf build .
# build the repository at https://github.com/foo/bar.git
buf build https://github.com/foo/bar.git
# lint the files in the proto directory
buf check lint proto
# check the files in the current directory against the files on the master branch for breaking changes
buf check breaking --against .git#branch=master
# check the files in the proto directory against the files in the proto directory on the master branch
buf check breaking proto --against .git#branch=master,subdir=proto
Note that existing commands and flags continue to work. While the deprecation messages will be printed, and we recommend migrating to the new invocations, your existing invocations have no change in functionality.
Published by bufdev almost 4 years ago
subdir
option for archive and git Inputs. This allows placement of the buf.yaml
configuration file in directories other than the base of your repository. You then can check against this subdirectory using, for example, buf check breaking --against-input https://github.com/foo/bar.git#subdir=proto
.Published by bufdev about 4 years ago
buf help generate
documentation.