Skip to content
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

Frameworks within the portable profile are not allowed to have profiles themselves #2823

Merged
merged 2 commits into from
Dec 22, 2015

Conversation

maartenba
Copy link
Contributor

Fixes #2822

@maartenba
Copy link
Contributor Author

/cc @emgarten

@@ -569,6 +583,24 @@ private static void ValidateNuGetPackageMetadata(PackageMetadata packageMetadata
}
}
}

private static void ValidateSupportedFrameworks(string[] supportedFrameworks)
{

Choose a reason for hiding this comment

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

can we instead of explicitly checking for the hyphen, share the code that the indexing task is using?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indexing uses NuGet.Core still (which does the check similar to this)

Choose a reason for hiding this comment

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

So should we move this check into the client code, and file a bug to have indexing move off nuget.core?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be replicated in client ( and then removed here).
V2v3 is the new indexing code that also drops nuget.core, so should automatically benefit from client fix.

Can I deploy this one to gallery for the time being?

Choose a reason for hiding this comment

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

this looks good to me, I'd suggest another signoff, and I would suggest that you start the client fix/indexing code (or @joyhui can suggest someone else)

Copy link

Choose a reason for hiding this comment

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

I am fine with this change. But since we plan to add bunch of validation in our road map, we may refine the validation structure anyway.

faster?
if( supportedFrameworks.Any( fx => !string.IsNullOrEmpty(fx) && fx.StartsWith("portable-", StringComparison.OrdinalIgnoreCase) && fx.Split('-').Length > 2)))
{
throw ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created client issue: NuGet/Home#1869

@maartenba maartenba force-pushed the issue-2822 branch 2 times, most recently from 5643e37 to 114b34b Compare December 22, 2015 18:26
}

var shortFolderName = frameworkName.GetShortFolderName();
if (String.Equals(shortFolderName, "any", StringComparison.OrdinalIgnoreCase))
Copy link

Choose a reason for hiding this comment

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

Same comments as above.
If we have same help class across project, we may want to extract them to a common project or may be add helper class as reference to the project.

@joyhui
Copy link

joyhui commented Dec 22, 2015

I am ok with the change.

maartenba added a commit that referenced this pull request Dec 22, 2015
Frameworks within the portable profile are not allowed to have profiles themselves
@maartenba maartenba merged commit 30b4ab1 into master Dec 22, 2015
@maartenba maartenba deleted the issue-2822 branch December 22, 2015 18:46
@maartenba maartenba mentioned this pull request Dec 22, 2015
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants