Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit 0b258e7

Browse files
committed
Ben's comments
1 parent 7ce547d commit 0b258e7

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## 1.7.0
22

33
- Require Dart 3.0.0
4-
- Update `package:vm_service` constraints to '>=12.0.0 <13.0.0'.
4+
- Update `package:vm_service` constraints to '^12.0.0'.
55
- Add `coverableLineCache` parameter to `collect`. This allows the set of
66
coverable lines to be cached between calls to `collect`, avoiding the need to
77
force compile the same libraries repeatedly. This is only useful when running

lib/src/collect.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,8 @@ Future<List<Map<String, dynamic>>> _processSourceReport(
372372
// the lines that don't have a hit. Afterwards, add all the lines that were
373373
// hit or missed to the cache, so that the next coverage collection won't
374374
// need to compile this libarry.
375-
Set<int>? coverableLines;
376-
if (coverableLineCache != null) {
377-
coverableLines = coverableLineCache[scriptUriString] ??= <int>{};
378-
}
375+
final coverableLines =
376+
coverableLineCache?.putIfAbsent(scriptUriString, () => <int>{});
379377

380378
// Not returned in scripts section of source report.
381379
if (scriptUri.scheme == 'evaluate') continue;

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Coverage data manipulation and formatting
44
repository: https://github.com/dart-lang/coverage
55

66
environment:
7-
sdk: '>=3.0.0 <4.0.0'
7+
sdk: '^3.0.0'
88

99
dependencies:
1010
args: ^2.0.0
@@ -13,7 +13,7 @@ dependencies:
1313
path: ^1.8.0
1414
source_maps: ^0.10.10
1515
stack_trace: ^1.10.0
16-
vm_service: '>=12.0.0 <13.0.0'
16+
vm_service: '^12.0.0'
1717

1818
dev_dependencies:
1919
benchmark_harness: ^2.2.0

0 commit comments

Comments
 (0)