Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9137456&view=logs&j=96fd57f5-f69e-53c7-3d47-f67e6cf9b93e&s=1afc3bfe-122c-538b-e9ad-2a86c2efcfef&t=38f83f46-bc21-5edd-1614-e44f20babf10&l=29658

xamarin/xamarin-android now has a random build failure:

"Xamarin.Android.sln" (default target) (1:2) ->
"src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj" (default target) (28:9) ->
(CoreCompile target) ->
    src/Xamarin.Android.Build.Tasks/Utilities/MamJsonParser.cs(92,43): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]
    src/Xamarin.Android.Build.Tasks/Utilities/MamJsonParser.cs(92,81): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]
    src/Xamarin.Android.Build.Tasks/Utilities/MavenExtensions.cs(26,32): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]

It happens some percentage of the time... It appears the cause is the net8.0 Java.Interop.Tools.JavaCallableWrappers.dll is being used when the netstandard2.0 version should be used.

To fix this:

  • Don't build Java.Interop.Tools.JavaCallableWrappers.csproj for net8.0 anymore.

  • Introduce a new net8.0 Java.Interop.Tools.TypeNameMappings.csproj that isn't shipped or used. It can check trimmer warnings, though.

This partially reverts 67c079c and 56b7eeb.

Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9137456&view=logs&j=96fd57f5-f69e-53c7-3d47-f67e6cf9b93e&s=1afc3bfe-122c-538b-e9ad-2a86c2efcfef&t=38f83f46-bc21-5edd-1614-e44f20babf10&l=29658

xamarin/xamarin-android now has a random build failure:

    "Xamarin.Android.sln" (default target) (1:2) ->
    "src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj" (default target) (28:9) ->
    (CoreCompile target) ->
        src/Xamarin.Android.Build.Tasks/Utilities/MamJsonParser.cs(92,43): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]
        src/Xamarin.Android.Build.Tasks/Utilities/MamJsonParser.cs(92,81): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]
        src/Xamarin.Android.Build.Tasks/Utilities/MavenExtensions.cs(26,32): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]

It happens some percentage of the time... It appears the cause is the
`net8.0` `Java.Interop.Tools.JavaCallableWrappers.dll` is being used
when the `netstandard2.0` version should be used.

To fix this:

* Don't build `Java.Interop.Tools.JavaCallableWrappers.csproj` for
  `net8.0` anymore.

* Introduce a new `net8.0` `Java.Interop.Tools.TypeNameMappings.csproj`
  that isn't shipped or used. It can check trimmer warnings, though.

This partially reverts 67c079c and 56b7eeb.
@jonathanpeppers
Copy link
Member Author

Testing this at: dotnet/android#8751

@jonathanpeppers jonathanpeppers marked this pull request as ready for review February 26, 2024 19:03
@jonpryor jonpryor merged commit 14a9470 into main Feb 27, 2024
@jonpryor jonpryor deleted the JavaNativeTypeManagerAgain branch February 27, 2024 02:21
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants