-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Change xml formatting for store artifacts xml #1487
Conversation
Credit to @mikkelbu pointing out that line. |
@dasMulli What's the story on the casing of the package names? Is that one difficult/impossible to address? [EDIT] I just realized those props are of the build. The list comes from the |
I'm not sure what can be done about the package id casing. As far as I can tell it originates from the
|
Excellent find. What about setting a new metadata item (for use later)? item.SetMetadata(MetadataKeys.FriendlyPackageName, resolvedAssembly.Package.Id.ToString()); |
Add one here: https://github.com/dotnet/sdk/blob/cd25d6bbfc2aac61cc790c511900427ac64fdaa8/src/Tasks/Common/src/MetadataKeys.cs public const string FriendlyPackageName = "FriendlyPackageName"; [EDIT] btw--- What is stored in
... that's not the friendly package name, is it? |
9928856
to
cfcbd81
Compare
Turns out the metadata in |
🎉 Awesome @dasMulli!!!! "I love it when a plan comes together!" - John "Hannibal" Smith (George Peppard), The A-Team, ©1983-87 Universal Television Stephen J. Cannell |
@@ -83,7 +83,7 @@ protected override void ExecuteCore() | |||
TaskItem item = new TaskItem(resolvedAssembly.SourcePath); | |||
item.SetMetadata("DestinationSubPath", resolvedAssembly.DestinationSubPath); | |||
item.SetMetadata("AssetType", resolvedAssembly.Asset.ToString().ToLower()); | |||
item.SetMetadata(MetadataKeys.PackageName, resolvedAssembly.Package.Id.ToString().ToLower()); | |||
item.SetMetadata(MetadataKeys.PackageName, resolvedAssembly.Package.Id.ToString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eerhardt Will removing this ToLower() break anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Package Ids are supposed to be case insensitive, so in theory it is fine to make this change. If it does break something, that something should be fixed to use a case insensitive comparison.
I did a quick look at where this is used, and the only place I found was it gets passed into FilterResolvedFiles
, which then uses it to create a PackageIdentity, which does case insensitive comparisons. So this should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool ... It's a UX issue if the files have lowercase package names. Some devs are bound to wonder: Do they always need to be lowercase in the artifact.xml file? This will fix that prob.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting to get input from @eerhardt on casing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay in reviewing, I've been out of the office.
Looks good to me. Thanks for the contribution.
updating master to Preview7
Merge master to release/2.1
Merge master to release/2.1
Fixes most of https://github.com/dotnet/cli/issues/7010
Fixes #1490
cc @eerhardt @ramarag