Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions editions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,24 @@ cc_proto_library(
deps = [":test_editions_2024_default_features_proto"],
)

proto_library(
name = "test_editions_2026_default_features_proto",
testonly = True,
srcs = ["input/test_editions_2026_default_features.proto"],
)

cc_proto_library(
name = "test_editions_2026_default_features_cc_proto",
testonly = True,
deps = [":test_editions_2026_default_features_proto"],
)

cc_test(
name = "generated_files_test",
srcs = ["generated_files_test.cc"],
deps = [
":test_editions_2024_default_features_cc_proto",
":test_editions_2026_default_features_cc_proto",
":test_editions_default_features_cc_proto",
":test_messages_proto2_editions_cc_proto",
":test_messages_proto3_editions_cc_proto",
Expand Down
24 changes: 24 additions & 0 deletions editions/input/test_editions_2026_default_features.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
edition = "2026";

package protobuf_editions_test;

// This file tests the default Edition2024 features in the absence of any
// dependencies.

enum Editions2026DefaultEnum {
EDITIONS2026_DEFAULT_ENUM_UNKNOWN = 0;
EDITIONS2026_DEFAULT_ENUM_VALUE1 = 1;
}

message Editions2026DefaultMessage {
int32 int32_field = 1;
string string_field = 2;
Editions2026DefaultEnum enum_field = 3;

repeated int32 repeated_int32_field = 4;

message SubMessage {
int32 nested_int32_field = 1;
}
SubMessage sub_message_field = 6;
}
2 changes: 1 addition & 1 deletion src/google/protobuf/compiler/code_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ constexpr auto ProtocMaximumEdition() { return Edition::EDITION_2024; }
// The maximum edition known to protoc, which may or may not be officially
// supported yet. During development of a new edition, this will typically be
// set to that.
constexpr auto MaximumKnownEdition() { return Edition::EDITION_2024; }
constexpr auto MaximumKnownEdition() { return Edition::EDITION_2026; }

// CodeGenerators generate one or more files in a given directory. This
// abstract interface represents the directory to which the CodeGenerator is
Expand Down
2 changes: 1 addition & 1 deletion src/google/protobuf/compiler/java/java_features.pb.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/google/protobuf/cpp_features.pb.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading