Discussion:
[dart-misc] dart coverage tool
Daniel Davidson
2016-06-02 18:18:33 UTC
Permalink
I'm trying to use the coverage <https://pub.dartlang.org/packages/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
<https://github.com/dart-lang/coverage/blob/master/tool/travis.sh#L24> -
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
http://localhost:45261/collect_coverage.dart 20 main.<async>
--
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+***@dartlang.org.
Don Olmstead
2016-06-02 18:25:45 UTC
Permalink
https://github.com/dart-lang/coverage/issues/107
Post by Daniel Davidson
I'm trying to use the coverage
<https://pub.dartlang.org/packages/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
<https://github.com/dart-lang/coverage/blob/master/tool/travis.sh#L24> -
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
http://localhost:45261/collect_coverage.dart 20 main.<async>
--
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
--
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+***@dartlang.org.
'Chris Bracken' via Dart Misc
2016-06-02 18:35:42 UTC
Permalink
I've just pushed v0.7.4 <https://pub.dartlang.org/packages/coverage> 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
Post by Daniel Davidson
I'm trying to use the coverage
<https://pub.dartlang.org/packages/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
<https://github.com/dart-lang/coverage/blob/master/tool/travis.sh#L24> -
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
http://localhost:45261/collect_coverage.dart 20 main.<async>
--
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
--
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+***@dartlang.org.
Daniel Davidson
2016-06-02 20:36:29 UTC
Permalink
Chris,

Thanks! Should the failed build reported by travis be a concern?
Post by 'Chris Bracken' via Dart Misc
I've just pushed v0.7.4 <https://pub.dartlang.org/packages/coverage> 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
Post by Daniel Davidson
I'm trying to use the coverage
<https://pub.dartlang.org/packages/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
<https://github.com/dart-lang/coverage/blob/master/tool/travis.sh#L24> -
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
http://localhost:45261/collect_coverage.dart 20 main.<async>
--
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
--
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+***@dartlang.org.
Loading...