rabbitmq / rabbitmq-dotnet-client

RabbitMQ .NET client for .NET Standard 2.0+ and .NET 4.6.2+
https://www.rabbitmq.com/dotnet.html
Other
2.09k stars 586 forks source link

Polyfill language gaps #1688

Closed danielmarbach closed 1 month ago

danielmarbach commented 1 month ago

Is your feature request related to a problem? Please describe.

Until #1424 is resolved, the library seems to target Netstandard2.0. If I understood the discussion correctly for v8 the team is willing to rediscuss the TFMs. Until then, is it reasonable to Polyfill language gaps with something like https://github.com/Sergio0694/PolySharp or https://github.com/SimonCropp/Polyfill/ (my preference but would require LangVersion=latest)? This would allow the library authors to use polyfilled language features even with Netstandard2.0.

Those libs would also polyfill nullable annotations, which means the Nullable reference could be removed.

Describe the solution you'd like

Using a Polyfilling library

Describe alternatives you've considered

Leaving as is

Additional context

No response

lukebakken commented 1 month ago

Is there something specific that this solves for v7?

danielmarbach commented 1 month ago

See https://github.com/rabbitmq/rabbitmq-dotnet-client/pull/1687#issuecomment-2377963224

Not strictly necessary but it opens the door for the lifetime of v7 to use newer language features in Netstandard2.0. The alternative is to manually polyfill every use case when it is needed.

lukebakken commented 1 month ago

I'm going to close this since it's not an absolute necessity to ship v7.