Skip to content

[infra] Split up package:native_assets_cli #2259

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 2 commits into from
Apr 30, 2025
Merged

[infra] Split up package:native_assets_cli #2259

merged 2 commits into from
Apr 30, 2025

Conversation

dcharkes
Copy link
Collaborator

@dcharkes dcharkes commented Apr 30, 2025

Closes: #999

Splits up package:native_assets_cli in package:hooks, package:code_assets and package:data_assets.
Renames package:native_assets_builder to package:hooks_runner.

The dependencies are as follows:

  • hooks has dev dependencies on code_assets and data_assets because all the integration tests use these asset types.
  • hooks_runner has a dependency on code_assets due to the kernel-encoding KernelAssets which is used to bundle the code-assets asset-mapping in various SDKs.
  • hooks_runner has a dev dependency on data_assets because the integration tests use it.

Versions:

  • The split up packages continue numbering from the original version. (It doesn't really matter, we'll need to go to 1.0.0 in the future anyway.)

Internal package structure:

  • This PR does not reorganize packages. It moves the files exactly to the same path. This could use cleanup, but let's try to get this PR as small as possible.

CI:

  • Two workflows are combined. (This could likely use some cleanup, especially trying to collect coverage across all packages in the workspace instead of a single package at the time.)

Publishing:

  • These packages will now need their autopublishing set up. I'll do this after we bump the version to non-wip.

Rolling:

  • This will need to be rolled into the Dart and Flutter SDKs. Changing the dependencies there and fixing whatever test setup explicitly mentioning the package names.

@github-actions github-actions bot added type-infra A repository infrastructure change or enhancement package:hooks package:native_toolchain_c labels Apr 30, 2025
Copy link

PR Health

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 changed the title [hooks] Split up package:native_assets_cli [native_assets_cli] Split up package:native_assets_cli Apr 30, 2025
@dcharkes dcharkes changed the title [native_assets_cli] Split up package:native_assets_cli [infra] Split up package:native_assets_cli Apr 30, 2025
@dcharkes dcharkes marked this pull request as ready for review April 30, 2025 10:19
Copy link

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

README.md Outdated
| [native_assets_builder](pkgs/native_assets_builder/) | This package is the backend that invokes build hooks. | [![issues](https://img.shields.io/badge/package:native__assets__builder-4774bc)][native_assets_builder_issues] | |
| [native_assets_cli](pkgs/native_assets_cli/) | A library that contains the argument and file formats for implementing a native assets CLI. | [![issues](https://img.shields.io/badge/package:native__assets__cli-4774bc)][native_assets_cli_issues] | |
| [hooks_runner](pkgs/hooks_runner/) | This package is the backend that invokes build hooks. | [![issues](https://img.shields.io/badge/package:native__assets__builder-4774bc)][hooks_runner_issues] | |
| [hooks](pkgs/hooks/) | A library that contains the argument and file formats for implementing a native assets CLI. | [![issues](https://img.shields.io/badge/package:hooks-4774bc)][hooks_issues] | |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should pkg:code_assets and pkg:data_assets be added to this list of packages for completeness?

hook-helper-package's Dart API (such as `package:native_assets_cli`) which
abstracts away from syntactic changes. If you do want to directly interact
with the JSON, you can find the relevant schemas in [hook/](hook/).
* If you are a hook-helper-package author, you should likely be this package's

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there's a verb ("using"?) missing here after "be".

@auto-submit auto-submit bot merged commit b324678 into main Apr 30, 2025
37 checks passed
@auto-submit auto-submit bot deleted the package-hooks branch April 30, 2025 11:53
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.

[native_assets_cli] Package name
2 participants