Skip to content

Enable IAsyncEnumerable for netframework #1131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

chrbauer
Copy link
Contributor

No description provided.

@@ -45,9 +45,11 @@
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.6" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thoughts on this

Since this is to enable a single extension method that can be written by the user, maybe it would make sense to forgo adding the Bcl.AsyncInterfaces and let the user create the extension method when needed? Is there any downside adding this dependency that are currently overlooked?

Alternatively, adding this would make it easier to add the IAsyncEnumerable extensions methods on more sockets/use cases.

Personally, I added a few extensions methods with IAsyncEnumerable in my projects but their usecases are probably such that I wouldn't use/depend on those offered by NetMQ.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting.

My view: The idea of this pull request is to remove a difference between NET and NETFramework. The additional dependency is only added for NETFramework.

Some addition info: https://stackoverflow.com/questions/56651472/does-c-sharp-8-support-the-net-framework

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no clear right answer here. Dependencies shouldn't be added lightly, but the commonality between targets has real value.

If a user on framework upgrades but doesn't ship the new DLL, things will work correctly so long as they don't call these methods, so I think that's ok.

Let's add this. It does seem to simplify things overall.

@drewnoakes drewnoakes merged commit 87dff51 into zeromq:master Jun 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants