This repository was archived by the owner on Dec 18, 2017. It is now read-only.
Stop using Title element as a fallback for PackageInfo.Id#2938
Merged
davidfowl merged 3 commits intoaspnet:devfrom Oct 13, 2015
Merged
Stop using Title element as a fallback for PackageInfo.Id#2938davidfowl merged 3 commits intoaspnet:devfrom
davidfowl merged 3 commits intoaspnet:devfrom
Conversation
This is only sometimes a useful fallback, and in some cases it actually prevents success: falling back to the given Id would have worked.
|
Hi @dagood, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! TTYL, DNFBOT; |
Member
|
Looks good /cc @emgarten make sure nuget doesn't have the same logic |
Contributor
There was a problem hiding this comment.
The title comment seems unnecessary?
Contributor
Author
There was a problem hiding this comment.
I think you're right, if someone needs to know why titleElement?.Value isn't there anymore they can use git blame. Removing.
Contributor
|
|
davidfowl
added a commit
that referenced
this pull request
Oct 13, 2015
Stop using Title element as a fallback for PackageInfo.Id
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Title is only sometimes a correct fallback for package id. In some cases it actually causes failure where falling back to the given Id would have worked.
For example, xunit.netcore.extensions has the title "xUnit extensions of .NET Core test projects". Without this change, when pulling from a source that doesn't provide
Id,Titleis used and package validation tries to findxUnit extensions of .NET Core test projects.nuspecinside the package and fails.This change allows
dnu restoreto work using Artifactory feeds, which (currently) don't provide Id. I don't know of a scenario where Title is a better fallback than the given Id, but maybe there is one. The fallback was introduced here: #638