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 = { feature_support = {
edition_introduced: EDITION_2023, edition_introduced: EDITION_2023,
edition_deprecated: 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 " "deprecated and is scheduled to be removed in "
"edition 2025. Mark enum type on the enum " "edition 2025. See http://protobuf.dev/programming-guides/enum/#java for "
"definitions themselves rather than on fields.", "more information.",
}, },
edition_defaults = { edition: EDITION_LEGACY, value: "true" }, edition_defaults = { edition: EDITION_LEGACY, value: "true" },
edition_defaults = { edition: EDITION_PROTO3, value: "false" } edition_defaults = { edition: EDITION_PROTO3, value: "false" }

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

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

Loading…
Cancel
Save