Should package metadata element names be case-insensitive? #8838
Labels
Area:PackageDefinition
Functionality:Pack
Priority:3
Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.
Type:DCR
Design Change Request
WaitingForCustomer
Applied when a NuGet triage person needs more info from the OP
Consider the case of the hand-edited .nuspec file (because no one ever does that, right?) where someone mistypes the metadata name and provides and incorrect case. Should this be supported officially?
Example. The BlogML.Core 1,0.0 package on nuget.org has
<ProjectUrl>
in the .nuspec instead of<projectUrl>
which is the official element name.XML is case sensitive right? Well, yes, but the majority of cases in the official NuGet experiences accept this funky metadata element without blinking an eye:
1st Party
3rd Party
This is a good idea right?
My vote is NO, no, No, nO! We should not support this officially.
In fact I think we should explicitly state it is not supported and any implementation that treats metadata names as case-insensitive strings is doing so at it's own peril. For example, what's the defined behavior when there are two metadata fields with the same name but different case (e.g.
<id>
and<ID>
). Life's too short!Fortunately, nuget.org rejects packages with multiple ID and version casings defined so I think we're out of scary land -- just living in crazy land. NBD.
Okay, who's guilty of this cardinal sin?
No shame, we all hack around with .nupkgs. But the ones I've found on nuget.org are:
🍻
The text was updated successfully, but these errors were encountered: