• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dart-lang / native / 14077318286

26 Mar 2025 06:58AM UTC coverage: 86.019% (+0.003%) from 86.016%
14077318286

push

github

web-flow
[native_assets_cli] Fix snake casing in JSON (#2128)

Closes: https://github.com/dart-lang/native/issues/2037
Closes: https://github.com/dart-lang/native/issues/2038

Fixes spelling in the JSON format:

* `prefer-dynamic` -> `prefer_dynamic`
* `prefer-static` -> `prefer_static`
* `assetsForLinking` -> `assets_for_linking`

### PR changes

* `pkgs/hook`, `pkgs/code_assets`, and `pkgs/data_assets`
  * Introduces new schemas in the non-generated `.schema.json` files
  * Updates the generated schemas to pick up on the new spelling for `assets_for_linking`.
  * Adds test data for the new spelling.
  * Added JSON schema tests for the new spelling.

* `package:native_assets_cli`
  * Generated the syntax classes
  * Deal with version skew in the mapping between syntax classes and semantic API

### Version skew between hooks and SDKs

* For https://github.com/dart-lang/native/issues/2037
  * Backwards compatibility older SDKs: Also still emit `assetsForLinking`, instead of only `assets_for_linking`.
  * Backwards compatibility older hooks: Also still read `assetsForLinking`, instead of only `assets_for_linking`.

* For https://github.com/dart-lang/native/issues/2038
  * Backwards compatibility older SDKs: Still read the casing with dashes.
  * Backwards compatibility older hooks: Irrelevant. Both Flutter and Dart only use `dynamic`.

31 of 34 new or added lines in 2 files covered. (91.18%)

13726 of 15957 relevant lines covered (86.02%)

35.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

65.5
/pkgs/native_assets_cli/lib/src/hook/syntax.g.dart


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc