FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use Mono.RuntimeStructs rather than Mono.Runtime to test if app is running on Mono runtime by takeshik · Pull Request #1573 · MessagePack-CSharp/MessagePack-CSharp · GitHub

Use Mono.RuntimeStructs rather than Mono.Runtime to test if app is running on Mono runtime - #1573

Merged
AArnott merged 1 commit into
MessagePack-CSharp:masterfrom
takeshik:fix-MonoProtection-on-newer-mono-vm
Mar 13, 2023
Merged

AArnott merged 1 commit into
MessagePack-CSharp:masterfrom
takeshik:fix-MonoProtection-on-newer-mono-vm

Conversation

Copy link
Copy Markdown
Contributor

In newer versions of .NET (6 or later), Mono runtime is still used for some targets like mobile OSes, rather than CoreCLR.
However, currently, Mono.Runtime class does not exist in latest Mono-flavored System.Private.CoreLib library.

This causes the problem of MonoProtection (introduced by #1035) not being enabled unintentionally.
The bug in Mono that is the cause of introducing MonoProtection is not fixed yet so MonoProtection is still needed.

Mono.RuntimeStructs is one of the types which exist in both the older Mono and newer Mono.
So this pullreq modifies to use this type to determine the current runtime rather than Mono.Runtime.

Other projects like BenchmarkDotnet also uses Mono.RuntimeStructs to make decisions.

In newer versions of .NET (6 or later), Mono.Runtime does not exist even
if the runtime is Mono. Mono.RuntimeStructs is one of the types which is
existed both older and newer Mono.

AArnott left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks

AArnott added this to the v2.5 milestone Mar 13, 2023
AArnott merged commit 1d322ca into MessagePack-CSharp:master Mar 13, 2023
takeshik deleted the fix-MonoProtection-on-newer-mono-vm branch March 13, 2023 23:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL