-
Notifications
You must be signed in to change notification settings - Fork 253
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
NuGet stealth downgrades package when batch updating its dependencies #1903
Comments
We are discussing this, but at the moment we are not clear that this can actually be solved, because we actually don't model the fact that A is something that shouldn't be updated (and frankly I can see cases where it might be updated). A simple solution is to add a downgrade warning, but I'm not sure if this is a good enough solution. Assigning to @johnataylor to look further into the matter |
Thanks for looking into it! My preference is that if the requested batch update can only succeed by downgrading package X, then the user should be informed that package X is preventing the update and let the user handle it from there. This is what happens today when updating an individual package. The offending package is printed with its dependency range in the Output Window:
|
I believe we only downgrade dependencies if the high level action was a downgrade. Here it looks like it was an upgrade that caused a child to be downgraded, right? |
@emgarten Correct. |
regarding the problem @carolynvs reports. I just installed: id="openstack.net" version="1.5.0.2" and then ran Update-Package from the NuGet Console. I'm not seeing a downgrade happen, so if you could send me more details of teh exact scenario that would be great. For example the packages.config would be a good start. This is what I saw before and after executing Update-Package. BEFORE id="Flurl.Http.Signed" version="0.6.2.2015062601" AFTER id="Flurl.Http.Signed" version="0.6.4" |
@johnataylor If you look at the screenshots in the original post, you'll see that I used the GUI, not the console and it only happens when updating multiple packages (openstack.net's 4 dependencies). Here are the steps to reproduce:
|
Unfortunately we haven't gotten to this bug in 3.4 release, I'm moving out to 3.5 |
From @carolynvs on January 7, 2016 19:57
tldr: When batch updating packages, NuGet should not downgrade other packages.
After installing openstack.net 1.5.0.2, I immediately see 4 available updates (for its dependencies). This isn't ideal behavior as when I attempt to individually update any of these, it will fail with a message in the Output window. It would be better if it did not display the updates, instead of letting me try and fail but at least it doesn't do any harm. 😄
The big problem is that when I select all available updates, NuGet decides that instead of failing, it should downgrade the openstack.net package. This is bad because it was not what I requested and is unexpected behavior. I intended to update the checked packages to the latest version, not downgrade some other package. If I do not have the "Show preview window" setting enabled, or fail to carefully read it, I end up screwing up my project.
Copied from original issue: NuGet/NuGetGallery#2851
The text was updated successfully, but these errors were encountered: