Skip to content

[coverage] Use getVersion() when pinging the service API - #2902

Merged
liamappelbe merged 2 commits into
mainfrom
coverage_cheaper_ping
Nov 19, 2026
Merged

liamappelbe merged 2 commits into
mainfrom
coverage_cheaper_ping

Conversation

@liamappelbe

Copy link
Copy Markdown
Contributor

We're calling getVM() repeatedly to wait for the VM service API to become available. Turns out that's an expensive call. getVersion() is much cheaper. dart-lang/sdk#64965

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the connection check in pkgs/coverage/lib/src/collect.dart to call service.getVersion() instead of service.getVM() when checking the service availability with a timeout. There are no review comments provided, and I have no additional feedback to offer.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

PR Health

Publish ✔️
Package Version Status Publish tag (post-merge)
package:coverage ⭐ 1.16.2-wip WIP (no publish necessary)
  • 16 already published.
  • 26 WIP (no publish necessary).

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

This check can be disabled by tagging the PR with skip-publish-check.

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check (for example, for non-user-visible changes when the package version is already at -wip).

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
coverage None 1.16.1 1.16.2-wip 1.16.2-wip ✔️

This check can be disabled by tagging the PR with skip-breaking-check.

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.

Package Leaked API symbol Leaking sources

This check can be disabled by tagging the PR with skip-leaking-check.

Unused Dependencies ✔️
Package Status
coverage ✔️ All dependencies utilized correctly.

For details on how to fix these, see dependency_validator.

This check can be disabled by tagging the PR with skip-unused-dependencies-check.

License Headers ✔️
// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/html/test/differential_test.dart
pkgs/html/test/dom_parsing_test.dart
pkgs/html/test/mxss_test.dart
pkgs/html/test/noah_ark_clause_limit_test.dart

This check can be disabled by tagging the PR with skip-license-check.

Coverage ✔️
File Coverage
pkgs/coverage/lib/src/collect.dart 💚 86 %

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.

@liamappelbe
liamappelbe marked this pull request as ready for review November 19, 2026 00:15
@liamappelbe
liamappelbe requested a review from a team as a code owner November 19, 2026 00:15
@liamappelbe
liamappelbe requested a review from kevmoo November 19, 2026 00:15

@kevmoo kevmoo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Sure that getVersion has been around for the dependency range you have? That's my only question (unverified)

@liamappelbe

Copy link
Copy Markdown
Contributor Author

Awesome! Sure that getVersion has been around for the dependency range you have? That's my only question (unverified)

Good question. Yeah, git blame says getVersion has existed for 11 years 😆

@liamappelbe
liamappelbe merged commit eb4ce10 into main Nov 19, 2026
28 checks passed
@liamappelbe
liamappelbe deleted the coverage_cheaper_ping branch November 19, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants