-
Notifications
You must be signed in to change notification settings - Fork 67
[native_assets_builder] Refactor API to ProtocolExtension
s
#2089
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
PR HealthBreaking changes ✔️
Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
|
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.
LGTM! Feel free to add more documentation though.
import '../../code_assets_builder.dart'; | ||
import 'validation.dart'; | ||
|
||
final class CodeAssetExtension implements ProtocolExtension { |
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.
Missing documentation
import '../../data_assets_builder.dart'; | ||
import 'validation.dart'; | ||
|
||
final class DataAssetsExtension implements ProtocolExtension { |
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.
Missing docs
required BuildValidator buildValidator, | ||
required ApplicationAssetValidator applicationAssetValidator, | ||
required List<String> buildAssetTypes, | ||
required List<ProtocolExtension> extensions, |
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.
Add docs about the extensions
parameter - why do we need to pass it?
This PR introduces a concept of protocol extensions, which package together everything belonging to a protocol extension.
Closes: #2088
As a bonus, this better abstraction reduces LOC.
The
validation
methods are now all internal to the extensions. Thesetup
methods stay exported because they are used extensively in hook-helper-packages (e.g.native_toolchain_c
).