Open jku opened 6 months ago
ah, I've just been told in this version of protobuf optional is the default :shrug:
So maybe this is not a bug at all... It feels wrong that the generated code annotations now don't expose optionality at all but this seems to be as designed.
Yea, optional is now the default in proto3. We should be annotating sig as required though based on the comment.
Summarizing from a discussion in the Sigstore Slack:
This is caused by the mess that is optional/required semantics in proto3 -- in proto3 everything is implicitly optional, even if not marked with the optional
qualifier. This is made even more complicated by the fact that the optional
qualifier was actually removed from proto3, but then re-added in 3.15.
Ideally we'd use optional
to mark optionality (which would result in correct type hints in the Python bindings), but this may change the wire format (although I'm not sure this actually would matter, since everybody uses the JSON format). But even with that change, everything that isn't marked as optional is still optional (thanks to "implicit field presence").
should maybe be
optional string keyid = 2;
-- alternatively should not be documented as optional and should instead suggest a placeholder value?