dart-archive / vm_service_client

A Darty client for the VM service protocol
https://pub.dev/packages/vm_service_client
BSD 3-Clause "New" or "Revised" License
12 stars 19 forks source link

Fix strong mode warnings #8

Closed dramos07 closed 8 years ago

googlebot commented 8 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


dramos07 commented 8 years ago

I signed it!

googlebot commented 8 years ago

CLAs look good, thanks!

nex3 commented 8 years ago

Done reviewing!

nex3 commented 8 years ago

I patched this in and ran the analyzer against it, and I'm still seeing a bunch of warnings:

[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMBreakpoint> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/breakpoint.dart, line 100, col 16)
[warning] Unsound implicit cast from Future<dynamic> to Future<VMBreakpoint> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/breakpoint.dart, line 140, col 12)
[warning] Unsound implicit cast from dynamic to List<VMFlag> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/flag.dart, line 16, col 15)
[warning] Unsound implicit cast from TypedData to T (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/instance.dart, line 791, col 17)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMIsolateRef> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/isolate.dart, line 141, col 17)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<String> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/isolate.dart, line 146, col 25)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMPauseEvent> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/isolate.dart, line 151, col 24)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMBreakpoint> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/isolate.dart, line 156, col 26)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<List<int>> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/isolate.dart, line 161, col 15)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<List<int>> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/isolate.dart, line 167, col 15)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMExtensionEvent> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/isolate.dart, line 172, col 25)
[warning] Unsound implicit cast from Future<dynamic> to Future<VMRunnableIsolate> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/isolate.dart, line 193, col 12)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMExtensionEvent> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/isolate.dart, line 251, col 12)
[warning] Unsound implicit cast from dynamic to Iterable<String> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/isolate.dart, line 432, col 50)
[warning] Unsound implicit cast from dynamic to List<List<int>> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/script.dart, line 177, col 27)
[warning] Unsound implicit cast from dynamic to Iterable<int> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/source_report.dart, line 96, col 30)
[warning] Unsound implicit cast from dynamic to Iterable<int> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/source_report.dart, line 100, col 30)
[warning] Unsound implicit cast from dynamic to Iterable<int> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/source_report.dart, line 104, col 30)
[warning] Unsound implicit cast from Map<dynamic, dynamic> to Map<String, VMScript> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/stack.dart, line 45, col 51)
[warning] Unsound implicit cast from dynamic to StreamController<Map<dynamic, dynamic>> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/stream_manager.dart, line 136, col 12)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMRef> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/src/vm.dart, line 47, col 17)
[warning] Unsound implicit cast from IOWebSocketChannel to StreamChannel<String> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/vm_service_client.dart, line 121, col 32)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMIsolateRef> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/vm_service_client.dart, line 145, col 23)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMIsolateRef> (/usr/local/google/home/nweiz/goog/pkg/vm_service_client/lib/vm_service_client.dart, line 150, col 26)

(This was with the bleeding-edge analyzer, but I'm seeing similar warnings with stable).

dramos07 commented 8 years ago

So I only covered the strong mode errors in this request not warnings, but I guess I could try to do the warnings in a different request.

nex3 commented 8 years ago

@dramos07 Please do. Usually when we mark a package "strong-mode clean", we want all the warnings gone as well.