Skip to content

Commit a74c0e3

Browse files
committed
Update built-in well-known types/protoc version
1 parent 594d1da commit a74c0e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3165
-2147
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [Unreleased]
44

55
- Promote `buf beta stats` to `buf stats`.
6+
- Update built-in Well-Known Types to Protobuf v31.1.
67

78
## [v1.54.0] - 2025-05-12
89

data/template/buf.go.gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
- module: buf.build/grpc/grpc
1818
types:
1919
- grpc.reflection.v1.ServerReflection
20-
- module: buf.build/protocolbuffers/wellknowntypes:v29.3
20+
- module: buf.build/protocolbuffers/wellknowntypes:v31.1
2121
paths:
2222
- google/protobuf/cpp_features.proto
2323
- google/protobuf/java_features.proto

make/go/dep_buf.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ $(call _assert_var,CACHE_VERSIONS)
77
$(call _assert_var,CACHE_BIN)
88

99
# Settable
10-
# https://github.com/bufbuild/buf/releases 20250408 checked 20250408
11-
BUF_VERSION ?= v1.52.1
10+
# https://github.com/bufbuild/buf/releases 20250512 checked 20250512
11+
BUF_VERSION ?= v1.54.0
1212
# Settable
1313
#
1414
# If set, this path will be installed every time someone depends on $(BUF)

make/go/dep_protoc.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ $(call _assert_var,CACHE_INCLUDE)
1010
$(call _assert_var,CACHE_BIN)
1111

1212
# Settable
13-
# https://github.com/protocolbuffers/protobuf/releases 20250326 checked 20250401
13+
# https://github.com/protocolbuffers/protobuf/releases 20250528 checked 20250603
1414
# NOTE: Set to version compatible with genproto source code (only used in tests).
15-
PROTOC_VERSION ?= 30.2
15+
PROTOC_VERSION ?= 31.1
1616

1717
# Google adds a dash to release candidate versions in the name of the
1818
# release artifact, i.e. v27.0-rc1 -> v27.0-rc-1

make/go/docker.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ DOCKER_BUILD_EXTRA_FLAGS ?=
2121
dockerbuild::
2222

2323
define dockerbinfunc
24+
# Settable
25+
$(1)_DOCKER_BUILD_EXTRA_FLAGS ?=
26+
2427
.PHONY: dockerbuilddeps$(1)
2528
dockerbuilddeps$(1)::
2629

2730
.PHONY: dockerbuild$(1)
2831
dockerbuild$(1): dockerbuilddeps$(1)
29-
docker build $(DOCKER_BUILD_EXTRA_FLAGS) -t $(DOCKER_ORG)/$(1):latest -f Dockerfile.$(1) .
32+
docker build $(DOCKER_BUILD_EXTRA_FLAGS) $($(1)_DOCKER_BUILD_EXTRA_FLAGS) -t $(DOCKER_ORG)/$(1):latest -f Dockerfile.$(1) .
3033
ifdef EXTRA_DOCKER_ORG
3134
docker tag $(DOCKER_ORG)/$(1):latest $(EXTRA_DOCKER_ORG)/$(1):latest
3235
endif

private/buf/bufprotopluginexec/bufprotopluginexec.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ const (
4040
// defaultMajorVersion is the default major version.
4141
defaultMajorVersion = 6
4242
// defaultMinorVersion is the default minor version.
43-
defaultMinorVersion = 30
43+
defaultMinorVersion = 31
4444
// defaultPatchVersion is the default patch version.
45-
defaultPatchVersion = 2
45+
defaultPatchVersion = 1
4646
// defaultSuffixVersion is the default suffix version.
4747
defaultSuffixVersion = ""
4848
)

private/bufpkg/bufimage/bufimageutil/testdata/any/c1.txtar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,22 @@ message FeatureSet {
109109
targets = TARGET_TYPE_SERVICE,
110110
targets = TARGET_TYPE_METHOD
111111
];
112+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
113+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
114+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
115+
feature_support = { edition_introduced: EDITION_2024 },
116+
retention = RETENTION_SOURCE,
117+
targets = TARGET_TYPE_FILE
118+
];
119+
message VisibilityFeature {
120+
enum DefaultSymbolVisibility {
121+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
122+
EXPORT_ALL = 1;
123+
EXPORT_TOP_LEVEL = 2;
124+
LOCAL_ALL = 3;
125+
STRICT = 4;
126+
}
127+
}
112128
enum EnforceNamingStyle {
113129
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
114130
STYLE2024 = 1;

private/bufpkg/bufimage/bufimageutil/testdata/any/c2.txtar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,22 @@ message FeatureSet {
114114
targets = TARGET_TYPE_SERVICE,
115115
targets = TARGET_TYPE_METHOD
116116
];
117+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
118+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
119+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
120+
feature_support = { edition_introduced: EDITION_2024 },
121+
retention = RETENTION_SOURCE,
122+
targets = TARGET_TYPE_FILE
123+
];
124+
message VisibilityFeature {
125+
enum DefaultSymbolVisibility {
126+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
127+
EXPORT_ALL = 1;
128+
EXPORT_TOP_LEVEL = 2;
129+
LOCAL_ALL = 3;
130+
STRICT = 4;
131+
}
132+
}
117133
enum EnforceNamingStyle {
118134
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
119135
STYLE2024 = 1;

private/bufpkg/bufimage/bufimageutil/testdata/any/c3.txtar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,22 @@ message FeatureSet {
119119
targets = TARGET_TYPE_SERVICE,
120120
targets = TARGET_TYPE_METHOD
121121
];
122+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
123+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
124+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
125+
feature_support = { edition_introduced: EDITION_2024 },
126+
retention = RETENTION_SOURCE,
127+
targets = TARGET_TYPE_FILE
128+
];
129+
message VisibilityFeature {
130+
enum DefaultSymbolVisibility {
131+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
132+
EXPORT_ALL = 1;
133+
EXPORT_TOP_LEVEL = 2;
134+
LOCAL_ALL = 3;
135+
STRICT = 4;
136+
}
137+
}
122138
enum EnforceNamingStyle {
123139
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
124140
STYLE2024 = 1;

private/bufpkg/bufimage/bufimageutil/testdata/any/c4.txtar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,22 @@ message FeatureSet {
132132
targets = TARGET_TYPE_SERVICE,
133133
targets = TARGET_TYPE_METHOD
134134
];
135+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
136+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
137+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
138+
feature_support = { edition_introduced: EDITION_2024 },
139+
retention = RETENTION_SOURCE,
140+
targets = TARGET_TYPE_FILE
141+
];
142+
message VisibilityFeature {
143+
enum DefaultSymbolVisibility {
144+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
145+
EXPORT_ALL = 1;
146+
EXPORT_TOP_LEVEL = 2;
147+
LOCAL_ALL = 3;
148+
STRICT = 4;
149+
}
150+
}
135151
enum EnforceNamingStyle {
136152
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
137153
STYLE2024 = 1;

private/bufpkg/bufimage/bufimageutil/testdata/any/d.txtar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,22 @@ message FeatureSet {
109109
targets = TARGET_TYPE_SERVICE,
110110
targets = TARGET_TYPE_METHOD
111111
];
112+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
113+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
114+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
115+
feature_support = { edition_introduced: EDITION_2024 },
116+
retention = RETENTION_SOURCE,
117+
targets = TARGET_TYPE_FILE
118+
];
119+
message VisibilityFeature {
120+
enum DefaultSymbolVisibility {
121+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
122+
EXPORT_ALL = 1;
123+
EXPORT_TOP_LEVEL = 2;
124+
LOCAL_ALL = 3;
125+
STRICT = 4;
126+
}
127+
}
112128
enum EnforceNamingStyle {
113129
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
114130
STYLE2024 = 1;

private/bufpkg/bufimage/bufimageutil/testdata/any/e.txtar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,22 @@ message FeatureSet {
9999
targets = TARGET_TYPE_SERVICE,
100100
targets = TARGET_TYPE_METHOD
101101
];
102+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
103+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
104+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
105+
feature_support = { edition_introduced: EDITION_2024 },
106+
retention = RETENTION_SOURCE,
107+
targets = TARGET_TYPE_FILE
108+
];
109+
message VisibilityFeature {
110+
enum DefaultSymbolVisibility {
111+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
112+
EXPORT_ALL = 1;
113+
EXPORT_TOP_LEVEL = 2;
114+
LOCAL_ALL = 3;
115+
STRICT = 4;
116+
}
117+
}
102118
enum EnforceNamingStyle {
103119
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
104120
STYLE2024 = 1;

private/bufpkg/bufimage/bufimageutil/testdata/deps/test.EnumA.txtar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,22 @@ message FeatureSet {
128128
targets = TARGET_TYPE_SERVICE,
129129
targets = TARGET_TYPE_METHOD
130130
];
131+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
132+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
133+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
134+
feature_support = { edition_introduced: EDITION_2024 },
135+
retention = RETENTION_SOURCE,
136+
targets = TARGET_TYPE_FILE
137+
];
138+
message VisibilityFeature {
139+
enum DefaultSymbolVisibility {
140+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
141+
EXPORT_ALL = 1;
142+
EXPORT_TOP_LEVEL = 2;
143+
LOCAL_ALL = 3;
144+
STRICT = 4;
145+
}
146+
}
131147
enum EnforceNamingStyle {
132148
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
133149
STYLE2024 = 1;

private/bufpkg/bufimage/bufimageutil/testdata/deps/test.FieldA.txtar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,22 @@ message FeatureSet {
112112
targets = TARGET_TYPE_SERVICE,
113113
targets = TARGET_TYPE_METHOD
114114
];
115+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
116+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
117+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
118+
feature_support = { edition_introduced: EDITION_2024 },
119+
retention = RETENTION_SOURCE,
120+
targets = TARGET_TYPE_FILE
121+
];
122+
message VisibilityFeature {
123+
enum DefaultSymbolVisibility {
124+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
125+
EXPORT_ALL = 1;
126+
EXPORT_TOP_LEVEL = 2;
127+
LOCAL_ALL = 3;
128+
STRICT = 4;
129+
}
130+
}
115131
enum EnforceNamingStyle {
116132
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
117133
STYLE2024 = 1;

private/bufpkg/bufimage/bufimageutil/testdata/deps/test.IncludeWithExcludeExt.txtar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,22 @@ message FeatureSet {
7373
targets = TARGET_TYPE_SERVICE,
7474
targets = TARGET_TYPE_METHOD
7575
];
76+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
77+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
78+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
79+
feature_support = { edition_introduced: EDITION_2024 },
80+
retention = RETENTION_SOURCE,
81+
targets = TARGET_TYPE_FILE
82+
];
83+
message VisibilityFeature {
84+
enum DefaultSymbolVisibility {
85+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
86+
EXPORT_ALL = 1;
87+
EXPORT_TOP_LEVEL = 2;
88+
LOCAL_ALL = 3;
89+
STRICT = 4;
90+
}
91+
}
7692
enum EnforceNamingStyle {
7793
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
7894
STYLE2024 = 1;

private/bufpkg/bufimage/bufimageutil/testdata/deps/test.PublicOrder.txtar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,22 @@ message FeatureSet {
113113
targets = TARGET_TYPE_SERVICE,
114114
targets = TARGET_TYPE_METHOD
115115
];
116+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
117+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
118+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
119+
feature_support = { edition_introduced: EDITION_2024 },
120+
retention = RETENTION_SOURCE,
121+
targets = TARGET_TYPE_FILE
122+
];
123+
message VisibilityFeature {
124+
enum DefaultSymbolVisibility {
125+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
126+
EXPORT_ALL = 1;
127+
EXPORT_TOP_LEVEL = 2;
128+
LOCAL_ALL = 3;
129+
STRICT = 4;
130+
}
131+
}
116132
enum EnforceNamingStyle {
117133
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
118134
STYLE2024 = 1;

private/bufpkg/bufimage/bufimageutil/testdata/imports/bar.txtar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,22 @@ message FeatureSet {
8484
targets = TARGET_TYPE_SERVICE,
8585
targets = TARGET_TYPE_METHOD
8686
];
87+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
88+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
89+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
90+
feature_support = { edition_introduced: EDITION_2024 },
91+
retention = RETENTION_SOURCE,
92+
targets = TARGET_TYPE_FILE
93+
];
94+
message VisibilityFeature {
95+
enum DefaultSymbolVisibility {
96+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
97+
EXPORT_ALL = 1;
98+
EXPORT_TOP_LEVEL = 2;
99+
LOCAL_ALL = 3;
100+
STRICT = 4;
101+
}
102+
}
87103
enum EnforceNamingStyle {
88104
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
89105
STYLE2024 = 1;

private/bufpkg/bufimage/bufimageutil/testdata/imports/foo.txtar

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ message DescriptorProto {
3030
repeated OneofDescriptorProto oneof_decl = 8;
3131
repeated ReservedRange reserved_range = 9;
3232
repeated string reserved_name = 10;
33+
optional SymbolVisibility visibility = 11;
3334
message ExtensionRange {
3435
optional int32 start = 1;
3536
optional int32 end = 2;
@@ -46,6 +47,7 @@ message EnumDescriptorProto {
4647
optional EnumOptions options = 3;
4748
repeated EnumReservedRange reserved_range = 4;
4849
repeated string reserved_name = 5;
50+
optional SymbolVisibility visibility = 6;
4951
message EnumReservedRange {
5052
optional int32 start = 1;
5153
optional int32 end = 2;
@@ -157,6 +159,22 @@ message FeatureSet {
157159
targets = TARGET_TYPE_SERVICE,
158160
targets = TARGET_TYPE_METHOD
159161
];
162+
optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [
163+
edition_defaults = { value: "EXPORT_ALL", edition: EDITION_LEGACY },
164+
edition_defaults = { value: "EXPORT_TOP_LEVEL", edition: EDITION_2024 },
165+
feature_support = { edition_introduced: EDITION_2024 },
166+
retention = RETENTION_SOURCE,
167+
targets = TARGET_TYPE_FILE
168+
];
169+
message VisibilityFeature {
170+
enum DefaultSymbolVisibility {
171+
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
172+
EXPORT_ALL = 1;
173+
EXPORT_TOP_LEVEL = 2;
174+
LOCAL_ALL = 3;
175+
STRICT = 4;
176+
}
177+
}
160178
enum EnforceNamingStyle {
161179
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
162180
STYLE2024 = 1;
@@ -343,6 +361,7 @@ message FileDescriptorProto {
343361
repeated int32 weak_dependency = 11;
344362
optional string syntax = 12;
345363
optional Edition edition = 14;
364+
repeated string option_dependency = 15;
346365
}
347366
message FileDescriptorSet {
348367
repeated FileDescriptorProto file = 1;
@@ -495,6 +514,11 @@ enum Edition {
495514
EDITION_99999_TEST_ONLY = 99999;
496515
EDITION_MAX = 2147483647;
497516
}
517+
enum SymbolVisibility {
518+
VISIBILITY_UNSET = 0;
519+
VISIBILITY_LOCAL = 1;
520+
VISIBILITY_EXPORT = 2;
521+
}
498522
-- options.proto --
499523
syntax = "proto3";
500524
import "google/protobuf/descriptor.proto";

0 commit comments

Comments
 (0)