v1.32.0
版本发布时间: 2024-05-17 01:13:52
bufbuild/buf最新发布版本:v1.35.1(2024-07-25 04:29:59)
This release contains the (completely backwards-compatible) next generation of the Buf CLI. The Buf CLI and its associated configuration have been completely overhauled to support monorepos as first-class citizens. We'd call it a v2 of buf, but it's not. Buf is enterprise-grade software, and we want you to be minimally impacted. The v1.32.0
release of buf introduces v2
config formats for both buf.yaml
and buf.gen.yaml
. All your current commands and v1
configuration continue to work, so you can upgrade to v2
configuration when appropriate.
To read more about what's new, check out our blog and our docs:
- Introducing the next generation of the Buf CLI: still v1 and backwards-compatible
- Introducing the newly improved BSR UI and buf push experience
- Migrate to v2 configuration files
- Add version
v2
forbuf.yaml
andbuf.gen.yaml
configuration files. - Add
buf config migrate
to migrate configuration files to the latest version (nowv2
). - Move
buf mod init
tobuf config init
.buf mod init
is now deprecated. - Move
buf mod ls-lint-rules
tobuf config ls-lint-rules
.buf mod ls-lint-rules
is now deprecated. - Move
buf mod ls-breaking-rules
tobuf config ls-breaking-rules
.buf mod ls-breaking-rules
is now deprecated. - Move
buf mod prune
tobuf dep prune
.buf mod prune
is now deprecated. - Move
buf mod update
tobuf dep update
.buf mod update
is now deprecated. - Move
buf mod {clear-cache,cc}
tobuf registry cc
.buf mod {clear-cache,cc}
is now deprecated. - Move
buf beta graph
to stable asbuf dep graph
. - Change the default visibility of
buf push --create-visibility
toprivate
when the--create
flag is set. Users are no longer required to set--create-visibility
when runningbuf push --create
. - Add
buf push --label
, which allows users to set labels when pushing new commits to the BSR. - Add
buf push --source-control-url
, which allows users to associate commits pushed to the BSR with a URL to a source code repository. - Add
buf push --create-default-label
, which allows users to set a default label for a repository when callingbuf push --create
. - Add
buf push --git-metadata
, which automatically sets appropriate--label
,--source-control-url
, and--create-default-label
flags based on the current Git repository. - Add
buf convert --validate
to apply protovalidate rules to incoming messages specified with--from
. - Deprecate
buf mod open
. - Delete
buf beta migrate-v1beta1
This is now replaced withbuf config migrate
. - Add
buf registry sdk version
to get the version of a Generated SDK for a module and plugin. - Add
buf beta registry archive
andbuf beta registry unarchive
commands for archiving and unarchiving labels on the BSR. - Add support for Protobuf Editions. This allows
buf
to be used with sources that use edition 2023, instead of proto2 or proto3 syntax. This also updates theprotoc-gen-buf-breaking
andprotoc-gen-buf-lint
Protobuf plugins to support files that use edition 2023. - Update
buf breaking
rules to work with Protobuf Editions. To support Editions, some rules have been deprecated and replaced with Editions-aware rules. All deprecated rules continue to work for existing users.-
FIELD_SAME_CTYPE
has been replaced withFIELD_SAME_CPP_STRING_TYPE
, which considers bothctype
field options and new(pb.cpp).string_type
features when deciding on backwards compatibility. -
FIELD_SAME_LABEL
has been replaced with three rules that all check "cardinality". The new rules can distinguish between maps and other repeated fields and between implicit and explicit field presence. The new rules are:-
FIELD_SAME_CARDINALITY
in theFILE
andPACKAGE
categories. -
FIELD_WIRE_COMPATIBLE_CARDINALITY
in theWIRE
category. -
FIELD_WIRE_JSON_COMPATIBLE_CARDINALITY
in theWIRE_JSON
category.
-
-
FILE_SAME_JAVA_STRING_CHECK_UTF8
has been replaced withFIELD_SAME_JAVA_UTF8_VALIDATION
, which considers both thejava_string_check_utf8
file option and(pb.java).utf8_validation
features when deciding on backwards compatibility. - Add to the existing
FILE_SAME_SYNTAX
rule with a few related rules that can catch the same sort of compatibility issues, but in an Editions source file that changes feature values:-
MESSAGE_SAME_JSON_FORMAT
andENUM_SAME_JSON_FORMAT
catch changes to thejson_format
feature, which controls whether support for the JSON format is best-effort or properly supported. When supported, the compiler performs more checks relating to field name collisions for the JSON format as well as for FieldMask usage. -
FIELD_SAME_UTF8_VALIDATION
catches changes to theutf8_validation
feature, which controls validation of string values. -
ENUM_SAME_TYPE
catches changes to an enum's type, open vs. closed.
-
-
- Add support for extensions to
buf breaking
. All existing rules for fields are now applied to extensions, except forFIELD_NO_DELETE
(and its variants). There are also newEXTENSION_NO_DELETE
andPACKAGE_EXTENSION_NO_DELETE
rules for catching deletions of an extension. The new rules are not active by default in existingv1
andv1beta1
configurations, for backwards-compatibility reasons. Migrate your config tov2
to use them. - Add support for top-level extensions to
buf lint
. It previously only checked extensions that were defined inside of messages. - Add a new
FIELD_NOT_REQUIRED
lint rule that prevents use of required in proto2 files and offeatures.field_presence = LEGACY_REQUIRED
in Editions files. This new rule is not active by default in existingv1
andv1beta1
configurations, for backwards-compatibility reasons. Migrate your config tov2
to use them.
1、 buf-Darwin-arm64 34.99MB
2、 buf-Darwin-arm64.tar.gz 20.36MB
3、 buf-Darwin-x86_64 35.85MB
4、 buf-Darwin-x86_64.tar.gz 21.52MB
5、 buf-Linux-aarch64 33.69MB
6、 buf-Linux-aarch64.tar.gz 19.21MB
7、 buf-Linux-x86_64 34.75MB
8、 buf-Linux-x86_64.tar.gz 20.87MB
9、 buf-Windows-arm64.exe 34.23MB
10、 buf-Windows-x86_64.exe 35.81MB
11、 protoc-gen-buf-breaking-Darwin-arm64 18.76MB
12、 protoc-gen-buf-breaking-Darwin-x86_64 19.32MB
13、 protoc-gen-buf-breaking-Linux-aarch64 18.06MB
14、 protoc-gen-buf-breaking-Linux-x86_64 18.69MB
15、 protoc-gen-buf-breaking-Windows-arm64.exe 18.34MB
16、 protoc-gen-buf-breaking-Windows-x86_64.exe 19.3MB
17、 protoc-gen-buf-lint-Darwin-arm64 12.54MB
18、 protoc-gen-buf-lint-Darwin-x86_64 12.76MB
19、 protoc-gen-buf-lint-Linux-aarch64 12.06MB
20、 protoc-gen-buf-lint-Linux-x86_64 12.28MB
21、 protoc-gen-buf-lint-Windows-arm64.exe 12.24MB
22、 protoc-gen-buf-lint-Windows-x86_64.exe 12.73MB
23、 sha256.txt 2.06KB
24、 sha256.txt.minisig 302B