Skip to content

Commit

Permalink
Add an EDITION_MAX enum value for plugins that will never need editio…
Browse files Browse the repository at this point in the history
…n-based changes

PiperOrigin-RevId: 586781244
  • Loading branch information
mkruskal-google authored and copybara-github committed Nov 30, 2023
1 parent 962135a commit f99c0bd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
15 changes: 8 additions & 7 deletions src/google/protobuf/descriptor.pb.cc

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

4 changes: 2 additions & 2 deletions src/google/protobuf/descriptor.pb.h

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

5 changes: 5 additions & 0 deletions src/google/protobuf/descriptor.proto
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ enum Edition {
EDITION_99997_TEST_ONLY = 99997;
EDITION_99998_TEST_ONLY = 99998;
EDITION_99999_TEST_ONLY = 99999;

// Placeholder for specifying unbounded edition support. This should only
// ever be used by plugins that can expect to never require any changes to
// support a new edition.
EDITION_MAX = 0x7FFFFFFF;
}

// Describes a complete .proto file.
Expand Down
2 changes: 1 addition & 1 deletion upb/reflection/stage0/google/protobuf/descriptor.upb.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ const upb_MiniTable* google__protobuf__GeneratedCodeInfo__Annotation_msg_init()

const upb_MiniTableEnum* google_protobuf_Edition_enum_init() {
static const upb_MiniTableEnum* mini_table = NULL;
static const char* mini_descriptor = "!)`~)qt_b)";
static const char* mini_descriptor = "!)`~)qt_b)|i}{~~`!";
if (mini_table) return mini_table;
mini_table =
upb_MiniTableEnum_Build(mini_descriptor, strlen(mini_descriptor),
Expand Down
3 changes: 2 additions & 1 deletion upb/reflection/stage0/google/protobuf/descriptor.upb.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ typedef enum {
google_protobuf_EDITION_2023 = 1000,
google_protobuf_EDITION_99997_TEST_ONLY = 99997,
google_protobuf_EDITION_99998_TEST_ONLY = 99998,
google_protobuf_EDITION_99999_TEST_ONLY = 99999
google_protobuf_EDITION_99999_TEST_ONLY = 99999,
google_protobuf_EDITION_MAX = 2147483647
} google_protobuf_Edition;

typedef enum {
Expand Down

0 comments on commit f99c0bd

Please sign in to comment.