-
Notifications
You must be signed in to change notification settings - Fork 16k
Use generic Marshal.SizeOf when possible #21964
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
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
@JasonLunn @YarinOmesi - it looks like #19667 caused this regression with native AOT. Is there any way this PR could get merged to unblock the AOT issue? |
|
I think this is a pretty good solution. |
|
@JasonLunn - What is the process for getting this change merged? Are there C# owners/contributors in this project that could review and get the change merged? |
|
I can't speak to whether this will fix any AOT issues, but it at worst looks harmless. |
|
(Assigned back to @googleberg for the next step.) |
|
@ThadHouse Tests seem to be failing. You may need to rebase. |
|
d876617 to
a12294e
Compare
|
Rebased anyway, but as said it seems like tests were just not running due to being external. |
|
Looks like this got stuck at some point after it was approved and likely got garbage collected. Giving this a kick now to see if we can get this submitted. Feel free to follow up if this seems to get stuck again. |
85507b9 introduced a new call to Marshal.Sizeof(Type). This call is not AOT compatible, which is a regression as prior versions were AOT compatible, even if not directly supported. This conditionally uses the generic version of Marshal.SizeOf, which is AOT compatible to fix the issue. Closes #21824 Closes #21964 COPYBARA_INTEGRATE_REVIEW=#21964 from ThadHouse:genericsizeof a12294e FUTURE_COPYBARA_INTEGRATE_REVIEW=#21964 from ThadHouse:genericsizeof a12294e PiperOrigin-RevId: 818676280
85507b9 introduced a new call to Marshal.Sizeof(Type). This call is not AOT compatible, which is a regression as prior versions were AOT compatible, even if not directly supported. This conditionally uses the generic version of Marshal.SizeOf, which is AOT compatible to fix the issue. Closes #21824 Closes #21964 COPYBARA_INTEGRATE_REVIEW=#21964 from ThadHouse:genericsizeof a12294e FUTURE_COPYBARA_INTEGRATE_REVIEW=#21964 from ThadHouse:genericsizeof a12294e PiperOrigin-RevId: 818676280
|
Was the fix for this expected to be in the 3.33.0 release? After getting a renovate PR for the version bump, I'm still getting this error in CI: |
|
Looks like it didn't. The NuGet package was built from a79f2d2, and that line of code is still:
|
|
Looks like this just barely missed the branch cut for v33.0 unforutnately, but I'll flag this for the v33.2 patch. |
85507b9 introduced a new call to Marshal.Sizeof(Type). This call is not AOT compatible, which is a regression as prior versions were AOT compatible, even if not directly supported. This conditionally uses the generic version of Marshal.SizeOf, which is AOT compatible to fix the issue. Closes #21824 Closes #21964 COPYBARA_INTEGRATE_REVIEW=#21964 from ThadHouse:genericsizeof a12294e PiperOrigin-RevId: 818694739
|
We should be patching this in v33.2 ~this week. |
85507b9 introduced a new call to Marshal.Sizeof(Type). This call is not AOT compatible, which is a regression as prior versions were AOT compatible, even if not directly supported. This conditionally uses the generic version of Marshal.SizeOf, which is AOT compatible to fix the issue. Closes #21824 Closes #21964 COPYBARA_INTEGRATE_REVIEW=#21964 from ThadHouse:genericsizeof a12294e PiperOrigin-RevId: 818694739 Co-authored-by: Thad House <[email protected]>
85507b9 introduced a new call to Marshal.Sizeof(Type). This call is not AOT compatible, which is a regression as prior versions were AOT compatible, even if not directly supported.
This conditionally uses the generic version of Marshal.SizeOf, which is AOT compatible to fix the issue.
Closes #21824