Skip to content

Commit 715b543

Browse files
mkruskal-googlecopybara-github
authored andcommitted
Breaking change: Remove deprecated syntax APIs
PiperOrigin-RevId: 588848125
1 parent b7a37e2 commit 715b543

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

src/google/protobuf/descriptor.h

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,17 +1036,10 @@ class PROTOBUF_EXPORT FieldDescriptor : private internal::SymbolBase,
10361036
friend class Reflection;
10371037
friend class FieldDescriptorLegacy;
10381038

1039-
1040-
public:
1041-
ABSL_DEPRECATED(
1042-
"Syntax is deprecated in favor of editions, please use "
1043-
"FieldDescriptor::has_presence instead.")
10441039
// Returns true if this field was syntactically written with "optional" in the
10451040
// .proto file. Excludes singular proto3 fields that do not have a label.
10461041
bool has_optional_keyword() const;
10471042

1048-
private:
1049-
10501043
// Get the merged features that apply to this field. These are specified in
10511044
// the .proto file through the feature options in the message definition.
10521045
// Allowed features are defined by Features in descriptor.proto, along with
@@ -1219,17 +1212,10 @@ class PROTOBUF_EXPORT OneofDescriptor : private internal::SymbolBase {
12191212
friend class compiler::cpp::Formatter;
12201213
friend class OneofDescriptorLegacy;
12211214

1222-
1223-
public:
1224-
ABSL_DEPRECATED(
1225-
"Syntax is deprecated in favor of editions, please use "
1226-
"real_oneof_decl_count for now instead of is_synthetic.")
12271215
// Returns whether this oneof was inserted by the compiler to wrap a proto3
12281216
// optional field. If this returns true, code generators should *not* emit it.
12291217
bool is_synthetic() const;
12301218

1231-
private:
1232-
12331219
// Get the merged features that apply to this oneof. These are specified in
12341220
// the .proto file through the feature options in the oneof definition.
12351221
// Allowed features are defined by Features in descriptor.proto, along with
@@ -1869,18 +1855,12 @@ class PROTOBUF_EXPORT FileDescriptor : private internal::SymbolBase {
18691855
// descriptor.proto, and any available extensions of that message.
18701856
const FileOptions& options() const;
18711857

1872-
18731858
private:
18741859
// With the upcoming release of editions, syntax should not be used for
18751860
// business logic. Instead, the various feature helpers defined in this file
18761861
// should be used to query more targeted behaviors. For example:
18771862
// has_presence, is_closed, requires_utf8_validation.
1878-
enum
1879-
ABSL_DEPRECATED(
1880-
"Syntax is deprecated in favor of editions. Please use targeted "
1881-
"feature helpers instead (e.g. has_presence, is_packed, "
1882-
"requires_utf8_validation, etc).")
1883-
Syntax
1863+
enum Syntax
18841864
#ifndef SWIG
18851865
: int
18861866
#endif // !SWIG
@@ -1891,10 +1871,6 @@ class PROTOBUF_EXPORT FileDescriptor : private internal::SymbolBase {
18911871
SYNTAX_EDITIONS = 99,
18921872
};
18931873
PROTOBUF_IGNORE_DEPRECATION_START
1894-
ABSL_DEPRECATED(
1895-
"Syntax is deprecated in favor of editions. Please use targeted "
1896-
"feature helpers instead (e.g. has_presence, is_packed, "
1897-
"requires_utf8_validation, etc).")
18981874
Syntax syntax() const;
18991875
PROTOBUF_IGNORE_DEPRECATION_STOP
19001876

@@ -1903,7 +1879,6 @@ class PROTOBUF_EXPORT FileDescriptor : private internal::SymbolBase {
19031879
friend class FileDescriptorLegacy;
19041880

19051881
PROTOBUF_IGNORE_DEPRECATION_START
1906-
ABSL_DEPRECATED("Syntax is deprecated in favor of editions")
19071882
static const char* SyntaxName(Syntax syntax);
19081883
PROTOBUF_IGNORE_DEPRECATION_STOP
19091884

0 commit comments

Comments
 (0)