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

Strong mode issues #9

Closed har79 closed 7 years ago

har79 commented 7 years ago

> dartanalyzer --strong . | sort | uniq

109 errors, 273 warnings and 1 hint found.
Analyzing [.]...
[error] Could not infer type parameter E, VMIsolateRef must be of type VMRunnableIsolate. (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 549, col 10)
[error] The argument type 'IOWebSocketChannel' cannot be assigned to the parameter type 'StreamChannel<String>'. (/usr/local/google/home/hcameron/github/vm_service_client/lib/vm_service_client.dart, line 121, col 32)
[error] The argument type 'LineSplitter' cannot be assigned to the parameter type 'Converter<String, dynamic>'. (/usr/local/google/home/hcameron/github/vm_service_client/test/utils.dart, line 13, col 33)
[error] The getter 'arguments' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 337, col 29)
[error] The getter 'associations' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 218, col 20)
[error] The getter 'associations' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 219, col 20)
[error] The getter 'associations' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 221, col 20)
[error] The getter 'associations' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 223, col 20)
[error] The getter 'associations' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 225, col 20)
[error] The getter 'breakpoints' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/breakpoint_test.dart, line 144, col 13)
[error] The getter 'breakpoints' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/breakpoint_test.dart, line 162, col 19)
[error] The getter 'breakpoints' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 33, col 20)
[error] The getter 'context' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 321, col 20)
[error] The getter 'context' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 323, col 33)
[error] The getter 'elements' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 191, col 20)
[error] The getter 'error' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 32, col 20)
[error] The getter 'function' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 320, col 20)
[error] The getter 'isCaseSensitive' is not defined for the class 'VMRegExpInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 280, col 20)
[error] The getter 'isCaseSensitive' is not defined for the class 'VMRegExpInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 302, col 20)
[error] The getter 'isMultiLine' is not defined for the class 'VMRegExpInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 281, col 20)
[error] The getter 'isMultiLine' is not defined for the class 'VMRegExpInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 303, col 20)
[error] The getter 'isValueTruncated' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 159, col 20)
[error] The getter 'length' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 186, col 20)
[error] The getter 'length' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 213, col 20)
[error] The getter 'length' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 245, col 20)
[error] The getter 'libraries' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 35, col 20)
[error] The getter 'livePorts' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 30, col 20)
[error] The getter 'name' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 333, col 20)
[error] The getter 'pauseEvent' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 31, col 20)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 279, col 22)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 288, col 22)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 297, col 22)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 34, col 20)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/breakpoint_test.dart, line 106, col 48)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/breakpoint_test.dart, line 138, col 48)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/breakpoint_test.dart, line 158, col 48)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/breakpoint_test.dart, line 177, col 48)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/breakpoint_test.dart, line 199, col 48)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/breakpoint_test.dart, line 33, col 48)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/breakpoint_test.dart, line 72, col 48)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/class_test.dart, line 29, col 32)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/class_test.dart, line 54, col 32)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/code_test.dart, line 25, col 35)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/field_test.dart, line 23, col 32)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/field_test.dart, line 27, col 44)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/field_test.dart, line 39, col 54)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/field_test.dart, line 51, col 32)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/field_test.dart, line 68, col 54)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/function_test.dart, line 24, col 37)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/function_test.dart, line 46, col 34)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/function_test.dart, line 69, col 34)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/function_test.dart, line 93, col 35)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/function_test.dart, line 96, col 13)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 350, col 24)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/library_test.dart, line 30, col 27)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/library_test.dart, line 61, col 33)
[error] The getter 'rootLibrary' is not defined for the class 'VMIsolate'. (/usr/local/google/home/hcameron/github/vm_service_client/test/library_test.dart, line 76, col 31)
[error] The getter 'startTime' is not defined for the class 'VMIsolateRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 29, col 37)
[error] The getter 'typeClass' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 334, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/frame_test.dart, line 45, col 18)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 102, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 103, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 104, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 105, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 106, col 60)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 108, col 24)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 115, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 116, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 117, col 60)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 119, col 24)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 126, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 127, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 128, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 129, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 130, col 60)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 132, col 24)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 147, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 149, col 24)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 151, col 24)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 158, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 253, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 66, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 75, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 84, col 20)
[error] The getter 'value' is not defined for the class 'VMInstanceRef'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 93, col 20)
[error] The getter 'value' is not defined for the class 'VMInstance'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 150, col 35)
[error] The getter 'value' is not defined for the class 'VMInstance'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 163, col 35)
[error] The getter 'value' is not defined for the class 'VMInstance'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 67, col 35)
[error] The getter 'value' is not defined for the class 'VMInstance'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 76, col 35)
[error] The getter 'value' is not defined for the class 'VMInstance'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 85, col 35)
[error] The getter 'value' is not defined for the class 'VMInstance'. (/usr/local/google/home/hcameron/github/vm_service_client/test/instance_test.dart, line 94, col 35)
[error] The getter 'value' is not defined for the class 'VMInstance'. (/usr/local/google/home/hcameron/github/vm_service_client/test/message_test.dart, line 39, col 18)
[hint] Dead code (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 166, col 9)
[warning] Unsound implicit cast from dynamic to Iterable<int> (/usr/local/google/home/hcameron/github/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/hcameron/github/vm_service_client/lib/src/source_report.dart, line 104, col 30)
[warning] Unsound implicit cast from dynamic to Iterable<int> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/source_report.dart, line 96, col 30)
[warning] Unsound implicit cast from dynamic to Iterable<String> (/usr/local/google/home/hcameron/github/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/hcameron/github/vm_service_client/lib/src/script.dart, line 177, col 27)
[warning] Unsound implicit cast from dynamic to List<VMFlag> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/flag.dart, line 16, col 15)
[warning] Unsound implicit cast from dynamic to StreamController<Map<dynamic, dynamic>> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/stream_manager.dart, line 136, col 12)
[warning] Unsound implicit cast from Function to (dynamic) → void (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 45, col 25)
[warning] Unsound implicit cast from Function to (dynamic) → void (/usr/local/google/home/hcameron/github/vm_service_client/test/utils.dart, line 72, col 17)
[warning] Unsound implicit cast from Function to (List<int>) → void (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 120, col 27)
[warning] Unsound implicit cast from Function to (List<int>) → void (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 121, col 27)
[warning] Unsound implicit cast from Function to (VMIsolateRef) → void (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 65, col 29)
[warning] Unsound implicit cast from Function to (VMPauseEvent) → void (/usr/local/google/home/hcameron/github/vm_service_client/test/breakpoint_test.dart, line 84, col 36)
[warning] Unsound implicit cast from Function to (VMPauseEvent) → void (/usr/local/google/home/hcameron/github/vm_service_client/test/isolate_test.dart, line 89, col 36)
[warning] Unsound implicit cast from Future<dynamic> to Future<VMBreakpoint> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/breakpoint.dart, line 140, col 12)
[warning] Unsound implicit cast from Future<dynamic> to Future<VMRunnableIsolate> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/isolate.dart, line 193, col 12)
[warning] Unsound implicit cast from Map<dynamic, dynamic> to Map<String, VMScript> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/stack.dart, line 45, col 51)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<List<int>> (/usr/local/google/home/hcameron/github/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/hcameron/github/vm_service_client/lib/src/isolate.dart, line 167, col 15)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<String> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/isolate.dart, line 146, col 25)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMBreakpoint> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/breakpoint.dart, line 100, col 16)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMBreakpoint> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/isolate.dart, line 156, col 26)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMExtensionEvent> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/isolate.dart, line 172, col 25)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMExtensionEvent> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/isolate.dart, line 251, col 12)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMIsolateRef> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/isolate.dart, line 141, col 17)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMIsolateRef> (/usr/local/google/home/hcameron/github/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/hcameron/github/vm_service_client/lib/vm_service_client.dart, line 150, col 26)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMPauseEvent> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/isolate.dart, line 151, col 24)
[warning] Unsound implicit cast from Stream<dynamic> to Stream<VMRef> (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/vm.dart, line 47, col 17)
[warning] Unsound implicit cast from TypedData to T (/usr/local/google/home/hcameron/github/vm_service_client/lib/src/instance.dart, line 791, col 17)
har79 commented 7 years ago

[error] The argument type 'LineSplitter' cannot be assigned to the parameter type 'Converter<String, dynamic>'. (/usr/local/google/home/hcameron/github/vm_service_client/test/utils.dart, line 13, col 33) seems to be a result of https://github.com/dart-lang/sdk/issues/27722.

nex3 commented 7 years ago

Closed by 4af8f8e8e5376b3c9383fa0cdbf120b159f7d917.

har79 commented 7 years ago

That commit was a few months ago. This issue is about new strong mode errors introduced due to a new SDK/analyzer.

nex3 commented 7 years ago

What version of Dart are you seeing these errors on?

har79 commented 7 years ago

dartanalyzer version 1.20.0-dev.10.3

On Wed, 16 Nov 2016 at 13:40 Natalie Weizenbaum notifications@github.com wrote:

What version of Dart are you seeing these errors on?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dart-lang/vm_service_client/issues/9#issuecomment-261065045, or mute the thread https://github.com/notifications/unsubscribe-auth/AIREeD8d2ucS0RxFDrW-qc-FgTwWXO0Xks5q-2oxgaJpZM4KnPgQ .

nex3 commented 7 years ago

That's pretty old—1.20 stable was released in October. Try updating.

har79 commented 7 years ago

sigh looks like my repo/update settings got lost. Same output with 1.21.0-dev.3.0. I can update to -dev.6.0 if you thank that's likely to make a difference although isn't this just a case of the strong mode rules being tightened?

nex3 commented 7 years ago

I found the source of my confusion—the previous strong mode CL didn't add an .analysis_options file to ensure that future analysis runs had strong mode enabled. I can reproduce strong-mode warnings now.