EventStore / EventStore-Client-Dotnet

Dotnet Client SDK for the Event Store gRPC Client API written in C#
Other
140 stars 38 forks source link

Add .NET Standard 2.0 support #228

Closed Salgat closed 1 year ago

Salgat commented 1 year ago

This allows .NET Framework and older .NET Core versions (such as .NET Core 2.2) to be supported (including addressing #181).

Since much of the existing compiler directives for .NET Core 3.1 also applied to .NET Standard 2.0, I combined them (the .NET Core 3.1 test project now references the .NET Standard 2.0 version of the EventStore libraries). Unfortunately a few things had to be changed such as removing the newer range syntax. Passing all github action tests on my local branch PR.

thefringeninja commented 1 year ago

We cannot accept this PR at this time. We removed support for net48 as there was an issue around streaming calls being open while we requested channel shutdown: a deadlock occurs when disposing the client.

In addition, development on Grpc.Core is in maintenance mode.

Using the netstandard2.0 target should mean that grpc-dotnet is used but there are additional issues:

Our tests spin up a new container per test fixture to ensure deterministic tests on the $all stream. It might be possible to rewrite all the tests to use a single container instance via service containers.

Lastly, there are additional restrictions around WinHttpHandler:

Without these types of calls neither appending to streams nor persistent subscriptions would work. So this PR would have to both introduce unary replacements for these calls and patch ESDB to implement them.

Salgat commented 1 year ago

Looking at the gRPC requirements, it does seem that HTTP/2 is a hard blocker for older support. Thank you for the detailed explanation João!