Closed timostamm closed 1 month ago
@srikrsna-buf, the presence
and other properties of DescField/DescExtension are computed eagerly (that wasn't the case some time ago), and I can't think of a way that the kludge we use in the extension container should cause any more problems. So I think we should keep the extension container.
The property
DescField.presence
tells whether a field tracks presence, but only for singular fields. This change makes it available for all fields. The values match with the documentation, which should be helpful for users who want to take a closer look at the schema.The property is also available for extension descriptors. It's not well documented, but implicit presence (e.g. a proto3 singular scalar field) does not apply to extensions. Otherwise, setting an extension value
0
would be ambigous.