Nuget Grpc.Core package versions

Viewed 315

Noticed that there is a Grpc.Core nuget package v2.23.0. Few months ago I used (as I thought the latest package) v1.22.0. Checked GRPC releases, the latest now is v1.23.1. I would expect Grps.Core to correspond the grpc version.

Why the version was changed to 2... ? Are there any significant changes?

enter image description here

2 Answers

Why the version was changed to 2... ?

Because it took a breaking change, just for .NET.

Are there any significant changes?

Yes - for some users. There are two breaking changes:

  • The references to System.Collections.Generic.IAsyncEnumerator<T> (from System.Interactive.Async) have been removed
  • A new base class ChannelBase has been introduced

The first of these changes is because IAsyncEnumerator<T> is now part of the standard library, but it's different to the version in System.Interactive.Async. Basically the old version of Grpc.Core / Grpc.Core.Api wouldn't play nicely with that.

The second of the changes it to provide better commonality between the pure-.NET implementation (Grpc.Net.Common etc) and the existing Google implementation (Grpc.Core).

Many users - particularly those who don't use streaming calls - will be able to just rebuild. If you do use streaming calls, and particularly if you've abstracted them via IAsyncEnumerator<T>, you may need to do a bit of work to upgrade.

It's important to note that if you're using any dependencies that in turn depend on Grpc.Core 1.x, you cannot use Grpc.Core 2.x in the same project until those dependencies have updated. (For example, all the Google Cloud client libraries currently depend on 1.x. We're planning to take a major version bump ourselves before the end of 2019 to then depend on 2.x.)

There are details in proposal L57.

For those of you wondering how to compare the gRPC .NET releases to the gRPC core releases, this excerpt from the proposal mentioned in @JonSkeets's answer should help.

Therefore we will make both changes at the same time and release the next gRPC C# version as v2.23.0 (instead of v1.23.0).

We chose version v2.23.0 instead of v2.0.0 so that the minor version number can still be used for comparing how old a given release is relative to all other gRPC implementations. E.g. gRPC C# 2.24.x will be released together with gRPC C++ 1.24.x.

NO protocol changes are proposed between gRPC C# version 2.x and 1.x - both versions will be fully interoperable with each other and also with all other gRPC implementations.

Related