The best way of working with Protocol Buffers.
APACHE-2.0 License
Bot releases are hidden (Show)
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.Published by bufdev about 4 years ago
buf beta generate
out of beta to buf generate
. This command now uses a template of configured plugins to generate stubs. See buf help generate
for more details.Published by bufdev about 4 years ago
buf protoc
and buf beta generate
.Published by bufdev about 4 years ago
v1beta1
. See buf.build/docs/faq for more details.Published by bufdev about 4 years ago
protoc
version for buf protoc
to be 3.13.0
.Published by bufdev about 4 years ago
experimental
parent command to beta
. The command buf experimental image convert
continues to work, but is deprecated in favor of buf beta image convert
.buf beta generate
.Published by bufdev about 4 years ago
buf protoc
.Published by bufdev about 4 years ago
optional
fields in proto3 would cause the ONEOF_LOWER_SNAKE_CASE
lint checker to fail.Published by bufdev about 4 years ago