Repository navigation
fix(coverage): migrate subprocess spawning to package:cli_util - #2584
Conversation
kevmoo
commented
Sep 8, 2026
- Replace Platform.executable in bin/test_with_coverage.dart and lib/src/run_and_collect.dart with package:cli_util (dartExecutable ?? 'dart') to prevent infinite self-invocation loops under AOT compilation (dart compile exe / dart install).
- Add cli_util: ^0.6.0 dependency to pubspec.yaml and update CHANGELOG.md.
- Replace Platform.executable in bin/test_with_coverage.dart and lib/src/run_and_collect.dart with package:cli_util (dartExecutable ?? 'dart') to prevent infinite self-invocation loops under AOT compilation (dart compile exe / dart install). - Add cli_util: ^0.6.0 dependency to pubspec.yaml and update CHANGELOG.md.
Package publishingIf you have publishing permissions, you can use the links below to publish the changes after merging this PR.
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
There was a problem hiding this comment.
Code Review
This pull request migrates Dart subprocess spawning from using Platform.executable to using package:cli_util's dartExecutable ?? 'dart' in order to support AOT-compiled executables. This change is implemented in test_with_coverage.dart and run_and_collect.dart, with cli_util added as a dependency in pubspec.yaml. There are no review comments, and I have no feedback to provide.
PR HealthLicense Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
This check can be disabled by tagging the PR with Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with Breaking changes ✔️
This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with Unused Dependencies ✔️
For details on how to fix these, see dependency_validator. This check can be disabled by tagging the PR with
Coverage
|
| File | Coverage |
|---|---|
| pkgs/coverage/bin/test_with_coverage.dart | 💔 Not covered |
| pkgs/coverage/lib/src/run_and_collect.dart | 💚 73 % ⬆️ 6 % |
This check for test coverage is informational (issues shown here will not fail the PR).
This check can be disabled by tagging the PR with skip-coverage-check.
…92972) Adds `cli_util` (`./third_party/dart/third_party/pkg/tools/pkgs/cli_util`) to `dependency_overrides` in `engine/src/flutter/pubspec.yaml`. Dart SDK commit https://dart-review.googlesource.com/c/sdk/+/551940 rolled `tools_rev` to include dart-lang/tools#2584, which added `package:cli_util` as a dependency of `package:coverage`. Because `engine/src/flutter/tools/pub_get_offline.py` runs `dart pub get --offline` against `engine/src/flutter/pubspec.yaml` (`_engine_workspace`), `cli_util` must be mapped in `dependency_overrides` for offline dependency resolution on the Dart-in-Flutter (HHH) builders and the Dart-to-Flutter roll. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.