Internal change

PiperOrigin-RevId: 645427569
This commit is contained in:
Protobuf Team Bot 2024-06-21 10:18:16 -07:00 committed by Copybara-Service
parent c008a86038
commit 217b66558c
2 changed files with 7 additions and 7 deletions

View file

@ -211,18 +211,18 @@ post-editions, they will look like this:
edition = "tbd"
message Foo {
int32 x = 1 [features.presence = LEGACY_REQUIRED];
int32 x = 1 [features.field_presence = LEGACY_REQUIRED];
int32 y = 2;
repeated int32 z = 3;
}
// bar.proto
edition = "tbd"
option features.presence = NO_PRESENCE;
option features.field_presence = NO_PRESENCE;
message Bar {
int32 x = 1;
int32 y = 2 [features.presence = EXPLICIT_PRESENCE];
int32 y = 2 [features.field_presence = EXPLICIT_PRESENCE];
repeated int32 z = 3;
}
```

View file

@ -188,11 +188,11 @@ breaking changes.
### Large-scale Changes with Features Only: Immolation of `required`
We can use features to move fields off of `features.presence = LEGACY_REQUIRED`
(the editions spelling of `required`) and onto `features.presence =
EXPLICIT_PRESENCE`.
We can use features to move fields off of `features.field_presence =
LEGACY_REQUIRED` (the editions spelling of `required`) and onto
`features.field_presence = EXPLICIT_PRESENCE`.
To do this, we introduce a new value for `features.presence`,
To do this, we introduce a new value for `features.field_presence`,
`ALWAYS_SERIALIZE`, which behaves like `EXPLICIT_PRESENCE`, but, if the has-bit
is not set, the default is serialized. (This is sort of like a cross between
`required` and `proto3` no-label.)