Skip to content
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

Fix tests for net6.0 #6

Closed
Miista opened this issue Jan 12, 2024 · 2 comments · Fixed by #5
Closed

Fix tests for net6.0 #6

Miista opened this issue Jan 12, 2024 · 2 comments · Fixed by #5
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Miista
Copy link
Owner

Miista commented Jan 12, 2024

For some reason the test "Can_rewrite_static_method" seems to fail only when targeting net6.0 or greater.

It seems to be caused by not handling InlineSig opcode.

This was also reported here: tonerdo/pose#30

@Miista Miista added the bug Something isn't working label Jan 12, 2024
@Miista Miista mentioned this issue Jan 13, 2024
Miista pushed a commit that referenced this issue Jan 13, 2024
In .NET 8 the method has been moved to RuntimeILGenerator which is an internal class.
Thus the unsafe lookup of the type.

Please note that we still suffer from the same issue as described in #6.

Closes #8
@Miista
Copy link
Owner Author

Miista commented Jan 13, 2024

It seems to be caused by the use of unsafe code.

We only discovered this because in .NET 6 DateTime.UtcNow now invokes unsafe code whereas it did not in .NET Framework 4.8. I'm tracking support for unsafe code in #9.

Miista pushed a commit that referenced this issue Jan 13, 2024
@Miista Miista self-assigned this Jan 13, 2024
@Miista
Copy link
Owner Author

Miista commented Jan 13, 2024

I got the immediate issue fixed by changing the test to not use DateTime.UtcNow (which calls into unsafe unmanaged code).

@Miista Miista linked a pull request Jan 14, 2024 that will close this issue
@Miista Miista added this to the v2.0 milestone Jan 17, 2024
@Miista Miista closed this as completed in #5 Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant