Generate `toBuilder` overrides with covariate return type
Open
feature request
- Dominant language
- Dart
- Stars
- 572
- Forks
- 196
- Avg merge
- 1h 59m
- Merged PRs (30d)
- 2
Description
At the moment `toBuilder` methods are only defined on the `GeneratedMessage`, which means they are always of type `GeneratedMessage`. This works poorly when `no-implicit-casts` is used as it requires explicit casting to the actual type.
Contributor guide
Research direction
No files or tests are named. Start by locating the Dart generator and the GeneratedMessage definition, then trace how toBuilder is currently declared and emitted. Done means generated message classes provide toBuilder overrides with covariant concrete return types, avoiding explicit casts when no-implicit-casts is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100