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

dart-lang / native / 14268473870
76%

Build:
DEFAULT BRANCH: main
Ran 04 Apr 2025 03:12PM UTC
Jobs 14
Files 242
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 Apr 2025 03:11PM UTC coverage: 84.832% (-0.09%) from 84.923%
14268473870

push

github

web-flow
[native_assets_cli] Add `user_defines` (#2165)

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

Note passing in the user-defines should be done by the Dart and Flutter SDK, they need to decide where to take the command-line arguments, and how to read from the `pubspec.yaml`.

The `NativeAssetsBuildRunner` provides a suggestion about where to put user-defines in the `pubspec.yaml`:

```yaml
hooks:
  user_defines:
    my_package:
      user_define_key: user_define_value
      user_define_key2:
        foo: bar
    some_other_package:
      user_define_key3: user_define_value3
```

Moreover, it provides a helper function that can be reused in SDKs after the pubspec yaml is parsed.

### Design choices

(According to the discussion on the bug.)

* User-defines are name-spaced per package, we don't want new user-defines to invalidate the cache for other packages.
* User-defines can be provided for any package in the dependency graph.
* If user-defines need to be shared across packages, the common dependency package can export it as metadata.

### Test

This change is tested by invoking the build with user-defines, and in the hook failing if the defines are not available.

30 of 53 new or added lines in 3 files covered. (56.6%)

2 existing lines in 1 file now uncovered.

13960 of 16456 relevant lines covered (84.83%)

35.34 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
87.65
-1.05% pkgs/native_assets_cli/lib/src/config.dart
9
62.82
-0.85% pkgs/native_assets_cli/lib/src/hooks/syntax.g.dart
11
89.17
-1.94% pkgs/native_assets_builder/lib/src/build_runner/build_runner.dart

Uncovered Existing Lines

Lines Coverage ∆ File
2
62.82
-0.85% pkgs/native_assets_cli/lib/src/hooks/syntax.g.dart
Subprojects
ID Flag name Job ID Ran Files Coverage
6 native_toolchain_c_windows 14268473870.6 04 Apr 2025 03:16PM UTC 26
79.08
GitHub Action Run
7 native_toolchain_c_macos 14268473870.7 04 Apr 2025 03:13PM UTC 26
68.88
GitHub Action Run
8 native_assets_cli_windows 14268473870.8 04 Apr 2025 03:14PM UTC 31
65.62
GitHub Action Run
9 native_assets_builder_windows 14268473870.9 04 Apr 2025 03:20PM UTC 11
88.65
GitHub Action Run
10 native_assets_builder_ubuntu 14268473870.10 04 Apr 2025 03:17PM UTC 11
88.65
GitHub Action Run
11 native_assets_cli_macos 14268473870.11 04 Apr 2025 03:12PM UTC 31
65.73
GitHub Action Run
12 native_assets_builder_macos 14268473870.12 04 Apr 2025 03:16PM UTC 11
88.65
GitHub Action Run
13 native_assets_cli_ubuntu 14268473870.13 04 Apr 2025 03:14PM UTC 31
65.73
GitHub Action Run
14 native_toolchain_c_ubuntu 14268473870.14 04 Apr 2025 03:13PM UTC 26
74.47
GitHub Action Run
14 swift2objc 13688465141.14 06 Mar 2025 12:35AM UTC 46
85.29
GitHub Action Run
13 jnigen 14229810567.13 02 Apr 2025 09:30PM UTC 21
90.47
GitHub Action Run
14 ffigen 13742814161.14 09 Mar 2025 12:25AM UTC 75
91.9
GitHub Action Run
14 jni 14229810567.14 02 Apr 2025 09:23PM UTC 31
70.55
GitHub Action Run
14 objective_c 14262647068.14 04 Apr 2025 09:50AM UTC 76
79.34
GitHub Action Run
Source Files on build 14268473870
  • Tree
  • List 242
  • Changed 8
  • Source Changed 8
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14268473870
  • 3fbbf070 on github
  • Prev Build on main (#14267541084)
  • Next Build on main (#14308078630)
  • 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