-
Notifications
You must be signed in to change notification settings - Fork 412
refactor: prepare for multi-return values in GenerateForAnnotation #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
JsonSerializableGenerator now returns String instead of Future<String> GeneratorHelper is now private and in the same file is the Generator Encoding and decoding have been split into mixin classes These two aspects of the generator are nicely isolated hopefully making future fixes and additions easier Many members of utils.dart have been moved closer to where they are used and made private when possible Updated tests to be sync now that the core tested function is sync
import 'type_helper.dart'; | ||
import 'utils.dart'; | ||
|
||
abstract class DencodeHelper implements HelperCore { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: DecodeHelper
@@ -0,0 +1,302 @@ | |||
import 'package:analyzer/dart/element/element.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copyright (others also)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not re-review internals, this is mostly just moves right?
Yup. Mostly copy-paste. The mixin thing is pretty nice... |
Ya, I like the new structure more for sure |
JsonSerializableGenerator now returns String instead of Future
GeneratorHelper is now private and in the same file is the Generator
Encoding and decoding have been split into mixin classes
These two aspects of the generator are nicely isolated hopefully
making future fixes and additions easier
Many members of utils.dart have been moved closer to where they are used
and made private when possible
Updated tests to be sync now that the core tested function is sync