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

dart-lang / native / 11662782319
92%

Build:
DEFAULT BRANCH: main
Ran 04 Nov 2024 10:53AM UTC
Jobs 14
Files 222
Run time 1min
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

04 Nov 2024 10:52AM UTC coverage: 90.492% (-0.4%) from 90.875%
11662782319

push

github

web-flow
Allow custom build/link configuration, decouple core CLI infrastructure from code assets, data assets, ... (#1643)

This PR allows users of `package:native_assets_builder` to supply custom
build/link configuration. This allows e.g. flutter to add additional
configuration to `hook/{build,link}.dart` scripts that require flutter
specific things.

As opposed to earlier PRs that merged `Foo` and `FooImpl` we have a
different approach for build/link config/output as they are something
different:

The current API (even before the recent refactoring to it) allows read
and write access to (e.g. assets, ...). We remove this capability as this
is conceptually problematic:

- Currently those API classes are both mutable and at the same time
  support operator==/hashCode:
  => This is problematic as inserting such an object into a set/map and
  then modifying it means one can later on not find it anymore. Mutable
  objects can have operator==/hashCode iff it doesn't change (e.g. the
  default implementation based on identity). Otherwise objects should be
  immutable if they want to support operator==/hashCode.
  => For our purposes we have no need for operator==/hashCode and
  therefore remove this (problematic) capability.

- Currently those API classes are serving both the hook writers and the
  bundling tool. The bundling tool would use `...Impl` versions of those, but
  in the end operate on the same structures.

We now change this to be using the builder pattern: The code that
  * creates build/link config/output will use a builder object that allows
    write/mutation only

  * consumes build/link config/output will uses a view object that only
    allows read access

We then make those build/link config/output objects flexible in the
sense that

  * a bundling tool can add more configuration to build/link
    configuration
  * a hook can consume this additional configuration

To support this we

a) Make the builde... (continued)

446 of 529 new or added lines in 18 files covered. (84.31%)

39 existing lines in 9 files now uncovered.

11154 of 12326 relevant lines covered (90.49%)

34.7 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
94.58
3.76% pkgs/native_assets_builder/lib/src/build_runner/build_runner.dart
4
88.89
-0.47% pkgs/native_toolchain_c/lib/src/cbuilder/clinker.dart
5
81.91
3.23% pkgs/native_assets_cli/lib/src/code_assets/validation.dart
8
93.94
pkgs/native_assets_cli/lib/src/config.dart
8
64.29
-24.6% pkgs/native_assets_cli/lib/src/data_assets/validation.dart
10
0.0
0.0% pkgs/native_assets_cli/lib/src/api/link.dart
13
74.0
pkgs/native_assets_cli/lib/src/code_assets/config.dart
15
31.82
pkgs/native_assets_cli/lib/src/data_assets/config.dart
16
47.5
-44.17% pkgs/native_assets_cli/lib/src/validation.dart

Uncovered Existing Lines

Lines Coverage ∆ File
1
50.0
50.0% pkgs/native_assets_cli/lib/src/model/hook.dart
2
88.24
-11.76% pkgs/native_assets_cli/lib/src/encoded_asset.dart
2
80.95
2.52% pkgs/native_assets_cli/lib/src/json_utils.dart
3
82.61
-13.04% pkgs/native_assets_cli/lib/src/utils/file.dart
3
54.55
-9.09% pkgs/native_assets_cli/lib/src/utils/json.dart
3
50.0
-37.5% pkgs/native_assets_cli/lib/src/utils/uri.dart
3
47.5
-44.17% pkgs/native_assets_cli/lib/src/validation.dart
8
50.0
-50.0% pkgs/native_assets_cli/lib/src/model/dependencies.dart
14
51.72
-48.28% pkgs/native_assets_cli/lib/src/c_compiler_config.dart
Subprojects
ID Flag name Job ID Ran Files Coverage
6 native_assets_builder_ubuntu 11662782319.6 04 Nov 2024 10:57AM UTC 10
90.26
GitHub Action Run
7 native_assets_cli_windows 11662782319.7 04 Nov 2024 10:55AM UTC 30
76.79
GitHub Action Run
8 native_assets_builder_windows 11662782319.8 04 Nov 2024 10:59AM UTC 10
90.26
GitHub Action Run
9 native_toolchain_c_windows 11662782319.9 04 Nov 2024 10:56AM UTC 24
78.55
GitHub Action Run
10 native_assets_cli_macos 11662782319.10 04 Nov 2024 10:53AM UTC 30
77.14
GitHub Action Run
11 native_toolchain_c_ubuntu 11662782319.11 04 Nov 2024 10:54AM UTC 24
74.37
GitHub Action Run
12 native_assets_cli_ubuntu 11662782319.12 04 Nov 2024 10:54AM UTC 30
77.14
GitHub Action Run
13 native_toolchain_c_macos 11662782319.13 04 Nov 2024 10:54AM UTC 24
69.82
GitHub Action Run
14 native_assets_builder_macos 11662782319.14 04 Nov 2024 10:56AM UTC 10
90.26
GitHub Action Run
13 jnigen 11366384533.13 16 Oct 2024 01:20PM UTC 21
90.77
GitHub Action Run
14 ffigen 11620359437.14 31 Oct 2024 09:54PM UTC 70
91.57
GitHub Action Run
14 swift2objc 11624890883.14 01 Nov 2024 05:35AM UTC 36
89.19
GitHub Action Run
14 objective_c 11620449874.14 31 Oct 2024 09:56PM UTC 71
78.67
GitHub Action Run
14 jni 11366384533.14 16 Oct 2024 01:14PM UTC 30
81.87
GitHub Action Run
Source Files on build 11662782319
  • Tree
  • List 222
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #11662782319
  • 51647776 on github
  • Prev Build on main (#11624890883)
  • Next Build on main (#11666425627)
  • 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