Skip to content
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

[WIP] [Suggestion] Adding the ability to simulate a package update #1649

Closed
wants to merge 1 commit into from

Conversation

AndrewGretton
Copy link

What is this?

A new command line option for "nuget update", which lets a user simulate rather than actually perform the update. It's similar to the "-whatif" option which is already available in some of the PMC cmdlets.

When this option is included, nuget will not make any modifications. Instead, it will print the package name, the currently installed version, and the version it would update to (taking into account whether the user has opted into prelease packages). If a package installation brings in any new dependencies, the user will be informed about a new package install rather than a version update.

Why?

We have often wanted to be able to run CI tasks that report on packages being out of date, or report on new major version availability, etc. In some cases, we’d even like to fail a build if a package is no longer up to date. We cannot currently do this because the existing cmdlets can only run within the context of Visual Studio’s Package Management Console.

Is this PR 100% ready?

No. While I've scanned the wiki, I'm not very familiar with the codebase, so apologies in advance for violations of style, convention, architecture, etc.

I really just wanted to show this to determine if there would be an appetite to include this as a feature addition? If so, I can raise an issue to associate it with, write any appropriate tests, refactor, etc.

Thanks for spending the time to read this!

@dnfclas
Copy link

dnfclas commented Aug 15, 2017

@AndrewGretton,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla2.dotnetfoundation.org.

It will cover your contributions to all .NET Foundation-managed open source projects.
Thanks,
.NET Foundation Pull Request Bot

@nkolev92
Copy link
Member

Thank you for this PR @AndrewGretton .

Can you please creating a matching issue https://github.com/NuGet/Home/issues/new , so we can separate the feature proposal discussion from the implementation.

@jainaashish
Copy link
Contributor

Thanks @AndrewGretton for this PR and starting this discussion. I really see a potential there to improve CI experience with having this option with some of the nuget.exe commands. But as @nkolev92 suggested, it will be better if you first create a new issue and explain your case there. That way we will be able to get community feedback (comments, up votes, etc...) and would be easy for us to decide the next course of actions.

@AndrewGretton
Copy link
Author

Thanks - I've created an issue here NuGet/Home#5762

@dnfclas
Copy link

dnfclas commented Aug 22, 2017

@AndrewGretton, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.

Thanks, .NET Foundation Pull Request Bot

@emgarten
Copy link
Member

Closing due to lack of activity.

I think this change is useful, but my concern is the lack of support for PackageReference here which is what NuGet is moving to. Adding new features only to legacy commands at this time does not make sense.

@emgarten emgarten closed this Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants