-
Notifications
You must be signed in to change notification settings - Fork 642
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
Conversation
/cc @emgarten |
c2589ca
to
a23ab9d
Compare
241b9f5
to
bfca1e5
Compare
@@ -569,6 +583,24 @@ private static void ValidateNuGetPackageMetadata(PackageMetadata packageMetadata | |||
} | |||
} | |||
} | |||
|
|||
private static void ValidateSupportedFrameworks(string[] supportedFrameworks) | |||
{ |
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.
can we instead of explicitly checking for the hyphen, share the code that the indexing task is using?
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.
Indexing uses NuGet.Core still (which does the check similar to this)
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.
So should we move this check into the client code, and file a bug to have indexing move off nuget.core?
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.
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?
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.
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)
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.
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 ...
}
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.
Created client issue: NuGet/Home#1869
5643e37
to
114b34b
Compare
} | ||
|
||
var shortFolderName = frameworkName.GetShortFolderName(); | ||
if (String.Equals(shortFolderName, "any", StringComparison.OrdinalIgnoreCase)) |
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.
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.
I am ok with the change. |
114b34b
to
b0eb555
Compare
Frameworks within the portable profile are not allowed to have profiles themselves
Fixes #2822