Skip to content

Commit

Permalink
[Java.Interop] restore IL2035 suppression (#1195)
Browse files Browse the repository at this point in the history
c6e3893 introduced build warning(s) in Android projects:

	external/Java.Interop/src/Java.Interop/Java.Interop/JniRuntime.JniMarshalMemberBuilder.cs(33,4): warning IL2035: Java.Interop.JniRuntime.SetMarshalMemberBuilder(JniRuntime.CreationOptions): Unresolved assembly 'Java.Interop.Export' in 'DynamicDependencyAttribute'.
	external/Java.Interop/src/Java.Interop/Java.Interop/JniRuntime.JniMarshalMemberBuilder.cs(33,4): warning IL2035: Java.Interop.JniRuntime.SetMarshalMemberBuilder(JniRuntime.CreationOptions): Unresolved assembly 'Java.Interop.Export' in 'DynamicDependencyAttribute'.
	external/Java.Interop/src/Java.Interop/Java.Interop/JniRuntime.JniMarshalMemberBuilder.cs(33,4): warning IL2035: Java.Interop.JniRuntime.SetMarshalMemberBuilder(JniRuntime.CreationOptions): Unresolved assembly 'Java.Interop.Export' in 'DynamicDependencyAttribute'.
	external/Java.Interop/src/Java.Interop/Java.Interop/JniRuntime.JniMarshalMemberBuilder.cs(33,4): warning IL2035: Java.Interop.JniRuntime.SetMarshalMemberBuilder(JniRuntime.CreationOptions): Unresolved assembly 'Java.Interop.Export' in 'DynamicDependencyAttribute'.

One of these appear per-RID.

Partially revert c6e3893 to restore the IL2035 suppression that
was removed.
  • Loading branch information
jonathanpeppers authored Feb 20, 2024
1 parent c6e3893 commit ae65609
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public JniMarshalMemberBuilder MarshalMemberBuilder {
}

[DynamicDependency (DynamicallyAccessedMemberTypes.PublicParameterlessConstructor, "Java.Interop.MarshalMemberBuilder", "Java.Interop.Export")]
[UnconditionalSuppressMessage ("Trimming", "IL2035", Justification = "Java.Interop.Export.dll is not always present.")]
partial void SetMarshalMemberBuilder (CreationOptions options)
{
if (!options.UseMarshalMemberBuilder) {
Expand Down

0 comments on commit ae65609

Please sign in to comment.