Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reapply "[native] Real shared libraries in APK /lib directories (#9154)" #9348

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

jonathanpeppers
Copy link
Member

Use rebase-and-merge to merge this, so we get 3 commits.

MAUI Test Integration should hopefully pass to know MAUI will build after merging.

@jonathanpeppers jonathanpeppers added the use-rebase-and-merge Normally we squash-and-merge PRs. Use this label so we instead rebase & merge. label Sep 30, 2024
@jonathanpeppers
Copy link
Member Author

Looks good so far!

image

jonathanpeppers and others added 3 commits September 30, 2024 14:35
…<PrepareDSOWrapperState/>` (#9340)

Context: dotnet/maui#24539 (comment)

In .NET MAUI's build, they failed to bump .NET for Android because of
the following error:

    dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.0-rc.2.130\tools\Xamarin.Android.Common.Debugging.targets(139,2): error XABLD7009: System.InvalidOperationException: Internal error: archive DSO stub location not known for architecture 'X86'
    at Xamarin.Android.Tasks.DSOWrapperGenerator.WrapIt(AndroidTargetArch targetArch, String payloadFilePath, String outputFileName, IBuildEngine4 buildEngine, TaskLoggingHelper log) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Utilities/DSOWrapperGenerator.cs:line 86
    at Xamarin.Android.Tasks.BuildApk.AddRuntimeConfigBlob(ZipArchiveEx apk) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs:line 404
    at Xamarin.Android.Tasks.BuildApk.ExecuteWithAbi(String[] supportedAbis, String apkInputPath, String apkOutputPath, Boolean debug, Boolean compress, IDictionary`2 compressedAssembliesInfo, String assemblyStoreApkName) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs:line 215
    at Xamarin.Android.Tasks.BuildApk.RunTask() in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs:line 357
    at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 25

In 5ebcb1d, we introduced some MSBuild `RegisterTaskObject()` usage
that failed in specific way:

* MAUI has a `.sln` with multiple "app" projects: device tests,
  samples, etc. building in parallel

* The `<PrepareDSOWrapperState/>` MSBuild task runs for project A,
  saving x64 and arm64 values.

* Project B goes to run `<BuildApk/>` but x86 is missing.

For now, we can fix this by using `ProjectSpecificTaskObjectKey()` that
wraps the key with a `Tuple` such as:

    (key, WorkingDirectory)

Which, should result in a unique key per project.

In a future PR, we could consider removing this `RegisterTaskObject()`
usage completely, and doing all the work inside the `<BuildApk/>`
MSBuild task instead.
@jonathanpeppers
Copy link
Member Author

Latest changes, I just fixed up the .apkdesc files that had conflicts.

@jonathanpeppers
Copy link
Member Author

Test failures look ok:

  • FastDeployEnvironmentFiles(False) expected
  • Some network failures in AndroidMessageHandlerTests

@jonathanpeppers jonathanpeppers merged commit dd17119 into release/9.0.1xx-rc2 Sep 30, 2024
55 of 58 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/restore/9154 branch September 30, 2024 21:02
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
use-rebase-and-merge Normally we squash-and-merge PRs. Use this label so we instead rebase & merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants