Closed MixusMinimax closed 5 months ago
Version: 0.12.3
Problem:
Generated enum variants are only sanitized for "Self", if prefix-stripping is not used, or does not apply.
Minimal reproducable protobuf defininition:
enum Feeding { FEEDING_UNSPECIFIED = 0; FEEDING_ASSISTED = 1; // Careful: code generation resulted in "Self". FEEDING_SELF = 2; }
Reason:
The existing code does this:
FEEDING_SELF
FeedingSelf
Self
Self_
Feeding
The final result is Self, which is not sanitized after.
The logic is already described in #179, the only missing cases are enum variants after prefix stripping.
I have created a pull request at #998!
Version: 0.12.3
Problem:
Generated enum variants are only sanitized for "Self", if prefix-stripping is not used, or does not apply.
Minimal reproducable protobuf defininition:
Reason:
The existing code does this:
FEEDING_SELF
intoFeedingSelf
Self
to replace withSelf_
Feeding
Feeding
toFeeding
Self
to replace withSelf_
Feeding
fromFeedingSelf
, resulting inSelf
The final result is
Self
, which is not sanitized after.