The Wayback Machine - https://web.archive.org/web/20250825093836/https://github.com/mgravell/Pipelines.Sockets.Unofficial/pull/74
Skip to content

net7 cleanup and fix broken pinned/unmanaged flag detection #74

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
merged 13 commits into from
May 4, 2023
Merged

Conversation

mgravell
Copy link
Owner

@mgravell mgravell commented May 2, 2023

the primary change here is to make AOT work, by removing any ref-emit, evil poking, or usage of MakeGenericType/MakeGenericMethod. This last required removing some T : unmanaged constraints (which is why we were using generics, because those scenarios couldn't be known statically), instead using evilness to keep things working - not least, a re-implementation of MemoryMarshal.Cast<TFrom, TTo> without the TFrom : struct, TTo : struct constraints (runtime checked, though) using MemoryMarshal.CreateSpan (note: on down-level TFMs, uses MakeGenericMethod to use the inbuilt Cast method, but that's fine: we don't need AOT on those platforms)

also:

  • fix broken pinned/unmanaged flag detection
  • cleanup and account for drift

Copy link
Contributor

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

Nice work! This is awesome. Thanks for making this library AOT-compatible.

@mgravell
Copy link
Owner Author

mgravell commented May 3, 2023 via email

# Conflicts:
#	src/Pipelines.Sockets.Unofficial/Delegates.cs
@mgravell mgravell merged commit 0438f06 into main May 4, 2023
@mgravell mgravell deleted the cleanup branch May 4, 2023 14:45
@mgravell
Copy link
Owner Author

mgravell commented May 4, 2023

v2.2.8 should be available

@lukebakken
Copy link

lukebakken commented May 8, 2023

Thanks! I've been studying this and your other projects @mgravell to improve the RabbitMQ .NET client.

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