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

Regression in 0.2.2+3: scope.dart incorrectly assumes the JSON response is a `Map` #11

Closed yjbanov closed 7 years ago

yjbanov commented 7 years ago

Commit https://github.com/dart-lang/vm_service_client/commit/4af8f8e8e5376b3c9383fa0cdbf120b159f7d917#diff-f7a3e81cb53fbd15d3671c716af41a80 introduced a breaking change, which also seems to be an incorrect change. It forces the return type of sendRequest to be Map<String, dynamic>. That's not correct. The returned value could be any valid JSON value, including String, List, Map, etc.

This broke Flutter's devicelab test runner: https://github.com/flutter/flutter/blob/6cdab85d28c59f75e94fd8777f8825458eef6f82/dev/devicelab/lib/framework/runner.dart#L103

/cc @HansMuller @nex3