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

dart-lang / native / 13948811216

19 Mar 2025 02:18PM UTC coverage: 86.693% (+0.05%) from 86.642%
13948811216

push

github

web-flow
[native_assets_cli] Add paths to syntax views (#2107)

Bug: https://github.com/dart-lang/native/issues/1826

This PR adds the path that was navigated through the JSON to the syntax classes. This makes syntax errors more descriptive: `Unexpected value '123' for 'target_os'. Expected a String.` -> `Unexpected value '123' (int) for 'config.code.target_os'. Expected a String.`.

Because the data asset and code asset extensions don't know the internals of the base protocol extension, the extension points now expose both a `json` and a `jsonPath`. That path is then used to instantiate the syntax view of the extension, so it can give more precise error messages.

* For `CodeConfig` this comes naturally, it's a clean view.
* For `EncodedAsset` this is somewhat weird because it is half-used as value class: https://github.com/dart-lang/native/issues/2045

(The next PR will add a full syntax validation pass, at which point we should be able to address https://github.com/dart-lang/native/issues/2039.)

168 of 207 new or added lines in 7 files covered. (81.16%)

1 existing line in 1 file now uncovered.

13401 of 15458 relevant lines covered (86.69%)

36.49 hits per line

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

72.02
/pkgs/native_assets_cli/lib/src/code_assets/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