Consider some extension member magic to avoid API noise in generated classes
kevmoo opened this issue · 4 comments
I'd also like to understand the need for:
info_
has*
andclear*
Trying to understand how often these are really needed by humans using the generated API
We should probably just mark all of generated-code-private methods (prefixed with $_*
) with @nodoc
. We need to be careful with making them extensions - this can increase JS code size because static invocations are longer than method invocations.
has*
andclear*
These are kinda part of a "canonical" protobuf API. Though I would expect generator to generate less "hazzers" for proto3 variant (as described here: https://github.com/protocolbuffers/protobuf/blob/main/docs/field_presence.md).
These are already marked as @nodoc
, we just need to publish a new version.
protobuf.dart/protobuf/lib/src/protobuf/generated_message.dart
Lines 405 to 471 in cc0f287