Skip to content

Invoke dotnet nuget why directly through API - #44614

Merged
zivkan merged 2 commits into
dotnet:release/9.0.2xxfrom
zivkan:dotnet-nuget-why-command
Jan 4, 2025
Merged

zivkan merged 2 commits into
dotnet:release/9.0.2xxfrom
zivkan:dotnet-nuget-why-command

Conversation

@zivkan

@zivkan zivkan commented Nov 4, 2024

Copy link
Copy Markdown
Member

The initial version of dotnet nuget why required two arguments, the first being the solution, project, or directory to run as. In NuGet/NuGet.Client#5969 I made it optional, using the current directory when not provided. However, this repo has a duplicate of the CLI parser to aid tab-completion. Therefore, even when the command works, there's an error message:

image

Following NuGet/NuGet.Client#6118, this PR changes the dotnet CLI to get the CLI parser from NuGet directly (this command uses System.CommandLine), so dotnet nuget why no longer needs to be invoked though the NuGet.CommandLine.XPlat console app. Therefore, any future changes to dotnet nuget why will apply automatically on NuGet insertion, rather than needing duplicate CLI parsing changes in both repos.

@zivkan
zivkan requested a review from a team as a code owner November 4, 2024 04:03
@ghost ghost added Area-Infrastructure untriaged Request triage from a team member labels Nov 4, 2024

@baronfel baronfel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Love to see this kind of deeper integration! One note about the help that we may need to create a bridge for in some way.

@nkolev92

nkolev92 commented Nov 4, 2024

Copy link
Copy Markdown
Contributor

I looked at this and the changes look reasonable as far as the NuGet side goes.

@nkolev92

nkolev92 commented Dec 5, 2024

Copy link
Copy Markdown
Contributor

I'm guessing this PR was accidentally closed by GH's keywords, but it's actually something that needs to be reopened, right @zivkan

@zivkan
zivkan force-pushed the dotnet-nuget-why-command branch 2 times, most recently from 30f49f9 to e34bb9e Compare December 14, 2024 01:48
@zivkan
zivkan force-pushed the dotnet-nuget-why-command branch from e34bb9e to bbfcb2a Compare December 14, 2024 01:53
@zivkan
zivkan marked this pull request as ready for review December 14, 2024 01:54
@zivkan
zivkan requested a review from baronfel December 14, 2024 01:54
@zivkan

zivkan commented Dec 18, 2024

Copy link
Copy Markdown
Member Author

@dotnet/nuget-team @dotnet/dotnet-cli This PR was opened a while ago, but it's ready for review now, please. It would be nice to get in time for 9.0.200.

The Mac test job appears to be timing out on all builds/prs, so I assume it's not a blocking issue for this PR.

@baronfel baronfel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Couldn't be more excited for this first step into deeper integration :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Infrastructure untriaged Request triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants