diff --git a/lib/src/http.dart b/lib/src/http.dart index 416f87f73..7d131e401 100644 --- a/lib/src/http.dart +++ b/lib/src/http.dart @@ -66,9 +66,9 @@ class _PubHttpClient extends http.BaseClient { var streamedResponse; try { streamedResponse = await _inner.send(request); - } on SocketException catch (error, stackTrace) { + } on SocketException catch (error, stackTraceOrNull) { // Work around issue 23008. - if (stackTrace == null) stackTrace = new Chain.current(); + var stackTrace = stackTraceOrNull ?? new Chain.current(); if (error.osError == null) rethrow; diff --git a/pubspec.yaml b/pubspec.yaml index 2216c75ea..f7a51037a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,9 +3,9 @@ name: pub dependencies: # Note: Pub's test infrastructure assumes that any dependencies used in tests # will be hosted dependencies. - analyzer: ">=0.25.0 <0.31.0" + analyzer: ^0.31.2-alpha.1 args: ">=0.13.5 <2.0.0" - async: ">=1.12.0 <3.0.0" + async: ^2.0.0 collection: "^1.8.0" crypto: ">=1.0.0 <3.0.0" http: "^0.11.0" @@ -19,7 +19,7 @@ dependencies: path: "^1.2.0" pool: "^1.0.0" pub_semver: "^1.3.0" - shelf: ">=0.6.0 <0.7.0" + shelf: ^0.7.0 source_span: "^1.4.0" stack_trace: "^1.0.0" yaml: "^2.0.0"