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

dart-lang / native / 14077879620
76%

Build:
DEFAULT BRANCH: main
Ran 26 Mar 2025 07:37AM UTC
Jobs 14
Files 242
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Mar 2025 07:36AM UTC coverage: 86.021% (+0.004%) from 86.017%
14077879620

push

github

web-flow
[native_assets_cli] Prevent `EncodedAsset` and `Metadata` hashcode changing (#2131)

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

We have two types of classes in the semantic API:

1. Pure views on top of a JSON.
   These classes are mirrored by a builder class.
   Objects from these classes cannot be passed from input to output in hooks.
   These classes do not override `hashCode` and `operator ==`.
   Examples: `CodeConfig`, `BuildInput`.
2. Data classes that eagerly copy all fields out of the JSON.
   These classes have a public constructor with it's constituent fields.
   Objects from these classes may be passed from input to output in hooks.
   These classes do override `hashCode` and `operator ==`.
   Examples: `CodeAsset`, `Architecture`, `OS`, `DataAsset`.

This changes `Metadata` and `EncodedAsset` to follow pattern 2 fully:

* All data is copied on construction.
* The map accessors do not allow modification.

This means the `hashCode` and `operator ==` are now correct.

We could consider changing `Metadata` and `EncodedAsset` to pattern 1, but I didn't want to refactor that code in this PR. For more details:

* https://github.com/dart-lang/native/issues/2045

13 of 13 new or added lines in 3 files covered. (100.0%)

1 existing line in 1 file now uncovered.

13735 of 15967 relevant lines covered (86.02%)

35.56 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
90.91
2.67% pkgs/native_assets_cli/lib/src/encoded_asset.dart
Subprojects
ID Flag name Job ID Ran Files Coverage
6 native_assets_builder_windows 14077879620.6 26 Mar 2025 07:45AM UTC 11
89.49
GitHub Action Run
7 native_assets_cli_ubuntu 14077879620.7 26 Mar 2025 07:38AM UTC 31
70.12
GitHub Action Run
8 native_toolchain_c_windows 14077879620.8 26 Mar 2025 07:42AM UTC 26
79.06
GitHub Action Run
9 native_assets_cli_windows 14077879620.9 26 Mar 2025 07:39AM UTC 31
69.98
GitHub Action Run
10 native_toolchain_c_ubuntu 14077879620.10 26 Mar 2025 07:38AM UTC 26
74.45
GitHub Action Run
11 native_assets_cli_macos 14077879620.11 26 Mar 2025 07:37AM UTC 31
70.12
GitHub Action Run
12 native_assets_builder_ubuntu 14077879620.12 26 Mar 2025 07:42AM UTC 11
89.49
GitHub Action Run
13 native_assets_builder_macos 14077879620.13 26 Mar 2025 07:41AM UTC 11
89.49
GitHub Action Run
14 native_toolchain_c_macos 14077879620.14 26 Mar 2025 07:38AM UTC 26
68.86
GitHub Action Run
13 jni 13905423754.13 17 Mar 2025 05:07PM UTC 31
70.55
GitHub Action Run
14 objective_c 13877952997.14 16 Mar 2025 12:19AM UTC 76
79.34
GitHub Action Run
14 jnigen 13905423754.14 17 Mar 2025 05:15PM UTC 21
90.47
GitHub Action Run
14 swift2objc 13688465141.14 06 Mar 2025 12:35AM UTC 46
85.29
GitHub Action Run
14 ffigen 13742814161.14 09 Mar 2025 12:25AM UTC 75
91.9
GitHub Action Run
Source Files on build 14077879620
  • Tree
  • List 242
  • Changed 8
  • Source Changed 8
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14077879620
  • e2bd08e8 on github
  • Prev Build on main (#14077695002)
  • Next Build on main (#14078224011)
  • Delete
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

© 2025 Coveralls, Inc