From cb1c0ea8b3339e3497ca5d9abbbc8387dc085938 Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Tue, 3 Nov 2020 14:21:04 +0100 Subject: [PATCH] Update pubspec.yaml, CHANGELOG.md and expand deprecation notice (#378) * Opt grpc_web_server.dart out of NNBD. --- CHANGELOG.md | 10 ++++++++++ lib/src/client/client.dart | 7 ++++++- pubspec.yaml | 2 +- test/grpc_web_server.dart | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7107ccf..fe0a5a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 2.8.0-dev + +* Added support for client interceptors, which can be configured through + `Client` constructor's `interceptors` parameter. Interceptors will be + executed by `Client.$createStreamingCall` and `Client.$createUnaryCall`. + Using interceptors requires regenerating client stubs using version 19.2.0 or + newer of protobuf compiler plugin. +* `Client.$createCall` is deprecated because it does not invoke client + interceptors. + ## 2.7.0 * Added decoding/parsing of `grpc-status-details-bin` to pass all response diff --git a/lib/src/client/client.dart b/lib/src/client/client.dart index 8df4a45..1b843f4 100644 --- a/lib/src/client/client.dart +++ b/lib/src/client/client.dart @@ -31,7 +31,12 @@ class Client { : _options = options ?? CallOptions(), _interceptors = List.unmodifiable(interceptors ?? Iterable.empty()); - @Deprecated('createCall will be removed as it does not support interceptors') + @Deprecated(r'''This method does not invoke interceptors and is superseded +by $createStreamingCall and $createUnaryCall which invoke interceptors. + +If you are getting this warning in autogenerated protobuf client stubs, +regenerate these stubs using protobuf compiler plugin version 19.2.0 or newer. +''') ClientCall $createCall( ClientMethod method, Stream requests, {CallOptions options}) { diff --git a/pubspec.yaml b/pubspec.yaml index d6c6fb6..63605ff 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: grpc description: Dart implementation of gRPC, a high performance, open-source universal RPC framework. -version: 2.7.0 +version: 2.8.0-dev homepage: https://github.com/dart-lang/grpc-dart diff --git a/test/grpc_web_server.dart b/test/grpc_web_server.dart index 43c63cb..451fd00 100644 --- a/test/grpc_web_server.dart +++ b/test/grpc_web_server.dart @@ -1,3 +1,4 @@ +// @dart = 2.3 import 'dart:async'; import 'dart:convert'; import 'dart:io';