Consider generating enum classes in the same file with messages
Open
refactoring
- Dominant language
- Dart
- Stars
- 572
- Forks
- 196
- Avg merge
- 1h 59m
- Merged PRs (30d)
- 2
Description
Currently classes for enums are defined in separate files. I don't know what the reason was for this, and it's not documented. I asked to a few people and they also don't know. We should just generate enum classes in the same files with messages.
One problem is how to migrate existing code that imports `.pbenum.dart` files without too much disruption. If it's possible to (1) import and re-export things from another file (2) add a deprecation warning to a file, then we can generate a warning when the `.pbenum.dart` files are imported but keep exporting the same classes. Then remove the files in a few releases.
cc @sigurdm
Contributor guide
Assessment
This issue has not been assessed yet.