Internal change

PiperOrigin-RevId: 645427569
pull/17202/head
Protobuf Team Bot 9 months ago committed by Copybara-Service
parent c008a86038
commit 217b66558c
  1. 6
      docs/design/editions/edition-zero-features.md
  2. 8
      docs/design/editions/life-of-an-edition.md

@ -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;
}
```

@ -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 edition’s spelling of `required`) and onto `features.presence =
EXPLICIT_PRESENCE`.
We can use features to move fields off of `features.field_presence =
LEGACY_REQUIRED` (the edition’s 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.)

Loading…
Cancel
Save