-
Notifications
You must be signed in to change notification settings - Fork 52
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
Rename NativeCodeAsset->CodeAsset and merge {CodeAsset,DataAsset} and {CodeAsset,DataAsset}Impl #1614
Conversation
… {CodeAsset,DataAsset}Impl This is the last base refactoring. Building on this the next PRs will gradually introduce more flexibility into the build system (starting with adding custom asset types) and gradually seperate components more and more.
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
Package publish validation ✔️
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
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.
- Renames
NativeCodeAsset
toCodeAsset
(which is easier to type and more similar toDataAsset
)
Technically speaking a JarAsset
is also a code asset. How can we say that this is code compiled to a static/dynamic library? I wonder if NativeLibrary
would be a better name. But, it doesn't have Asset
in the name.
The rest of the code changes lgtm.
Yes. I'd assume we later on may add We may even leave the "asset" eventually away before we declare 1.0 - e.g. a hook author could just write If you feel strongly about it I can rename it back, but I think this makes all of related code just read so much nicer. |
I think only the question around |
If we think we want to rename it later, maybe not rename it now. It will require migrations in existing hooks. I don't feel very strongly about it though. Since you're doing the dartdev and flutter_tools ones. 😄 |
If you don't feel very strongly about it, I'll keep it like this - as I think it makes code dealing with it read much nicer. |
This is the last base refactoring. Building on this the next PRs will gradually introduce more flexibility into the build system (starting with adding custom asset types) and gradually separate components more and more.
Some of the class relationships and methods in this PR will soon disappear again, but for ease of reviewing
it may make sense to send this piece out individually.
The PR
NativeCodeAsset
toCodeAsset
(which is easier to type and more similar toDataAsset
)CodeAsset
andCodeAssetImpl
, this also aligns their constructors regarding whether they take anid
or apackage
andname
DataAsset
andDataAssetImpl