dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.94k stars 533 forks source link

Add architecture info to the 0141 warning #9547

Open grendello opened 3 days ago

grendello commented 3 days ago

Partial fix for https://github.com/dotnet/android/issues/9544 to make the warning more informative. Architecture information is necessary as the nuget in question might have the same library for various architectures.

grendello commented 3 days ago

Do we have the full path to the .so file? It seems like we could simply put that in the error message and that's it?

If it's from a NuGet package, you will know what package and version from the file path.

I considered that, but I figured most people won't find it actionable anyway. They most likely don't maintain the nuget, so the full path is just cognitive noise for them. With the library name + architecture then can, however, go to the nuget authors and just let them know about the two dateails.

jonathanpeppers commented 3 days ago

The full path to the file is more informative than <unknown>, though, right?

grendello commented 3 days ago

The full path to the file is more informative than <unknown>, though, right?

It is, but it also potentially leaks information about the user's environment, if shared (operating system, user login name), since it's going to be in the nuget cache. The <unknown> part is something that needs a fix too, I imagine it should be possible to get that information from transient dependencies.

jpobst commented 3 days ago

Can we also update the verbiage to be less scary:

warning XA0141: NuGet package 'Xamarin.GooglePlayServices.Vision.Face.Contour.Internal' version '116.1.0.19' contains a shared library 'arm64-v8a/libface_detector_v2_jni.so' which is not 16KB aligned. Google may require 16KB aligned libraries in the future. See https://developer.android.com/guide/practices/page-sizes for more details.
grendello commented 3 days ago

@jpobst we can change the wording, but there's no "may" about it - they will require that alignment.

grendello commented 13 hours ago

Linux build fails with

Workload installation failed: Version 35.99.0-ci.pr.gh9547.38 of package microsoft.android.sdk.linux is not found

@pjcollins @jonathanpeppers any idea what might be causing it?

pjcollins commented 10 hours ago

Linux build fails with

Workload installation failed: Version 35.99.0-ci.pr.gh9547.38 of package microsoft.android.sdk.linux is not found

@pjcollins @jonathanpeppers any idea what might be causing it?

This is a weird issue where the source in the target branch appears to have been updated between when the mac build ran and the linux build ran -- we have packages on the PR with different versions:

Screenshot 2024-11-25 at 10 36 12 AM

Did the linux build initially fail and re-run? I think we'll need to just kick off a new build

pjcollins commented 10 hours ago

/azp run

azure-pipelines[bot] commented 10 hours ago
Azure Pipelines successfully started running 1 pipeline(s).
pjcollins commented 10 hours ago

This failing check will continue to show on the PR from the old build since we're rebuilding the same commit, and it can be ignored in favor of the new build:

Xamarin.Android-PR (Linux Tests Linux > Tests > MSBuild)

grendello commented 9 hours ago

Did the linux build initially fail and re-run? I think we'll need to just kick off a new build

Yep, I restarted it two times I think. Let's hope it works fine now, thanks for looking into it :)