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

[build] produce multiple "flavors" of runtime packs #9538

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

jonathanpeppers
Copy link
Member

Right now our runtime packs are all identical for each .NET "runtime", but we want to be able to produce different packs, such as:

Microsoft.Android.Runtime.Mono.35.android-arm
Microsoft.Android.Runtime.Mono.35.android-arm64
Microsoft.Android.Runtime.Mono.35.android-x86
Microsoft.Android.Runtime.Mono.35.android-x64
Microsoft.Android.Runtime.NativeAOT.35.android-arm
Microsoft.Android.Runtime.NativeAOT.35.android-arm64
Microsoft.Android.Runtime.NativeAOT.35.android-x86
Microsoft.Android.Runtime.NativeAOT.35.android-x64

Currently, the contents of all these packs are identical, but this is an initial step to build multiple packs.

The plan is for the workload to only install the "Mono" packs, and the "NativeAOT" packs can be restored via NuGet.

Right now our runtime packs are all identical for each .NET "runtime",
but we want to be able to produce different packs, such as:

    Microsoft.Android.Runtime.Mono.35.android-arm
    Microsoft.Android.Runtime.Mono.35.android-arm64
    Microsoft.Android.Runtime.Mono.35.android-x86
    Microsoft.Android.Runtime.Mono.35.android-x64
    Microsoft.Android.Runtime.NativeAOT.35.android-arm
    Microsoft.Android.Runtime.NativeAOT.35.android-arm64
    Microsoft.Android.Runtime.NativeAOT.35.android-x86
    Microsoft.Android.Runtime.NativeAOT.35.android-x64

Currently, the contents of all these packs are identical, but this is
an initial step to build multiple packs.

The plan is for the workload to only install the "Mono" packs, and the
"NativeAOT" packs can be restored via NuGet.
@jonathanpeppers jonathanpeppers marked this pull request as ready for review November 21, 2024 22:03
@jonathanpeppers
Copy link
Member Author

I think the main question here is if we are ok with the new naming scheme:

  • Microsoft.Android.Runtime.Mono.35.[RID]
  • Microsoft.Android.Runtime.NativeAOT.35.[RID]

Copy link
Member

@pjcollins pjcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach and names seem good to me here, we can always rename if we come up with something better later

@jonpryor jonpryor merged commit 38e8857 into main Nov 26, 2024
56 of 58 checks passed
@jonpryor jonpryor deleted the dev/peppers/runtime/flavors branch November 26, 2024 18:38
jonathanpeppers added a commit that referenced this pull request Dec 6, 2024
Context: #9538
Context: #9583

Expanding upon #9538, there are more changes required to support
multiple runtime flavors in our build.

* Remove `$(MicrosoftAndroidArmPackDir)` and related properties, to
  rely on a new `@(AndroidAbiAndRuntimeFlavor)` item group instead.

* Exclude our Mono-related native libraries from NativeAOT runtime
  packs.

* Ensure that our runtime packs copy assemblies (`Mono.Android.dll`,
  etc.) to the appropriate NativeAOT-related directories.

* List our `Microsoft.Android.Runtime.NativeAOT.*` packs in the
  `WorkloadManifest.json`, so that `**FromWorkload**` can resolve the
  version number for them. They can still restore via NuGet.
jonathanpeppers added a commit that referenced this pull request Dec 6, 2024
Context: #9538
Context: #9583

Expanding upon #9538, there are more changes required to support
multiple runtime flavors in our build.

* Remove `$(MicrosoftAndroidArmPackDir)` and related properties, to
  rely on a new `@(AndroidAbiAndRuntimeFlavor)` item group instead.

* Exclude our Mono-related native libraries from NativeAOT runtime
  packs.

* Ensure that our runtime packs copy assemblies (`Mono.Android.dll`,
  etc.) to the appropriate NativeAOT-related directories.

* List our `Microsoft.Android.Runtime.NativeAOT.*` packs in the
  `WorkloadManifest.json`, so that `**FromWorkload**` can resolve the
  version number for them. They can still restore via NuGet.
jonathanpeppers added a commit that referenced this pull request Dec 9, 2024
Context: #9538
Context: #9583

Expanding upon #9538, there are more changes required to support
multiple runtime flavors in our build.

* Remove `$(MicrosoftAndroidArmPackDir)` and related properties, to
  rely on a new `@(AndroidAbiAndRuntimeFlavor)` item group instead.

* Exclude our Mono-related native libraries from NativeAOT runtime
  packs.

* Ensure that our runtime packs copy assemblies (`Mono.Android.dll`,
  etc.) to the appropriate NativeAOT-related directories.

* List our `Microsoft.Android.Runtime.NativeAOT.*` packs in the
  `WorkloadManifest.json`, so that `**FromWorkload**` can resolve the
  version number for them. They can still restore via NuGet.
jonathanpeppers added a commit that referenced this pull request Dec 9, 2024
Context: #9538
Context: #9583

Expanding upon #9538, there are more changes required to support
multiple runtime flavors in our build.

* Remove `$(MicrosoftAndroidArmPackDir)` and related properties, to
  rely on a new `@(AndroidAbiAndRuntimeFlavor)` item group instead.

* Exclude our Mono-related native libraries from NativeAOT runtime
  packs.

* Ensure that our runtime packs copy assemblies (`Mono.Android.dll`,
  etc.) to the appropriate NativeAOT-related directories.

* List our `Microsoft.Android.Runtime.NativeAOT.*` packs in the
  `WorkloadManifest.json`, so that `**FromWorkload**` can resolve the
  version number for them. They can still restore via NuGet.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 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.

3 participants