Skip to content

Commit

Permalink
Fix syntax issue with client interceptors feature in 19.2.0. (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
mraleph authored Nov 12, 2020
1 parent 0806fd7 commit f06208e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions protoc_plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 19.2.0+1

* Fix syntax error introduced by gRPC client interceptor changes.

## 19.2.0

* Support client interceptors for gRPC. Requires grpc package 2.8.0 or newer.
Expand Down
2 changes: 1 addition & 1 deletion protoc_plugin/lib/grpc_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class _GrpcMethod {
'return \$createStreamingCall(_\$$_dartName, request, options: options).single;');
} else if (!_clientStreaming && _serverStreaming) {
out.println(
'return \$createStreamingCall(_\$$_dartName, Stream.fromIterable([request]), options: options);');
'return \$createStreamingCall(_\$$_dartName, $_stream.fromIterable([request]), options: options);');
} else {
out.println(
'return \$createUnaryCall(_\$$_dartName, request, options: options);');
Expand Down
2 changes: 1 addition & 1 deletion protoc_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: protoc_plugin
version: 19.2.0
version: 19.2.0+1
description: Protoc compiler plugin to generate Dart code
homepage: https://github.com/dart-lang/protobuf

Expand Down
2 changes: 1 addition & 1 deletion protoc_plugin/test/goldens/grpc_service.pbgrpc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class TestClient extends $grpc.Client {
$grpc.ResponseStream<$0.Output> serverStreaming($0.Input request,
{$grpc.CallOptions options}) {
return $createStreamingCall(
_$serverStreaming, Stream.fromIterable([request]),
_$serverStreaming, $async.Stream.fromIterable([request]),
options: options);
}

Expand Down

0 comments on commit f06208e

Please sign in to comment.