Clean up documentation of deprecated features.

This adds some links to the deprecation warning, and expands on the existing documentation.

PiperOrigin-RevId: 663425236
pull/17801/head
Mike Kruskal 3 months ago committed by Copybara-Service
parent e98e8edb15
commit e49ce62d1e
  1. 6
      java/core/src/main/resources/google/protobuf/java_features.proto
  2. 40
      src/google/protobuf/compiler/java/java_features.pb.cc
  3. 10
      src/google/protobuf/cpp_features.pb.cc
  4. 6
      src/google/protobuf/cpp_features.proto

@ -30,10 +30,10 @@ message JavaFeatures {
feature_support = {
edition_introduced: EDITION_2023,
edition_deprecated: EDITION_2023,
deprecation_warning: "The legacy closed enum treatment in Java is "
deprecation_warning: "The legacy closed enum behavior in Java is "
"deprecated and is scheduled to be removed in "
"edition 2025. Mark enum type on the enum "
"definitions themselves rather than on fields.",
"edition 2025. See http://protobuf.dev/programming-guides/enum/#java for "
"more information.",
},
edition_defaults = { edition: EDITION_LEGACY, value: "true" },
edition_defaults = { edition: EDITION_PROTO3, value: "false" }

@ -82,25 +82,25 @@ const char descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fjava_2fjava_
protodesc_cold) = {
"\n1google/protobuf/compiler/java/java_fea"
"tures.proto\022\002pb\032 google/protobuf/descrip"
"tor.proto\"\367\004\n\014JavaFeatures\022\374\001\n\022legacy_cl"
"osed_enum\030\001 \001(\010B\337\001\210\001\001\230\001\004\230\001\001\242\001\t\022\004true\030\204\007\242"
"\001\n\022\005false\030\347\007\262\001\271\001\010\350\007\020\350\007\032\260\001The legacy clos"
"ed enum treatment in Java is deprecated "
"and is scheduled to be removed in editio"
"n 2025. Mark enum type on the enum defi"
"nitions themselves rather than on fields"
".\022\237\002\n\017utf8_validation\030\002 \001(\0162\037.pb.JavaFea"
"tures.Utf8ValidationB\344\001\210\001\001\230\001\004\230\001\001\242\001\014\022\007DEF"
"AULT\030\204\007\262\001\310\001\010\350\007\020\351\007\032\277\001The Java-specific ut"
"f8 validation feature is deprecated and "
"is scheduled to be removed in edition 20"
"25. Utf8 validation behavior should use"
" the global cross-language utf8_validati"
"on feature.\"F\n\016Utf8Validation\022\033\n\027UTF8_VA"
"LIDATION_UNKNOWN\020\000\022\013\n\007DEFAULT\020\001\022\n\n\006VERIF"
"Y\020\002:<\n\004java\022\033.google.protobuf.FeatureSet"
"\030\351\007 \001(\0132\020.pb.JavaFeaturesB(\n\023com.google."
"protobufB\021JavaFeaturesProto"
"tor.proto\"\371\004\n\014JavaFeatures\022\376\001\n\022legacy_cl"
"osed_enum\030\001 \001(\010B\341\001\210\001\001\230\001\004\230\001\001\242\001\t\022\004true\030\204\007\242"
"\001\n\022\005false\030\347\007\262\001\273\001\010\350\007\020\350\007\032\262\001The legacy clos"
"ed enum behavior in Java is deprecated a"
"nd is scheduled to be removed in edition"
" 2025. See http://protobuf.dev/programm"
"ing-guides/enum/#java for more informati"
"on.\022\237\002\n\017utf8_validation\030\002 \001(\0162\037.pb.JavaF"
"eatures.Utf8ValidationB\344\001\210\001\001\230\001\004\230\001\001\242\001\014\022\007D"
"EFAULT\030\204\007\262\001\310\001\010\350\007\020\351\007\032\277\001The Java-specific "
"utf8 validation feature is deprecated an"
"d is scheduled to be removed in edition "
"2025. Utf8 validation behavior should u"
"se the global cross-language utf8_valida"
"tion feature.\"F\n\016Utf8Validation\022\033\n\027UTF8_"
"VALIDATION_UNKNOWN\020\000\022\013\n\007DEFAULT\020\001\022\n\n\006VER"
"IFY\020\002:<\n\004java\022\033.google.protobuf.FeatureS"
"et\030\351\007 \001(\0132\020.pb.JavaFeaturesB(\n\023com.googl"
"e.protobufB\021JavaFeaturesProto"
};
static const ::_pbi::DescriptorTable* const descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto_deps[1] =
{
@ -110,7 +110,7 @@ static ::absl::once_flag descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2f
PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto = {
false,
false,
827,
829,
descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto,
"google/protobuf/compiler/java/java_features.proto",
&descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto_once,

@ -87,11 +87,11 @@ const char descriptor_table_protodef_google_2fprotobuf_2fcpp_5ffeatures_2eproto[
"\032 google/protobuf/descriptor.proto\"\374\003\n\013C"
"ppFeatures\022\373\001\n\022legacy_closed_enum\030\001 \001(\010B"
"\336\001\210\001\001\230\001\004\230\001\001\242\001\t\022\004true\030\204\007\242\001\n\022\005false\030\347\007\262\001\270\001"
"\010\350\007\020\350\007\032\257\001The legacy closed enum treatmen"
"t in C++ is deprecated and is scheduled "
"to be removed in edition 2025. Mark enu"
"m type on the enum definitions themselve"
"s rather than on fields.\022Z\n\013string_type\030"
"\010\350\007\020\350\007\032\257\001The legacy closed enum behavior"
" in C++ is deprecated and is scheduled t"
"o be removed in edition 2025. See http:"
"//protobuf.dev/programming-guides/enum/#"
"cpp for more information\022Z\n\013string_type\030"
"\002 \001(\0162\032.pb.CppFeatures.StringTypeB)\210\001\001\230\001"
"\004\230\001\001\242\001\013\022\006STRING\030\204\007\242\001\t\022\004VIEW\030\351\007\262\001\003\010\350\007\022L\n\032"
"enum_name_uses_string_view\030\003 \001(\010B(\210\001\002\230\001\006"

@ -27,10 +27,10 @@ message CppFeatures {
feature_support = {
edition_introduced: EDITION_2023,
edition_deprecated: EDITION_2023,
deprecation_warning: "The legacy closed enum treatment in C++ is "
deprecation_warning: "The legacy closed enum behavior in C++ is "
"deprecated and is scheduled to be removed in "
"edition 2025. Mark enum type on the enum "
"definitions themselves rather than on fields.",
"edition 2025. See http://protobuf.dev/programming-guides/enum/#cpp for "
"more information",
},
edition_defaults = { edition: EDITION_LEGACY, value: "true" },
edition_defaults = { edition: EDITION_PROTO3, value: "false" }

Loading…
Cancel
Save