-
Notifications
You must be signed in to change notification settings - Fork 905
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 doesn't handle conflicts of versions in an install request when HighestVersion dependency #507
Comments
Similar to #116 (although in this case it does). |
@maartenba / @xavierdecoster Did NuGet v3 fix this problem? I am working on reproducing it all the way up. |
Here is a reproduction - repro.zip Unzip this and add it to a local folder, then add that local folder in visual studio nuget manager. Run this command It fails in VS2013 which looks like it includes up to 2.8.7 in the latest available extension. I'm curious if it also fails in VS2015 (which includes 3.x). |
Add packages that present an error when one of the dependencies depend on a less constrained but still appropriate version of a dependency that the top level package also depends on for an exact version. This is a scenario that should absolutely work but does not.
NuGet should walk a dependency tree and find the most appropriate package by falling back down the dependency tree until it finds an appropriate version that is suitable for all dependency sets and then fail appropriately if no suitable version can be found. Unfortunately when you use a Dependency Version Behavior of Highest, NuGet just fails completely and refuses to work at all. I've been able to verify this as high as the latest version of NuGet package manager that is available with VS2013. I'm hopeful this is fixed in the v3.x of NuGet.Core.
* stable: (GH-507)(specs) fixup spelling
Best to post an issue at http://github.com/nuget/home |
@maartenba I am planning on it, but if you had any updates as to whether this was fixed ahead of time, it would be helpful. |
Hate to post an issue for something that may have already been fixed. |
No idea personally, maybe @xavierdecoster |
@maartenba / @xavierdecoster - I followed up with NuGet/Home#1839 |
@gep13 verified this works properly in v3. |
This will require .NET 4.5 for the upgrade to a v3 version of NuGet so this will need to move to 0.9.11 where we are eclipsing support for .NET 4 (and Windows 2003). |
I just got bit with this again with version 0.10.8. Is it actually still open? The packages I'm using are internal so I can't directly expose them but the dependency chain was basically: X 1.1 this is actually wants being specified to be installed in Chocolatey X-config 1.0 X-collateral 1.0 If I install X 1.1 beforehand then we're cool. If I install X-wrapper 1.1 then X-config seems to grab X 1.2, then X-wrapper tries to get X 1.1, and the world explodes. |
Howdy @rockobonaparte - we are typically quite good at the paperwork aspect of our tickets, so if it is still open, it's likely still an issue. There are sometimes we do have duplicates that are not caught so they get tagged for the release and older issues might be missed in that regard. We are looking to upgrade NuGet coming in the next few months (hopefully completed by mid 2021). |
This issue appears to be fixed as a part of #2740, by enabling/completing the below tests: choco/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs Lines 3251 to 3459 in c0e2f84
|
Do you know how I can mess around with the sum of that and see what's going on? Version resolution came up recently among colleagues so we are actually still motivated over stuff like this. |
@rockobonaparte there is an alpha release available: https://blog.chocolatey.org/2023/01/chocolatey-cli-v2-alpha-release/ |
🎉 This issue has been resolved in version 2.0.0 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
The NuGet dependency walker doesn't seem to be able to handle the scenario where a package has a dependency constraint on a package version and another dependency has a similar, but looser constraint on a package version.
It fails with
Already referencing a newer version of 'x'.
Related to #227 and #506.
From: https://groups.google.com/d/msgid/chocolatey/ad9e0b37-a81d-4c75-98c7-c84c787b8859%40googlegroups.com?utm_medium=email&utm_source=footer
Hasdependency.nuspec:
isdependency.nuspec
isexactversiondependency.nuspec (with one file so it will build) - 1.0.0
isexactversiondependency.nuspec (with one file so it will build) - 1.1.0
The text was updated successfully, but these errors were encountered: