Fix NonShipping casing for Xamarin.Android.Tools.AndroidSdk package#11281
Open
jonathanpeppers wants to merge 1 commit intomainfrom
Open
Fix NonShipping casing for Xamarin.Android.Tools.AndroidSdk package#11281jonathanpeppers wants to merge 1 commit intomainfrom
jonathanpeppers wants to merge 1 commit intomainfrom
Conversation
The ManifestArtifactData had "Nonshipping=true" (lowercase s), but Arcade's ArtifactModel.NonShipping property looks up "NonShipping" (capital S). During build, this worked because MSBuildListSplitter creates a case-insensitive dictionary. However, when the manifest XML is parsed back (by PublishBuildAssets or darc gather-drop), CreateAttributeDictionary() creates a case-sensitive dictionary, so the lookup fails and defaults to false (shipping). Also removed the unused IsShipping="false" metadata, which is not read by PackageArtifactModelFactory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes packaging metadata for the Xamarin.Android.Tools.AndroidSdk NuGet so Arcade/BAR consumers classify it as non-shipping consistently during manifest round-trips.
Changes:
- Corrects
ManifestArtifactDatafromNonshipping=truetoNonShipping=true. - Removes the redundant
IsShipping="false"metadata from the special-caseItemsToPushentry. - Keeps the existing packaging flow unchanged aside from the non-shipping classification fix for this package.
Member
Author
|
Testing with a build here: |
Member
Author
|
I queued the above build with Unfortunately, that is the only way to test, so I think we should just merge to test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
darc gather-dropwas downloading theXamarin.Android.Tools.AndroidSdkpackage as if it were a "shipping" package, even though it was intended to be non-shipping.The root cause is a casing mismatch in
ManifestArtifactData. We hadNonshipping=true(lowercase 's'), but Arcade'sArtifactModel.NonShippingproperty looks up the key usingnameof(NonShipping)(capital 'S'). During the build, this worked becauseMSBuildListSplitter.GetNamedProperties()creates a case-insensitive dictionary. However, when the manifest XML is later parsed back (byPublishBuildAssetsto register in BAR, or bydarc gather-drop),CreateAttributeDictionary()creates a case-sensitive dictionary, so the lookup for"NonShipping"fails to find"Nonshipping"and defaults tofalse(i.e., shipping).Changes
Nonshipping=true->NonShipping=trueIsShipping="false"metadata, which is not read by Arcade'sPackageArtifactModelFactoryChecklist