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] Update package metadata #9230

Merged
merged 1 commit into from
Aug 20, 2024
Merged

[build] Update package metadata #9230

merged 1 commit into from
Aug 20, 2024

Conversation

pjcollins
Copy link
Member

@pjcollins pjcollins commented Aug 20, 2024

Looking at the package explorer for recent .NET 9 preview 7 builds I
noticed that other packages do not include sha metadata in the version
element. Compare the following by clicking "View Metadata source":

https://nuget.info/packages/Microsoft.Android.Runtime.35.android-arm/35.0.0-preview.7.41
https://nuget.info/packages/Microsoft.NETCore.App.Runtime.Mono.android-arm/9.0.0-preview.7.24405.7
https://nuget.info/packages/Microsoft.Maui.Sdk/9.0.0-preview.7.24407.4

I believe the sha metadata was added when we were initially figuring out
a package versioning schema that would produce unique package versions,
however our usage of commit distance in both preview and stable versions
should address this concern.

The sha metadata inclusion in the version element but not the .nupkg
name also causes conflicts with the latest version of the
arcade publishing tooling which expects these to be in sync.

The short hash in the metadata has been replaced by a repository
element which will contain the repo url and full commit hash.

The icon and other package metadata have been updated to better match
other .NET packages.

Looking at the package explorer for recent .NET 9 preview 7 builds I
noticed that other packages do not include sha metadata in the version
element. Compare the following by clicking "View Metadata source":

    https://nuget.info/packages/Microsoft.Android.Runtime.35.android-arm/35.0.0-preview.7.41
    https://nuget.info/packages/Microsoft.NETCore.App.Runtime.Mono.android-arm/9.0.0-preview.7.24405.7
    https://nuget.info/packages/Microsoft.Maui.Sdk/9.0.0-preview.7.24407.4

I believe the sha metadata was added when we were initially figuring out
a package versioning schema that would produce unique package versions,
however our usage of commit distance in both preview and stable versions
should address this concern.

The sha metadata inclusion in the version element but not the .nupkg
name also causes conflicts with the latest version of the
[arcade publishing tooling][0] which expects these to be in sync.

The short hash in the metadata has been replaced by a repo element which
will contain the repo url and full commit hash.

The icon and other package metadata have been updated to better match
other .NET packages.

[0]: https://github.com/dotnet/arcade/blob/b4f4d40741f161e2c0d96c19c51a4013850ef65f/src/Microsoft.DotNet.Build.Tasks.Feed/src/PushToBuildStorage.cs
@pjcollins
Copy link
Member Author

Comparing nuspec output from a local build and recent one from CI:

--- ci/Microsoft.Android.Ref.35.nuspec	2024-08-20 08:41:14
+++ local/Microsoft.Android.Ref.35.nuspec	2024-08-20 12:11:46
@@ -1,17 +1,18 @@
-<?xml version="1.0" encoding="utf-8"?>
-<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
-  <metadata>
-    <id>Microsoft.Android.Ref.35</id>
-    <version>35.0.0-rc.1.64+sha.eb5455a</version>
-    <authors>Microsoft</authors>
-    <requireLicenseAcceptance>false</requireLicenseAcceptance>
-    <license type="file">LICENSE.TXT</license>
-    <licenseUrl>https://aka.ms/deprecateLicenseUrl</licenseUrl>
-    <projectUrl>https://github.com/dotnet/android</projectUrl>
-    <description>Microsoft.Android reference assemblies for API 35. Please do not reference directly.</description>
-    <copyright>© Microsoft Corporation. All rights reserved.</copyright>
-    <packageTypes>
-      <packageType name="DotnetPlatform" />
-    </packageTypes>
-  </metadata>
+<?xml version="1.0" encoding="utf-8"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
+  <metadata>
+    <id>Microsoft.Android.Ref.35</id>
+    <version>35.0.0-ci.dev-pjc-pack-repo-meta.64</version>
+    <authors>Microsoft</authors>
+    <license type="file">LICENSE.TXT</license>
+    <licenseUrl>https://aka.ms/deprecateLicenseUrl</licenseUrl>
+    <icon>Icon.png</icon>
+    <projectUrl>https://dot.net/</projectUrl>
+    <description>Microsoft.Android reference assemblies for API 35. Please do not reference directly.</description>
+    <copyright>© Microsoft Corporation. All rights reserved.</copyright>
+    <packageTypes>
+      <packageType name="DotnetPlatform" />
+    </packageTypes>
+    <repository type="git" url="https://github.com/dotnet/android" branch="refs/heads/dev/pjc/pack-repo-meta" commit="eb5455aaecd59ca979f184e7992624819e263315" />
+  </metadata>
 </package>

@jonpryor
Copy link
Member

It's a pity that diff shows that every line changed, when every line didn't? I guess line endings changed?

@jonpryor jonpryor merged commit baa7eba into main Aug 20, 2024
58 checks passed
@jonpryor jonpryor deleted the dev/pjc/pack-repo-meta branch August 20, 2024 18:25
pjcollins added a commit that referenced this pull request Aug 20, 2024
Looking at the package explorer for recent .NET 9 preview 7 builds I
noticed that other packages do not include sha metadata in the
version element.

Compare the following by clicking "View Metadata source":

  * https://nuget.info/packages/Microsoft.Android.Runtime.35.android-arm/35.0.0-preview.7.41
    > <version>35.0.0-preview.7.41+sha.a9d10b4</version>
  * https://nuget.info/packages/Microsoft.NETCore.App.Runtime.Mono.android-arm/9.0.0-preview.7.24405.7
    > <version>9.0.0-preview.7.24405.7</version>
  * https://nuget.info/packages/Microsoft.Maui.Sdk/9.0.0-preview.7.24407.4
    > <version>9.0.0-preview.7.24407.4</version>

I believe the sha metadata was added when we were initially figuring
out a package versioning schema that would produce unique package
versions; however, our usage of commit distance in both preview and
stable versions should address this concern.

The sha metadata inclusion in the version element but not the `.nupkg`
name also causes conflicts with the latest version of the
[arcade publishing tooling][0] which expects these to be in sync.

The short hash in the metadata has been replaced by a `repository`
element which will contain the repo url and full commit hash:

	<repository type="git" url="https://github.com/dotnet/android" branch="refs/heads/dev/pjc/pack-repo-meta" commit="eb5455aaecd59ca979f184e7992624819e263315" />

The icon and other package metadata have been updated to better match
other .NET packages.

[0]: https://github.com/dotnet/arcade/blob/b4f4d40741f161e2c0d96c19c51a4013850ef65f/src/Microsoft.DotNet.Build.Tasks.Feed/src/PushToBuildStorage.cs
jonathanpeppers added a commit that referenced this pull request Aug 22, 2024
Changes: 34.0.113...b0fd011

.NET 8 changelog:

* [Mono.Android] AndroidMessageHandler should follow HTTP-308 redirects (#8951)
* [ci] Fix android source path for MAUI test job (#9030)
* [ci] Update checkout path for nightly build (#9028)
* [Mono.Android-Tests] Fix repo URL in redirect tests (#9035)
* [Xamarin.Android.Build.Tasks] Support VS "Build Acceleration" (#9042)
* [xaprepare] Always use release mono bundle (#9106)
* [ci] Update sdk-insertions trigger to manual only (#9029)
* Bump to dotnet/runtime@4a37e7305c 8.0.8 (#9033)
* Bump to dotnet/installer@b638a84fba 8.0.205-servicing.24212.27 (#9032)
* [ci] Disable CodeQL on macOS, Linux, non-main jobs (#9111)
* [ci] Use DotNetCoreCLI to sign macOS files (#9102)
* [tests] fix `InvalidTargetPlatformVersion` for `net8.0` (#9110)
* [ci] Run "Push Internal" job on AzurePipelines-EO pool (#8991)
* Bump to dotnet/runtime@2d5c0b720c 8.0.8 (#9123)
* [Mono.Android] Data sharing and Close() overrides (#9103)
* [Xamarin.Android.Build.Tasks] fix `Inputs` for `_Generate*Java*` targets (#9174)
* Bump to xamarin/monodroid@e6a7cf474a (#9193)
* [release/8.0.4xx] Backport maestro and artifact drop infra improvements (#9195)
* Bump to dotnet/runtime@62f69f1e86 8.0.9 (#9191)
* Bump to dotnet/runtime@ed13b35174 8.0.9 (#9221)
* [build] Update package metadata (#9230)
* [Xamarin.Android.Build.Tasks] Rethink default property values (#9155) (#9224)
* [Xamarin.Android.Build.Tasks] Fix an issue with incremental builds (#9183)
* [ci] Improve push_signed_nugets job condition (#9240)
jonathanpeppers added a commit that referenced this pull request Aug 23, 2024
Changes: 34.0.113...b0fd011

.NET 8 changelog:

* [Mono.Android] AndroidMessageHandler should follow HTTP-308 redirects (#8951)
* [ci] Fix android source path for MAUI test job (#9030)
* [ci] Update checkout path for nightly build (#9028)
* [Mono.Android-Tests] Fix repo URL in redirect tests (#9035)
* [Xamarin.Android.Build.Tasks] Support VS "Build Acceleration" (#9042)
* [xaprepare] Always use release mono bundle (#9106)
* [ci] Update sdk-insertions trigger to manual only (#9029)
* Bump to dotnet/runtime@4a37e7305c 8.0.8 (#9033)
* Bump to dotnet/installer@b638a84fba 8.0.205-servicing.24212.27 (#9032)
* [ci] Disable CodeQL on macOS, Linux, non-main jobs (#9111)
* [ci] Use DotNetCoreCLI to sign macOS files (#9102)
* [tests] fix `InvalidTargetPlatformVersion` for `net8.0` (#9110)
* [ci] Run "Push Internal" job on AzurePipelines-EO pool (#8991)
* Bump to dotnet/runtime@2d5c0b720c 8.0.8 (#9123)
* [Mono.Android] Data sharing and Close() overrides (#9103)
* [Xamarin.Android.Build.Tasks] fix `Inputs` for `_Generate*Java*` targets (#9174)
* Bump to xamarin/monodroid@e6a7cf474a (#9193)
* [release/8.0.4xx] Backport maestro and artifact drop infra improvements (#9195)
* Bump to dotnet/runtime@62f69f1e86 8.0.9 (#9191)
* Bump to dotnet/runtime@ed13b35174 8.0.9 (#9221)
* [build] Update package metadata (#9230)
* [Xamarin.Android.Build.Tasks] Rethink default property values (#9155) (#9224)
* [Xamarin.Android.Build.Tasks] Fix an issue with incremental builds (#9183)
* [ci] Improve push_signed_nugets job condition (#9240)

~~ Other changes ~~

* Setup Maestro to track .NET8 builds

After setting up the appropriate changes in `Version.Details.xml`, I ran:

    > darc update-dependencies --id 235947
    Looking up build with BAR id 235947
    Updating 'Microsoft.Android.Sdk.Windows': '1' => '34.0.137' (from build '8.0.4xx-    b0fd011-1' of 'https://github.com/dotnet/android')
    Checking for coherency updates...
    Using 'Strict' coherency mode. If this fails, a second attempt utilizing 'Legacy' Coherency mode will be made.
    Local dependencies updated based on build with BAR id 235947 (8.0.4xx-b0fd0113c829edd9bd1bc7d742255a237ff19f69-1 from https://github.com/dotnet/android@release/8.0.4xx)
jonathanpeppers added a commit that referenced this pull request Aug 23, 2024
Changes: 34.0.113...b0fd011

.NET 8 changelog:

* [Mono.Android] AndroidMessageHandler should follow HTTP-308 redirects (#8951)
* [ci] Fix android source path for MAUI test job (#9030)
* [ci] Update checkout path for nightly build (#9028)
* [Mono.Android-Tests] Fix repo URL in redirect tests (#9035)
* [Xamarin.Android.Build.Tasks] Support VS "Build Acceleration" (#9042)
* [xaprepare] Always use release mono bundle (#9106)
* [ci] Update sdk-insertions trigger to manual only (#9029)
* Bump to dotnet/runtime@4a37e7305c 8.0.8 (#9033)
* Bump to dotnet/installer@b638a84fba 8.0.205-servicing.24212.27 (#9032)
* [ci] Disable CodeQL on macOS, Linux, non-main jobs (#9111)
* [ci] Use DotNetCoreCLI to sign macOS files (#9102)
* [tests] fix `InvalidTargetPlatformVersion` for `net8.0` (#9110)
* [ci] Run "Push Internal" job on AzurePipelines-EO pool (#8991)
* Bump to dotnet/runtime@2d5c0b720c 8.0.8 (#9123)
* [Mono.Android] Data sharing and Close() overrides (#9103)
* [Xamarin.Android.Build.Tasks] fix `Inputs` for `_Generate*Java*` targets (#9174)
* Bump to xamarin/monodroid@e6a7cf474a (#9193)
* [release/8.0.4xx] Backport maestro and artifact drop infra improvements (#9195)
* Bump to dotnet/runtime@62f69f1e86 8.0.9 (#9191)
* Bump to dotnet/runtime@ed13b35174 8.0.9 (#9221)
* [build] Update package metadata (#9230)
* [Xamarin.Android.Build.Tasks] Rethink default property values (#9155) (#9224)
* [Xamarin.Android.Build.Tasks] Fix an issue with incremental builds (#9183)
* [ci] Improve push_signed_nugets job condition (#9240)

~~ Other changes ~~

* Setup Maestro to track .NET8 builds

After setting up the appropriate changes in `Version.Details.xml`, I ran:

    > darc update-dependencies --id 235947
    Looking up build with BAR id 235947
    Updating 'Microsoft.Android.Sdk.Windows': '1' => '34.0.137' (from build '8.0.4xx-    b0fd011-1' of 'https://github.com/dotnet/android')
    Checking for coherency updates...
    Using 'Strict' coherency mode. If this fails, a second attempt utilizing 'Legacy' Coherency mode will be made.
    Local dependencies updated based on build with BAR id 235947 (8.0.4xx-b0fd0113c829edd9bd1bc7d742255a237ff19f69-1 from https://github.com/dotnet/android@release/8.0.4xx)
grendello added a commit that referenced this pull request Aug 27, 2024
* main: (47 commits)
  Bump to dotnet/sdk@5642787dac 9.0.100-rc.2.24426.2 (#9247)
  LEGO: Merge pull request 9246
  Bump to 34.0.137 of the .NET 8 Android workload (#9243)
  Bump external/Java.Interop from `d30d554` to `51b784a` (#9241)
  Bump dotnet/android-tools@6575743 (#9235)
  Bump to mono/debugger-libs@d5664344 (#9238)
  [ci] Improve push_signed_nugets job condition (#9240)
  Bump to dotnet/android-tools@657574378a6 and xamarin/monodroid@8bd4bae7 (#9216)
  Bump to dotnet/java-interop@d30d554 (#9234)
  Localized file check-in by OneLocBuild Task (#9236)
  Bump to dotnet/sdk@e2b7b9d2b4 9.0.100-rc.2.24420.1 (#9228)
  $(AndroidPackVersionSuffix)=rc.2; net9 is 35.0.0-rc.2 (#9233)
  [Xamarin.Android.Build.Tasks] Scan for JCWs for each ABI in parallel (#9215)
  [Xamarin.Android.Build.Tasks] %(JavaArtifact) is a list (#9112)
  [native/monodroid] Fix error demangling satellite assembly names (#9166)
  [build] Update package metadata (#9230)
  [Xamarin.Android.Build.Tasks] Remove ILRepack (#9226)
  [Xamarin.Android.Build.Tasks] Fix an issue with incremental builds (#9183)
  [Xamarin.Android.Build.Tasks] remove `$XAMARIN_BUILD_ID` (#9223)
  [Mono.Android] Use .NET version of mdoc (#9225)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 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