Roll package:dds to 1.7.3 and add error handling for VM service disappearing (#74272)

This commit is contained in:
Ben Konyi 2021-01-20 10:49:13 -08:00 committed by GitHub
parent 914c9aa304
commit e2e3976a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 7 deletions

View File

@ -31,7 +31,7 @@ dependencies:
coverage: 0.14.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 0.14.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
csslib: 0.16.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" csslib: 0.16.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dds: 1.7.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dds: 1.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
devtools: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" devtools: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
devtools_server: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" devtools_server: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
devtools_shared: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" devtools_shared: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -96,4 +96,4 @@ dev_dependencies:
node_preamble: 1.4.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 1.4.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: e6e5 # PUBSPEC CHECKSUM: f0e6

View File

@ -66,6 +66,7 @@ const Map<String, String> _kManuallyPinnedDependencies = <String, String>{
'url_launcher': '6.0.0-nullsafety.1', 'url_launcher': '6.0.0-nullsafety.1',
'connectivity': '3.0.0-nullsafety.1', 'connectivity': '3.0.0-nullsafety.1',
'device_info': '2.0.0-nullsafety.1', 'device_info': '2.0.0-nullsafety.1',
'camera': '0.6.4+5',
}; };
class UpdatePackagesCommand extends FlutterCommand { class UpdatePackagesCommand extends FlutterCommand {

View File

@ -34,7 +34,8 @@ typedef PrintStructuredErrorLogMethod = void Function(vm_service.Event);
WebSocketConnector _openChannel = _defaultOpenChannel; WebSocketConnector _openChannel = _defaultOpenChannel;
/// The error codes for the JSON-RPC standard. /// The error codes for the JSON-RPC standard, including VM service specific
/// error codes.
/// ///
/// See also: https://www.jsonrpc.org/specification#error_object /// See also: https://www.jsonrpc.org/specification#error_object
abstract class RPCErrorCodes { abstract class RPCErrorCodes {
@ -49,6 +50,11 @@ abstract class RPCErrorCodes {
/// Application specific error codes. /// Application specific error codes.
static const int kServerError = -32000; static const int kServerError = -32000;
/// Non-standard JSON-RPC error codes:
/// The VM service or extension service has disappeared.
static const int kServiceDisappeared = 112;
} }
/// A function that reacts to the invocation of the 'reloadSources' service. /// A function that reacts to the invocation of the 'reloadSources' service.
@ -718,8 +724,10 @@ extension FlutterVmService on vm_service.VmService {
); );
return response.json; return response.json;
} on vm_service.RPCError catch (err) { } on vm_service.RPCError catch (err) {
// If an application is not using the framework // If an application is not using the framework or the VM service
if (err.code == RPCErrorCodes.kMethodNotFound) { // disappears while handling a request, return null.
if ((err.code == RPCErrorCodes.kMethodNotFound)
|| (err.code == RPCErrorCodes.kServiceDisappeared)) {
return null; return null;
} }
rethrow; rethrow;

View File

@ -10,7 +10,7 @@ dependencies:
# To update these, use "flutter update-packages --force-upgrade". # To update these, use "flutter update-packages --force-upgrade".
archive: 2.0.13 archive: 2.0.13
args: 1.6.0 args: 1.6.0
dds: 1.7.2 dds: 1.7.3
dwds: 7.1.1 dwds: 7.1.1
completion: 0.2.3 completion: 0.2.3
coverage: 0.14.2 coverage: 0.14.2
@ -110,4 +110,4 @@ dartdoc:
# Exclude this package from the hosted API docs. # Exclude this package from the hosted API docs.
nodoc: true nodoc: true
# PUBSPEC CHECKSUM: c7c3 # PUBSPEC CHECKSUM: 4cc4