-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add dotnet package search #36289
Add dotnet package search #36289
Conversation
Will this do all that |
Yes, it will, but there is some difference. The equivalent command would be About the speed, I will have to do some testing and compare the two to make a conclusion. |
aedbeaa
to
27e83c3
Compare
@Nigusu-Allehu thanks
The key here may be searching all the sources in parallel. I'm guessing that "restore" does not do this, because there is an ordering of feeds. But for listing, we want results from all the feeds. |
|
||
namespace Microsoft.DotNet.Cli | ||
{ | ||
internal class PackageSearchCommand : CommandBase |
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.
Maybe could be sealed
internal class PackageSearchCommand : CommandBase | |
internal sealed class PackageSearchCommand : CommandBase |
52b0637
to
c5012d9
Compare
I don't see any tests for the new functionality. |
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 great! amazing job.
there are a couple of thoughts I have about aliasing but they dont necessarily need to be addressed here.
dotnet search package
<> dotnet package search
<> dotnet search
even.
@baronfel thoughts on above? Maybe in the far future we can refactor a completely 3-in-1 dotnet search
experience where tools/workloads/packages all search nicely!
I'm kinda sad that we have If we now have a Having said that, awesome to have native package search in the CLI :D 🎆 |
@baronfel Yes, a bit sad but at the same time these are challenges to work through. The prior art may have inspired the names too much i.e. workloads/tool, and hopefully a quick alias can fix that and even lead to some delight of users who are dyslexic like me accidentally using this command! Otherwise if this is a major concern by SDK, we should refactor and then alias anyway given it could be helpful. |
|
||
namespace Microsoft.DotNet.Cli | ||
{ | ||
internal class PackageCommandParser |
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.
Maybe could be static
since there're no instance members
internal class PackageCommandParser | |
internal static class PackageCommandParser |
src/Cli/dotnet/commands/dotnet-package/search/PackageSearchCommandParser.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-package/search/PackageSearchCommandParser.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-package/search/PackageSearchCommandParser.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-package/search/PackageSearchCommandParser.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-package/search/PackageSearchCommandParser.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Weihan Li <weihanli@outlook.com>
|
||
public static CliCommand GetCommand() | ||
{ | ||
CliCommand command = new DocumentedCommand("package", DocsLink); |
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.
var command = new DocumentedCommand("restore", DocsLink, LocalizableStrings.AppFullName); |
RestoreCommandParser passes additional argument (LocalizableStrings.AppFullName). I am not sure on what is the behavior change because of passing the additional parameter.
/backport to release/8.0.2xx |
Started backporting to release/8.0.2xx: https://github.com/dotnet/sdk/actions/runs/7482205215 |
@Nigusu-Allehu an error occurred while backporting to release/8.0.2xx, please check the run log for details! Error: @Nigusu-Allehu is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your dotnet team membership visibility is set to Public on https://github.com/orgs/dotnet/people?query=Nigusu-Allehu |
/backport to release/8.0.2xx |
Started backporting to release/8.0.2xx: https://github.com/dotnet/sdk/actions/runs/7482215172 |
Fixes: NuGet/Home#6060
Description
add a new command
dotnet package search
The spec of the new command is found here : Spec for
dotnet package search
: implements asearch
functionality. NuGet/Home#12886Here is the nuget.client side : Add dotnet package search NuGet/NuGet.Client#5466
Here is what a
dotnet package search nuget
would look like