NuGet / Home

Repo for NuGet Client issues
Other
1.49k stars 250 forks source link

Add a re-list command (opposite of delete) #6329

Open skofman1 opened 6 years ago

skofman1 commented 6 years ago

@karann-msft commented in a discussion here: https://github.com/NuGet/NuGetGallery/issues/5191 here's what happens when you try running the publish command

C:\Users\karann>nuget publish PrintHelloNuget 1.4.8 -source nuget.org -apikey <redacted>
Unknown command: 'publish'
NuGet.CommandLine.CommandLineException: Unknown command: 'publish'
   at NuGet.CommandLine.CommandManager.GetCommand(String commandName)
   at NuGet.CommandLine.CommandLineParser.ParseCommandLine(IEnumerable`1 commandLineArgs)
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)

Not a documentation issue.

Moreover, no such command shows up in nuget help

emgarten commented 6 years ago

dotnet.exe has a publish command that copies all binaries to an output folder. That command is not related to nuget so we should avoid re-using the same command name in a different way.

karann-msft commented 6 years ago

since "list" and "publish" are taken. I am thinking using nuget delete with an option to relist nuget delete -relist or create a new top level command called nuget relist @anangaur thoughts?

anangaur commented 6 years ago

nuget delete -relist seems to be non-intuitive. What about nuget enlist?

joelverhagen commented 6 years ago

enlist is a kind of a loaded and confusing term. My personal preference:

  1. nuget relist - most clear but highly visible for a less common scenario
  2. nuget push ID VERSION -relist - better since push seems like a closer match than delete
  3. nuget delete ID VERSION -relist - since it's essentially the inverse of delete in the NuGet.org case
joelverhagen commented 6 years ago

I also agree publish is not great since that could be easily confused with dotnet publish as @emgarten mentioned.

anangaur commented 6 years ago

May be relist is the right option. The only problem I have with this verb is that its not related to list and hence can be confusing. As of now not convinced if we should overload push or delete.

karann-msft commented 6 years ago

I agree with Joel that enlist would be confusing. We all seem to be leaning towards relist.

relist, typically used would mean, listing again. But for NuGet, listmeans displaying a list of packages from a given source. Hence, relistas a top level command doesn't intuitively lend itself to mean the opposite of delete/unlist.

However, someone who uses delete on NuGet.org knows it unlists the packages. Hence, giving an option to undo that, would be more intuitive in my opinion. Also, to Joel's point, this is not the most common of scenarios and doesn't need a top level command.

Given that, my proposal would be to go with nuget delete ID VERSION -relist

GanesanRengasamy commented 5 years ago

Hi All,

Is this available in latest nuget.exe? If not, when relist option available in nuget.exe for relist the unlist packages.

Thanks, Ganesan R.

karann-msft commented 5 years ago

@GanesanRengasamy - no this has not be implemented and there aren't any plans yet to do so. Can you talk more about your scenario? Do you unlist packages often? Or do you have a private nuget server and want a way to delete packages?