Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Add interactive for the list command #10721

Closed

Conversation

nkolev92
Copy link

@nkolev92 nkolev92 commented Feb 7, 2019

Fix for NuGet/Home#7605 and NuGet/Home#7727.

The list command talks to the sources, so it needs an interactive switch.

//cc @wli3

I have trouble building locally. (build.cmd doesn't seem to be the right thing).

I'll bug people tomorrow to complete the fix.

 "C:\Users\NK\Documents\Code\dotnet\cli\build.proj" (default target) (1) ->
         C:\Users\NK\Documents\Code\dotnet\cli\Directory.Build.props(38,3): error MSB4019: The imported project "C:\Users\NK\Documents\Code\dotnet\cli\bin\obj\GitCommitInfo.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\NK\Documents\Code\dotnet\cli\build.proj]

@wli3
Copy link

wli3 commented Feb 7, 2019

@nkolev92 if these code is all we need i can take it from there. for the specific issue. I've seen it once in a while, maybe commit all the change and then git clean -fxd

@nkolev92
Copy link
Author

nkolev92 commented Feb 7, 2019

@wli3 It's this plus fixing tests if any.

I'm ok if you take from here.
Thanks!

@nkolev92 nkolev92 changed the title [WIP] Add interactive for the list command Add interactive for the list command Feb 7, 2019
@nkolev92
Copy link
Author

🔔 @wli3

@wli3
Copy link

wli3 commented Feb 13, 2019

i need to get #10759 in and merge to 2.2.2xx and then i can move this PR forward

@wli3
Copy link

wli3 commented Feb 14, 2019

@nkolev92 I have an update branch here https://github.com/dotnet/cli/tree/dotnetListPackageInteractive

However it is giving me error:

c:\work2\restoreauthproject (master)
λ dotnet list package --interactive
Specify --help for a list of available options and commands.
error: Missing value for option 'interactive'

and seems something wrong with the command config

I can see --interactive is "supported"

c:\work2\restoreauthproject (master)
λ dotnet C:\work2\cli-github\bin\2\win-x64\dotnet\sdk\2.2.200-preview-009869\NuGet.CommandLine.XPlat.dll package list c:\work2\restoreauthproject\restoreauthproject.csproj --help


Usage: NuGet.CommandLine.XPlat.dll package list [arguments] [options]

Arguments:
  <PROJECT | SOLUTION>  A path to a project, solution file or directory.

Options:
  -h|--help               Show help information
  --force-english-output  Forces the application to run using an invariant, English-based culture.
  --framework             Specifies the target framework for which the packages will be listed.
  --outdated              Displays only the packages that need updates with the latest version from the sources.
  --deprecated            Displays only the packages marked deprecated by the authors.
  --include-transitive    Includes transitive packages too in the result.
  --include-prerelease    Considers prerelease versions when looking for latest. Works only with `--outdated`.
  --highest-patch         Considers only the versions with matching minor and major. Works only with `--outdated`.
  --highest-minor         Considers only the versions with matching major. Works only with `--outdated`.
  --source                Sources to lookup for latest versions. Works only with `--outdated`.
  --config                A path to a config file to specify sources. Works only with `--outdated`.
HERE---->  --interactive           Allow the command to block and require manual action for operations like authentication. 

But it does not get passed in

c:\work2\restoreauthproject (master)
λ dotnet C:\work2\cli-github\bin\2\win-x64\dotnet\sdk\2.2.200-preview-009869\NuGet.CommandLine.XPlat.dll package list c:\work2\restoreauthproject\restoreauthproject.csproj --interactive
Specify --help for a list of available options and commands.
error: Missing value for option 'interactive'

@nkolev92
Copy link
Author

@wli3

Will this wait for a NuGet insertion containing the bug fix?

@wli3
Copy link

wli3 commented Feb 20, 2019

yes. And I talked to Livar, we want to target this change to 3.0.1xx since 2.2.2xx is in ask mode

@nkolev92
Copy link
Author

This is targetting 2.2.2x though. Dotnet list package is only in 2.2.

Is there any chance it can go in 2.2.2xx?
It's a fairly safe change and 3.0 is very far down the line.

@nkolev92
Copy link
Author

@wli3
How do we want to handle this? To which version should I retarget.

@wli3
Copy link

wli3 commented Mar 14, 2019

@livarcocc is 2.2.2xx servicing open?
@nkolev92 Sorry about the delay. We need approval for servicing of this change. The edit code is here https://github.com/wli3/cli/commits/dotnetListPackageInteractive should be good to go

@nkolev92
Copy link
Author

@wli3
Do you want to just open a PR from your branch?

I just wanted to make sure we don't forget about it :)

@livarcocc
Copy link

We should put this in master to ship with .NET Core 3.0. If you feel like this is important enough to go out with 2.2, then we will need to fill out the ask mode template and take it to shiproom for approval for servicing of 2.2.

I personally think we should put it in 3.0.

@nkolev92
Copy link
Author

From the old e-mail thread we have.

If the change in NuGet is not in sync with the change in dotnet CLI, someone will do “dotnet list package help” and get –interactive as an option while the CLI will not forward it to NuGet. So basically they need to be in sync.

We should consider taking it as early as possible, even if that's not 2.2.2xx.
//cc @rrelyea

@wli3
Copy link

wli3 commented Mar 15, 2019

@nkolev92 @rrelyea , I talked to @livarcocc and we think help mismatch does not meet the bar for servicing. And we think we should target 3.0.1xx, although we are open to discuss if you disagree.

@nkolev92
Copy link
Author

@wli3
That's fine for now.

Do you want to open a PR with your added changes or should I cherry-pick those onto my branch?

@wli3
Copy link

wli3 commented Mar 18, 2019

@nkolev92 awesome, i'll do that

@wli3
Copy link

wli3 commented Mar 19, 2019

retarget in #10994

@wli3 wli3 closed this Mar 19, 2019
@nkolev92
Copy link
Author

thanks @wli3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants