grpc/grpc-dart

Server.create constructor is deprecated, need to update sample code

craiglabenz opened this issue · 4 comments

Existing sample code suggests creating servers like so:

grpc.Server.create(services: [RouteGuideService()])

But that seems like it should be updated to:

grpc.Server([RouteGuideService()])

Hmm, I am puzzled. It is the other way around and samples were in fact updated to use Server.create.

  /// Create a server for the given [services].
  @Deprecated('use Server.create() instead')
  Server(...);

We do need to update the basics guide though which is hosted in some other repo: https://grpc.io/docs/languages/dart/basics/

UP.
@mraleph , thanks for response. I think you should bump new version 3.2.0 from master. Because example correct with version in master, that uses Server.create() .

@mosuem could you take a look at releasing the new version? (maybe we can even use this as an opportunity to configure publishing from GitHub actions for this repo).

(I have created PR to update docs: grpc/grpc.io#1145)

All work fine, you can close issue. Thanks a lot!