Skip to content
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
dagood:remote-title-fallback
Oct 13, 2015
Merged

Stop using Title element as a fallback for PackageInfo.Id#2938
davidfowl merged 3 commits intoaspnet:devfrom
dagood:remote-title-fallback

Conversation

@dagood
Copy link
Copy Markdown
Contributor

@dagood dagood commented Oct 8, 2015

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, Title is used and package validation tries to find xUnit extensions of .NET Core test projects.nuspec inside the package and fails.

This change allows dnu restore to 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

dagood added 2 commits October 8, 2015 14:02
This is only sometimes a useful fallback, and in some cases it actually prevents success: falling back to the given Id would have worked.
@dnfclas
Copy link
Copy Markdown

dnfclas commented Oct 8, 2015

Hi @dagood, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

@davidfowl
Copy link
Copy Markdown
Member

Looks good /cc @emgarten make sure nuget doesn't have the same logic

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title comment seems unnecessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right, if someone needs to know why titleElement?.Value isn't there anymore they can use git blame. Removing.

@pranavkm
Copy link
Copy Markdown
Contributor

pranavkm commented Oct 8, 2015

:shipit:

davidfowl added a commit that referenced this pull request Oct 13, 2015
Stop using Title element as a fallback for PackageInfo.Id
@davidfowl davidfowl merged commit f74dd17 into aspnet:dev Oct 13, 2015
@dagood dagood deleted the remote-title-fallback branch October 19, 2015 15:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants