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

dart-lang / native / 11088091654
74%

Build:
DEFAULT BRANCH: main
Ran 29 Sep 2024 12:21AM UTC
Jobs 10
Files 105
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

27 Sep 2024 06:18PM UTC coverage: 91.448% (-0.9%) from 92.361%
11088091654

push

github

web-flow
Unify {OS,Architecture,...} and {OS,Architecture,...}Impl classes that are effectively simple enums or data classes (#1604)

The API of `package:native_assets_cli` uses currently a
one-size-fits-all approach:

* almost every API class has two versions a `<Foo>` and a `<Foo>Impl`
* `package:native_assets_cli/native_assets_cli.dart` exposes `<Foo>`
* `package:native_assets_cli/native_assets_cli_internal.dart` exposes `<Foo>Impl`

This has a number of issues

* The `_internal.dart` is actually a public API: It's used e.g. by
  flutter tools and breaking changes to it need major version bumps.

* A user of the `<Foo>` API doesn't know that such objects are for
  example
    * hashable (e.g. go-to-definition to `<Foo>` there's no
      indication of that), e.g. `DynamicLoadingSystem` makes no mention
      of it, no `get hashCode` override, ... only in
      `DynamicLoadingSystemImpl` there is.
    * have a `toString()` that code can rely on the returned string not
      changing
    * ...

* It causes code to have to choose between e.g. `OS` and `OSImpl` -
  which is very confusing as it's just one concept.

* It causes code to have to downcast e.g. `os as OSImpl`.
  => This is a very bad smell, as generally it's an unsafe operation to
  downcast.

* It's code duplication across the api/ and model/ folders, make it
  harder to navigate in codebase (as one may have to constantly switch
  between the files), ...

One original intention for this separation may have been to hide all traces
of the json protocol in the non-internal version, but I think this is not
needed at all, because the protocol itself will be *more* stable than the APIs
offered by the package itself (much easier to break the Dart API and publish and
new version of the package than to break the CLI protocol).

=> So this PR starts to merge some `<Foo>` and `<Foo>Impl` classes into
one `<Foo>`.
=> This simplifies the code, removes `as ...Impl` downcas... (continued)

45 of 46 new or added lines in 4 files covered. (97.83%)

35 existing lines in 3 files now uncovered.

3069 of 3356 relevant lines covered (91.45%)

32.32 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
89.57
0.0% pkgs/native_assets_cli/lib/src/model/hook_config.dart

Uncovered Existing Lines

Lines Coverage ∆ File
1
99.02
0.0% pkgs/native_assets_cli/lib/src/validator/validator.dart
14
89.57
0.0% pkgs/native_assets_cli/lib/src/model/hook_config.dart
20
90.44
0.0% pkgs/native_assets_builder/lib/src/build_runner/build_runner.dart
Subprojects
ID Flag name Job ID Ran Files Coverage
10 swift2objc 11088091654.10 29 Sep 2024 12:21AM UTC 35
87.21
GitHub Action Run
6 native_toolchain_c_macos 11072475500.6 27 Sep 2024 02:30PM UTC 24
69.6
GitHub Action Run
8 native_assets_cli_ubuntu 11072475500.8 27 Sep 2024 02:29PM UTC 36
90.84
GitHub Action Run
1 native_assets_builder_macos 11072475500.1 27 Sep 2024 02:33PM UTC 10
87.24
GitHub Action Run
5 native_assets_builder_windows 11072475500.5 27 Sep 2024 02:34PM UTC 10
87.24
GitHub Action Run
7 native_assets_builder_ubuntu 11072475500.7 27 Sep 2024 02:32PM UTC 10
87.24
GitHub Action Run
2 native_toolchain_c_ubuntu 11072475500.2 27 Sep 2024 02:29PM UTC 24
74.42
GitHub Action Run
9 native_toolchain_c_windows 11072475500.9 27 Sep 2024 02:31PM UTC 24
78.31
GitHub Action Run
3 native_assets_cli_macos 11072475500.3 27 Sep 2024 02:29PM UTC 36
91.21
GitHub Action Run
4 native_assets_cli_windows 11072475500.4 27 Sep 2024 02:30PM UTC 36
90.57
GitHub Action Run
Source Files on build 11088091654
  • Tree
  • List 105
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #11088091654
  • 1aae9dab on github
  • Prev Build on main (#11072475500)
  • Next Build on main (#11088095120)
  • 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