dart coverage tool

76 views
Skip to first unread message

Daniel Davidson

unread,
Jun 2, 2016, 2:18:33 PM6/2/16
to Dart Misc
I'm trying to use the coverage tool and it fails with the below error.
I may not be using correctly... I first run the script with a port and the observatory flag and then the coverage collect script.

Also, why does the coverage package use dart_coveralls - which says is no longer supported instead of its own coverage library?

 
dart --observe=12345 test/runner.dart
 
pub global run coverage:collect_coverage --port=12345 -o coverage.json --resume-isolates
JSON-RPC error -32601 (method not found): Method not found
package:json_rpc_2/src/client.dart 99            Client.sendRequest
package:json_rpc_2/src/peer.dart 94              Peer.sendRequest
package:coverage/src/vm_service_client.dart 198  VMServiceClient.getCoverage.<async>
===== asynchronous gap ===========================
dart:async                                       Future.Future.microtask
package:coverage/src/vm_service_client.dart      VMServiceClient.getCoverage
package:coverage/src/collect.dart 41             _getAllCoverage.<async>
dart:async                                       _SyncCompleter.complete
package:vm_service_client/src/isolate.dart 232   VMIsolateRef.load.<async>
dart:async                                       _SyncCompleter.complete
package:vm_service_client/src/scope.dart 51      Scope.sendRequest.<async>
dart:async                                       _SyncCompleter.complete
package:json_rpc_2/src/client.dart 178           Client._handleSingleResponse
package:json_rpc_2/src/client.dart 168           Client._handleResponse
dart:async                                       _StreamController.add
package:json_rpc_2/src/peer.dart 117             Peer.listen.<fn>
===== asynchronous gap ===========================
dart:async                                       _asyncThenWrapperHelper
package:coverage/src/collect.dart                _getAllCoverage
package:coverage/src/collect.dart 26             collect.<async>
dart:async                                       _SyncCompleter.complete
package:coverage/src/util.dart 39                retry.<async>.<fn>.<async>
dart:async                                       _SyncCompleter.complete
package:coverage/src/vm_service_client.dart 90   VMServiceClient.connect.<async>
===== asynchronous gap ===========================
dart:async                                       _asyncThenWrapperHelper
package:coverage/src/collect.dart                collect
http://localhost:45261/collect_coverage.dart 21  main.<async>.<fn>.<async>
===== asynchronous gap ===========================
package:stack_trace                              Chain.capture

Don Olmstead

unread,
Jun 2, 2016, 2:25:49 PM6/2/16
to mi...@dartlang.org

--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

Chris Bracken

unread,
Jun 2, 2016, 2:35:59 PM6/2/16
to Dart Misc
I've just pushed v0.7.4 of package coverage, which includes support for Dart SDK 1.16.0 and above.

In Dart SDK 1.16.0 the old coverage APIs were removed from the VM service and replaced with a new implementation which is now an officially 'stable' API. The coverage package was originally built to work against JSON emitted by the (now-eliminated) --coverage-dir VM flag, then later over close to 14 revisions of the VM protocol and/or APIs. Things should be a lot more stable now that the API is official. 

With the elimination of the old APIs and the --coverage-dir VM flag, the JSON format is basically a historical artifact. The latest version includes a shim to return that format for existing users who require backward-compatibility, but we'll be deprecating it soon and providing a managed transition to a more straightforward 'all-in-one' tool, and eventually eliminating the JSON support.

Cheers,
Chris

--

Daniel Davidson

unread,
Jun 2, 2016, 4:36:29 PM6/2/16
to Dart Misc
Chris,

Thanks! Should the failed build reported by travis be a concern?
Reply all
Reply to author
Forward
0 new messages