Skip to content

[native_assets_cli] Namespace asset types #2142

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

Merged
merged 1 commit into from
Mar 28, 2025
Merged

Conversation

dcharkes
Copy link
Collaborator

@dcharkes dcharkes commented Mar 27, 2025

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 types 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.

Copy link

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
Changelog Entry ✔️
Package Changed Files

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.

Package Leaked API symbols
License Headers ✔️
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/jni/lib/src/third_party/generated_bindings.dart
pkgs/objective_c/lib/src/ns_input_stream.dart

@dcharkes dcharkes marked this pull request as ready for review March 27, 2025 14:45
@dcharkes dcharkes requested a review from mosuem March 27, 2025 14:45
@dcharkes dcharkes force-pushed the syntax-expose-tagged-enum-key branch from f56ada5 to 2a9abd6 Compare March 27, 2025 14:45
@dcharkes dcharkes force-pushed the namespace-asset-types branch 2 times, most recently from b903d80 to b91277d Compare March 27, 2025 15:23
@dcharkes dcharkes force-pushed the syntax-expose-tagged-enum-key branch from 225c8eb to 52094b2 Compare March 28, 2025 16:10
Base automatically changed from syntax-expose-tagged-enum-key to main March 28, 2025 16:21
@dcharkes dcharkes force-pushed the namespace-asset-types branch from b91277d to be91927 Compare March 28, 2025 16:51
@auto-submit auto-submit bot merged commit 03d3fff into main Mar 28, 2025
46 checks passed
@auto-submit auto-submit bot deleted the namespace-asset-types branch March 28, 2025 17:06
@coveralls
Copy link

Coverage Status

coverage: 85.163% (-0.2%) from 85.376%
when pulling be91927 on namespace-asset-types
into b98b5b4 on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants