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

Commit

Permalink
Ben's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Oct 17, 2023
1 parent 7ce547d commit 0b258e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## 1.7.0

- Require Dart 3.0.0
- Update `package:vm_service` constraints to '>=12.0.0 <13.0.0'.
- Update `package:vm_service` constraints to '^12.0.0'.
- Add `coverableLineCache` parameter to `collect`. This allows the set of
coverable lines to be cached between calls to `collect`, avoiding the need to
force compile the same libraries repeatedly. This is only useful when running
Expand Down
6 changes: 2 additions & 4 deletions lib/src/collect.dart
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,8 @@ Future<List<Map<String, dynamic>>> _processSourceReport(
// the lines that don't have a hit. Afterwards, add all the lines that were
// hit or missed to the cache, so that the next coverage collection won't
// need to compile this libarry.
Set<int>? coverableLines;
if (coverableLineCache != null) {
coverableLines = coverableLineCache[scriptUriString] ??= <int>{};
}
final coverableLines =
coverableLineCache?.putIfAbsent(scriptUriString, () => <int>{});

// Not returned in scripts section of source report.
if (scriptUri.scheme == 'evaluate') continue;
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Coverage data manipulation and formatting
repository: https://github.com/dart-lang/coverage

environment:
sdk: '>=3.0.0 <4.0.0'
sdk: '^3.0.0'

dependencies:
args: ^2.0.0
Expand All @@ -13,7 +13,7 @@ dependencies:
path: ^1.8.0
source_maps: ^0.10.10
stack_trace: ^1.10.0
vm_service: '>=12.0.0 <13.0.0'
vm_service: '^12.0.0'

dev_dependencies:
benchmark_harness: ^2.2.0
Expand Down

0 comments on commit 0b258e7

Please sign in to comment.