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

dart-lang / native / 14077166409
74%

Build:
DEFAULT BRANCH: main
Ran 26 Mar 2025 06:47AM 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

26 Mar 2025 06:46AM UTC coverage: 86.016% (-0.08%) from 86.091%
14077166409

push

github

web-flow
[native_assets_cli] Validate conditionally required fields (#2126)

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

This PR adds the final step to the generated syntax validation: conditionally required fields:

1. If target OS is `x`, then require `x` config in code config.
2. If target OS is `windows`, then require `windows` in the c compiler config (more info https://github.com/dart-lang/native/pull/1913).
3. If link mode is dynamic library bundled or static library, then require a file in a code asset.

We could consider trying to nest the fields under the condition, but that has other downsides:

RE 1: Then the OS is no longer an enum usable in the code-asset as OS field. (We could consider this if we remove the OS/arch from code asset outputs. We should be able to do this due to the code config always having a single OS and architecture anyway. https://github.com/dart-lang/native/issues/2127)
RE 2: That would mean the compiler config would be split over two places. `input.config.code.cCompiler` and `inputconfig.code.windows.cCompiler`. Maybe that's better? Maybe not?
RE 3: Treating a group of files in assets would then become `input.assets.code.switch( ... )` instead of simply `input.assets.code.map((a) => a.file)`. Maybe that's okay because we don't often use files in such way anyway?

WDYT @mosuem @HosseinYousefi?

(I'd probably do any of those refactorings in follow up PRs.)

27 of 37 new or added lines in 3 files covered. (72.97%)

7 existing lines in 1 file now uncovered.

13705 of 15933 relevant lines covered (86.02%)

35.63 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
5
36.36
-1.22% pkgs/native_assets_cli/lib/src/data_assets/syntax.g.dart
5
63.9
-0.87% pkgs/native_assets_cli/lib/src/hook/syntax.g.dart

Uncovered Existing Lines

Lines Coverage ∆ File
7
69.44
-4.86% pkgs/native_assets_cli/lib/src/code_assets/validation.dart
Subprojects
ID Flag name Job ID Ran Files Coverage
6 native_assets_builder_macos 14077166409.6 26 Mar 2025 06:50AM UTC 11
89.56
GitHub Action Run
7 native_assets_builder_ubuntu 14077166409.7 26 Mar 2025 06:51AM UTC 11
89.56
GitHub Action Run
8 native_assets_cli_ubuntu 14077166409.8 26 Mar 2025 06:48AM UTC 31
69.77
GitHub Action Run
9 native_assets_cli_macos 14077166409.9 26 Mar 2025 06:47AM UTC 31
69.77
GitHub Action Run
10 native_assets_cli_windows 14077166409.10 26 Mar 2025 06:49AM UTC 31
69.63
GitHub Action Run
11 native_toolchain_c_windows 14077166409.11 26 Mar 2025 06:51AM UTC 26
79.06
GitHub Action Run
12 native_toolchain_c_macos 14077166409.12 26 Mar 2025 06:47AM UTC 26
68.86
GitHub Action Run
13 native_toolchain_c_ubuntu 14077166409.13 26 Mar 2025 06:48AM UTC 26
74.45
GitHub Action Run
14 native_assets_builder_windows 14077166409.14 26 Mar 2025 06:54AM UTC 11
89.56
GitHub Action Run
14 ffigen 13742814161.14 09 Mar 2025 12:25AM UTC 75
91.9
GitHub Action Run
14 objective_c 13877952997.14 16 Mar 2025 12:19AM UTC 76
79.34
GitHub Action Run
14 swift2objc 13688465141.14 06 Mar 2025 12:35AM UTC 46
85.29
GitHub Action Run
13 jni 13905423754.13 17 Mar 2025 05:07PM UTC 31
70.55
GitHub Action Run
14 jnigen 13905423754.14 17 Mar 2025 05:15PM UTC 21
90.47
GitHub Action Run
Source Files on build 14077166409
  • Tree
  • List 242
  • Changed 9
  • Source Changed 8
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14077166409
  • 4073532a on github
  • Prev Build on main (#13989395197)
  • Next Build on main (#14077318286)
  • 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