xamarin / java.interop

Java.Interop provides open-source bindings of Java's Java Native Interface (JNI) for use with .NET managed languages such as C#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix known issues with NativeAOT

jonathanpeppers opened this issue · comments

Related: #1157

When setting $(EnableAotAnalyzer) to true, there are several warnings we will suppress for now. These will likely work under Mono, but will need to be fixed one day in .NET 10 or some future release that supports NativeAOT.

Ignoring AOT warnings like a reasonable place to start, so we can enable the analyzer and not introduce new warnings.

Creating an issue for now, so I can link to this issue from C# code comments.

Update

We'll probably actually suppress the warnings like:

// FIXME: https://github.com/xamarin/xamarin-android/issues/8724
// IL3050 disabled in source: if someone uses NativeAOT, they will get the warning.
#pragma warning disable IL3050
var dynamic = new DynamicMethod (DynamicMethodNameCounter.GetUniqueName (), ret_type, param_types, typeof (DynamicMethodNameCounter), true);
#pragma warning restore IL3050