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

[net8.0] Update dependencies from xamarin/xamarin-android #16024

Merged
merged 8 commits into from
Jul 20, 2023

Conversation

dotnet-maestro[bot]
Copy link
Contributor

@dotnet-maestro dotnet-maestro bot commented Jul 6, 2023

This pull request updates the following dependencies

From https://github.com/xamarin/xamarin-android

  • Subscription: 085b8bd9-e630-441d-931c-08db157be54d
  • Build: main-3a89e8d87afe1fa68744b0cf427d748dd42db51a-1
  • Date Produced: July 19, 2023 4:32:33 PM UTC
  • Commit: 3a89e8d87afe1fa68744b0cf427d748dd42db51a
  • Branch: refs/heads/main

Coherency Updates

The following updates ensure that dependencies with a CoherentParentDependency
attribute were produced in a build used as input to the parent dependency's build.
See Dependency Description Format

  • Coherency Updates:
    • Microsoft.Dotnet.Sdk.Internal: from 8.0.100-preview.7.23325.5 to 8.0.100-preview.7.23330.16 (parent: Microsoft.Android.Sdk.Windows)
    • Microsoft.NETCore.App.Ref: from 8.0.0-preview.7.23325.2 to 8.0.0-preview.7.23329.8 (parent: Microsoft.Android.Sdk.Windows)
    • Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport: from 8.0.0-preview.7.23321.3 to 8.0.0-preview.7.23326.1 (parent: Microsoft.NETCore.App.Ref)

…uild main-47087d5604645103786ff19b39dd04474d05dd0b-1

Microsoft.Android.Sdk.Windows
 From Version 34.0.0-preview.7.361 -> To Version 34.0.0-preview.7.362
@ghost ghost added the area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions label Jul 6, 2023
…uild main-a850d8147d6c1d066f3849e7cf8fab231497c64b-1

Microsoft.Android.Sdk.Windows
 From Version 34.0.0-preview.7.361 -> To Version 34.0.0-preview.7.365

Dependency coherency updates

Microsoft.Dotnet.Sdk.Internal,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
 From Version 8.0.100-preview.7.23325.5 -> To Version 8.0.100-preview.7.23330.16 (parent: Microsoft.Android.Sdk.Windows
…uild main-f21e10deed466c71713e1b35dbc8a327880c2c7c-1

Microsoft.Android.Sdk.Windows
 From Version 34.0.0-preview.7.361 -> To Version 34.0.0-preview.7.367

Dependency coherency updates

Microsoft.Dotnet.Sdk.Internal,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
 From Version 8.0.100-preview.7.23325.5 -> To Version 8.0.100-preview.7.23330.16 (parent: Microsoft.Android.Sdk.Windows
…uild main-76ab8b2ca208a73834c70453193e5ec7ef1f7304-1

Microsoft.Android.Sdk.Windows
 From Version 34.0.0-preview.7.361 -> To Version 34.0.0-preview.7.369

Dependency coherency updates

Microsoft.Dotnet.Sdk.Internal,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
 From Version 8.0.100-preview.7.23325.5 -> To Version 8.0.100-preview.7.23330.16 (parent: Microsoft.Android.Sdk.Windows
…uild main-a016b31a88a78bc67a8a33edeabbf92a4dc28c71-1

Microsoft.Android.Sdk.Windows
 From Version 34.0.0-preview.7.361 -> To Version 34.0.0-preview.7.371

Dependency coherency updates

Microsoft.Dotnet.Sdk.Internal,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
 From Version 8.0.100-preview.7.23325.5 -> To Version 8.0.100-preview.7.23330.16 (parent: Microsoft.Android.Sdk.Windows
…uild main-26ffd5d763b36dde528bc324967f4925e9101733-1

Microsoft.Android.Sdk.Windows
 From Version 34.0.0-preview.7.361 -> To Version 34.0.0-preview.7.374

Dependency coherency updates

Microsoft.Dotnet.Sdk.Internal,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
 From Version 8.0.100-preview.7.23325.5 -> To Version 8.0.100-preview.7.23330.16 (parent: Microsoft.Android.Sdk.Windows
@rmarinho
Copy link
Member

D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144: invalid file path 'D:\a\_work\1\s\src\Core\src\obj\Debug\net8.0-android\lp\129.stamp'. [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144:  [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144: invalid file path 'D:\a\_work\1\s\src\Core\src\obj\Debug\net8.0-android\lp\90.stamp'. [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144:  [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144: invalid file path 'D:\a\_work\1\s\src\Core\src\obj\Debug\net8.0-android\lp\142.stamp'. [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144:  [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144: invalid file path 'D:\a\_work\1\s\src\Core\src\obj\Debug\net8.0-android\lp\86.stamp'. [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144:  [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144: invalid file path 'D:\a\_work\1\s\src\Core\src\obj\Debug\net8.0-android\lp\87.stamp'. [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144:  [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144: invalid file path 'D:\a\_work\1\s\src\Core\src\obj\Debug\net8.0-android\lp\88.stamp'. [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144:  [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144: invalid file path 'D:\a\_work\1\s\src\Core\src\obj\Debug\net8.0-android\lp\93.stamp'. [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144:  [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144: invalid file path 'D:\a\_work\1\s\src\Core\src\obj\Debug\net8.0-android\lp\89.stamp'. [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144:  [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144: invalid file path 'D:\a\_work\1\s\src\Core\src\obj\Debug\net8.0-android\lp\92.stamp'. [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]
D:\a\_work\1\s\bin\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.7.374\tools\Xamarin.Android.Aapt2.targets(123,3): error APT2144:  [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-android]

@jonathanpeppers
Copy link
Member

I think the latest error is caused by: dotnet/android@26ffd5d

It adds .aar files to the build as @(None) that later cause us to aapt2 compile an incorrect file:

Executing compile -o /Users/builder/azdo/_work/1/s/src/Core/src/obj/Release/net8.0-android/lp/87/jl/res/../flat/ /Users/builder/azdo/_work/1/s/src/Core/src/obj/Release/net8.0-android/lp/87.stamp

We should be passing *.flat files here, so this isn't correct.

jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Jul 18, 2023
Context: dotnet/maui#16024 (comment)

.NET MAUI's build currently fails with:

    Xamarin.Android.Aapt2.targets(123,3): error APT2144: invalid file path 'D:\a\_work\1\s\src\Core\src\obj\Debug\net8.0-android\lp\129.stamp'.

What is very wrong about this, it is trying to `aapt2 compile` a
`*.stamp` file:

    Executing compile -o /Users/builder/azdo/_work/1/s/src/Core/src/obj/Release/net8.0-android/lp/87/jl/res/../flat/ /Users/builder/azdo/_work/1/s/src/Core/src/obj/Release/net8.0-android/lp/87.stamp

Normally this runs against `*.flat` or `*.flata` files.

This problem was introduced in 26ffd5d:

1. Library A uses an AndroidX package, the AndroidX `.aar` file is added
   to `@(AndroidAarLibrary)`. The NuGet package does this in a
   `.targets` file.

2. With the change in 26ffd5d, the `.aar` is copied to Library A's
   build output.

3. Library B uses the same AndroidX package and references Library A.

4. Library B now has duplicate `.aar` files & has the weird build error!

I could reproduce the issue in a test.

There *may* be a second bug here, but we should update our logic to be:

    <!-- .aar files should be copied to $(OutputPath) in .NET 6-->
    <None Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.aar' " ... />
    <!-- @(LibraryProjectZip) items that are not in @(AndroidLibrary) -->
    <None Include="@(LibraryProjectZip)" Exclude="@(AndroidLibrary)" ... />

So we now only copy:

* The new `@(AndroidLibrary)` item group with an `.aar` extension. *Not*
  `@(AndroidAarLibrary)`.

* Any `@(LibraryProjectZip)` that are *not* in `@(AndroidLibrary)`. This
  supports the classic item group name, keeping our behavior before.

Now the new test and the test updated in 26ffd5d both pass.
jonathanpeppers added a commit to dotnet/android that referenced this pull request Jul 19, 2023
Context: dotnet/maui#16024 (comment)

.NET MAUI's build currently fails with:

    Xamarin.Android.Aapt2.targets(123,3): error APT2144: invalid file path 'D:\a\_work\1\s\src\Core\src\obj\Debug\net8.0-android\lp\129.stamp'.

What is very wrong about this, it is trying to `aapt2 compile` a
`*.stamp` file:

    Executing compile -o /Users/builder/azdo/_work/1/s/src/Core/src/obj/Release/net8.0-android/lp/87/jl/res/../flat/ /Users/builder/azdo/_work/1/s/src/Core/src/obj/Release/net8.0-android/lp/87.stamp

Normally this runs against `*.flat` or `*.flata` files.

This problem was introduced in 26ffd5d:

1. Library A uses an AndroidX package, the AndroidX `.aar` file is added
   to `@(AndroidAarLibrary)`. The NuGet package does this in a
   `.targets` file.

2. With the change in 26ffd5d, the `.aar` is copied to Library A's
   build output.

3. Library B uses the same AndroidX package and references Library A.

4. Library B now has duplicate `.aar` files & has the weird build error!

I could reproduce the issue in a test.

There *may* be a second bug here, but we should update our logic to be:

    <!-- .aar files should be copied to $(OutputPath) in .NET 6-->
    <None Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.aar' " ... />
    <!-- @(LibraryProjectZip) items that are not in @(AndroidLibrary) -->
    <None Include="@(LibraryProjectZip)" Exclude="@(AndroidLibrary)" ... />

So we now only copy:

* The new `@(AndroidLibrary)` item group with an `.aar` extension. *Not*
  `@(AndroidAarLibrary)`.

* Any `@(LibraryProjectZip)` that are *not* in `@(AndroidLibrary)`. This
  supports the classic item group name, keeping our behavior before.

Now the new test and the test updated in 26ffd5d both pass.
@rmarinho rmarinho self-assigned this Jul 20, 2023
…uild main-3a89e8d87afe1fa68744b0cf427d748dd42db51a-1

Microsoft.Android.Sdk.Windows
 From Version 34.0.0-preview.7.361 -> To Version 34.0.0-preview.7.376

Dependency coherency updates

Microsoft.Dotnet.Sdk.Internal,Microsoft.NETCore.App.Ref,Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
 From Version 8.0.100-preview.7.23325.5 -> To Version 8.0.100-preview.7.23330.16 (parent: Microsoft.Android.Sdk.Windows
@jonathanpeppers
Copy link
Member

We should try hard to merge this one today.

I just merged a .NET bump where a lot of things broke:

dotnet/android@7bf4edd

I suspect you're going to have to do some work to fix the MAUI build for the next one...

@rmarinho
Copy link
Member

yeah that why I wanted also net8.0 green. so we could merge easier . I m on it

@rmarinho rmarinho enabled auto-merge (squash) July 20, 2023 14:26
@rmarinho rmarinho merged commit 8cd9b5e into net8.0 Jul 20, 2023
27 checks passed
@rmarinho rmarinho deleted the darc-net8.0-b5876a05-1f9f-4122-912d-fb6edcb475ef branch July 20, 2023 14:41
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
@samhouts samhouts added the fixed-in-8.0.0-preview.7.8842 Look for this fix in 8.0.0-preview.7.8842! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions fixed-in-8.0.0-preview.7.8842 Look for this fix in 8.0.0-preview.7.8842! platform/android 🤖
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants