google / google/protobuf.dart

Generated client calls should use more general Future over ResponseFuture

Open
#162 11 comments 14 reactions 0 assignees View on GitHub
feature request
Dominant language
Dart
Stars
572
Forks
196
Avg merge
1h 59m
Merged PRs (30d)
2

Description

Looking into https://github.com/grpc/grpc-dart/issues/114 it looks like clients currently generate calls that look like the following:

```dart
ResponseFuture sayHello(HelloRequest request,
{CallOptions options}) {
final call = $createCall(_$sayHello, new Stream.fromIterable([request]),
options: options);
return new ResponseFuture(call);
}
```

ResponseFuture is an implementation detail that only has private methods. Using this form makes writing mocks for generated clients harder. Is there any reason we couldn't replace ResponceFuture w/ Future in the generated signature?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.