You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug: #2132
Take the `Asset.type`s from the syntax.
(This will prevent any misspellings when using `EncodedAsset.type` as a String in `native_assets_cli`.)
Bug: #2132
This PR starts recognizing `code_assets/code` and `data_assets/data` as asset types besides `native_code` and `data`.
The `config.build_asset_types` now contains `["code_assets/code", "native_code"]` for code assets and `["data_assets/data", "data"]` for data assets.
The asset `type`s are still written as the old `"data"` and `"native_code"` to prevent breaking combinations with older hooks and SDKs.
### PR changes
* `pkgs/hooks`, `pkgs/code_assets`, and `pkgs/data_assets`
* Add new syntax nodes for the new asset types.
* These new nodes don't inline all the encoding in the object itself, encoding is only in `encoding`.
* Adds test data with the new asset keys.
* Added JSON schema tests that exercise the new asset keys.
* `package:native_assets_cli`
* Recognize code and data assets with both the old a new asset keys.
* Emit both old and new asset type in `config.build_asset_types`.
* Emit the old asset type in assets for now.
We should provide guidance on name-spacing the extensions to the base protocol so that we don't end up with name clashes.
This is for:
type
inEncodedAsset
, andConfig
.I believe the most natural way to name-space them is by using package names.
For the
type
in encoded assets andbuild_asset_types
:code_assets/code_asset
code_assets/code
orcode_asset
inpackage:code_asset
code_assets/multi_architecture
data_assets/data
ordata_asset
inpackage:data_asset
flutter/font
flutter_assets/font
unity/shader
And in the config extensions simply always the package name.
This should prevent any name clashes between extensions and between extensions.
Together with #2091, this should prevent name clashes between the base protocol and extensions.
Thanks for the suggestion @mkustermann 🙏
The text was updated successfully, but these errors were encountered: