-
Notifications
You must be signed in to change notification settings - Fork 220
Make all package:coverage imports conditional #2544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The `package:coverage` library imports `dart:io` directly and cannot be a dependency of apps compiled to platforms without `dart:io`. All imports and uses of `package:coverage` must be through platform specific imports. Add extra indirection in the `coverage.dart` and `coverage_stub.dart` libraries so that `engine.dart` does not need to import `package:coverage` or refer to the `HitMap` type it exports. Add a forwarding implementation of the `merge` extension.
This will unbreak the google3 build and unblock package rolls. |
PR HealthChangelog Entry ❗
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with |
health check is broken globally for now - will have to merge with failing CI. |
I believe @liamappelbe is the right person to review this. |
dcharkes
approved these changes
Sep 23, 2025
devoncarew
approved these changes
Sep 23, 2025
jakemac53
approved these changes
Sep 23, 2025
liamappelbe
approved these changes
Sep 23, 2025
copybara-service bot
pushed a commit
to dart-lang/sdk
that referenced
this pull request
Oct 6, 2025
Revisions updated by `dart tools/rev_sdk_deps.dart`. dartdoc (https://github.com/dart-lang/dartdoc/compare/669b15f..ec2a4fe): ec2a4fee 2025-10-06 dependabot[bot] Bump test_reflective_loader from 0.2.3 to 0.4.0 (dart-lang/dartdoc#4111) 2ec3e4ef 2025-10-02 Konstantin Scheglov Stop using TypeDefiningElement. (dart-lang/dartdoc#4112) f65c7e21 2025-10-01 dependabot[bot] Bump the github-actions group with 3 updates (dart-lang/dartdoc#4113) ecosystem (https://github.com/dart-lang/ecosystem/compare/36e514d..96ee861): 96ee861 2025-10-02 Devon Carew misc repo metadata updates (dart-lang/ecosystem#372) 0d7ffaa 2025-10-02 Moritz Rename comments (dart-lang/ecosystem#373) a3cf960 2025-10-01 dependabot[bot] Bump the github-actions group with 5 updates (dart-lang/ecosystem#374) test (https://github.com/dart-lang/test/compare/a16f149..8083c8f): 8083c8f2 2025-10-03 Nate Bosch Make all package:coverage imports conditional (dart-lang/test#2544) tools (https://github.com/dart-lang/tools/compare/ce9d2ad..6866f9b): 6866f9b1 2025-10-06 Morgan :) Allow more time for tests on Windows. (dart-lang/tools#2193) 1264445e 2025-10-06 Morgan :) Fix flaky test on Windows. (dart-lang/tools#2192) webdev (https://github.com/dart-lang/webdev/compare/0b2a408..29ba1b1): 29ba1b12 2025-10-01 dependabot[bot] Bump the github-actions group with 3 updates (dart-lang/webdev#2693) Change-Id: I9582b0380b2b974a2d05ab4f77c67c14e92aaa63 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/453580 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Auto-Submit: Devon Carew <devoncarew@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
package:coverage
library importsdart:io
directly and cannot bea dependency of apps compiled to platforms without
dart:io
. Allimports and uses of
package:coverage
must be through platform specificimports. Add extra indirection in the
coverage.dart
andcoverage_stub.dart
libraries so thatengine.dart
does not need toimport
package:coverage
or refer to theHitMap
type it exports. Adda forwarding implementation of the
merge
extension.