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

Missing dependency in NUPKG-file generated from project if indirect dependency already exists with a lower version requirement #759

Closed
yishaigalatzer opened this Issue Jun 10, 2015 · 10 comments

Comments

Projects
None yet
6 participants
@yishaigalatzer

yishaigalatzer commented Jun 10, 2015

Copied from: https://nuget.codeplex.com/workitem/4417

Scenario:
A project C has the following dependencies:
Package A, version=1.2
Package B, version=1.0, with a dependency on Package A, version=[1.0,2.0)

NuGet.exe pack C.csproj will now generate the following packge:
Package C, with a dependency on Package B, version=1.0

But since project C directly depends version 1.2 of Package A, I expect:
Package C, with a dependency on Package B, version=1.0 and a dependency on Package A, version=1.2

Now, when the Package C is installed into a consumer project, NuGet will install Package A, version=1.0 and Package B, version=1.0, even though the assembly contained in Package C has been linked against the assembly from Package A, version 1.2.

A real world sample of this is attached in the repro-sample. Here, the Coypu-package only requires Selenium.WebDriver version 2.39 or greater, but the project depends on Selenium.WebDriver version 2.44.

Affected version 2.8.3 (and 3.0.0-preview / master 86a4b0fb0ecb8a75dae46073e54fb0e492f5ac6c)

https://nuget.codeplex.com/discussions/577811
https://nuget.codeplex.com/SourceControl/network/forks/MichaelKetting/dev/contribution/7907

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Jun 10, 2015

We think the PR is a good start, but we probably need a better P2P walk than just looking at top level.

We will take a look at this for Update I (or before), and would like to discuss the design here, before re-submitting a PR.

yishaigalatzer commented Jun 10, 2015

We think the PR is a good start, but we probably need a better P2P walk than just looking at top level.

We will take a look at this for Update I (or before), and would like to discuss the design here, before re-submitting a PR.

@yishaigalatzer yishaigalatzer added this to the 3.1.0-Beta milestone Jun 10, 2015

@MichaelKetting

This comment has been minimized.

Show comment
Hide comment
@MichaelKetting

MichaelKetting Jun 11, 2015

@yishaigalatzer Thanks for porting the bug!

MichaelKetting commented Jun 11, 2015

@yishaigalatzer Thanks for porting the bug!

@MichaelKetting

This comment has been minimized.

Show comment
Hide comment
@MichaelKetting

MichaelKetting Oct 20, 2015

Okay, I know it's been a (long) while, but since this just bit me majorly (broken release), I've decided to put a break on other stuff and look into this.

@yishaigalatzer Back when we discussed this at http://blog.nuget.org/20150601/nuget-3.0-rc2.html, you mentioned that the design is not there yet. Was it just the recurisive angle or is there more? Also, I'm quite happy to do a 'simple' solution for NuGet v2 first, given that that's what I actually need. (I don't see a way forward to NuGet v3 for me at the moment, given the breaking changes.)

What do you need for v2 and what would be required for v3? I'm thinking of starting to tinker with recursive lookup on the NuGet v2 code base this weekend to get things rolling, but if you guys have time before that for discussing things, that'd be great, too! :)

MichaelKetting commented Oct 20, 2015

Okay, I know it's been a (long) while, but since this just bit me majorly (broken release), I've decided to put a break on other stuff and look into this.

@yishaigalatzer Back when we discussed this at http://blog.nuget.org/20150601/nuget-3.0-rc2.html, you mentioned that the design is not there yet. Was it just the recurisive angle or is there more? Also, I'm quite happy to do a 'simple' solution for NuGet v2 first, given that that's what I actually need. (I don't see a way forward to NuGet v3 for me at the moment, given the breaking changes.)

What do you need for v2 and what would be required for v3? I'm thinking of starting to tinker with recursive lookup on the NuGet v2 code base this weekend to get things rolling, but if you guys have time before that for discussing things, that'd be great, too! :)

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Oct 20, 2015

The code is in nuget2 repo, and applies to the command line built by nuget.client repo.

Yishai


From: Michael Kettingmailto:notifications@github.com
Sent: ‎10/‎19/‎2015 11:33 PM
To: NuGet/Homemailto:Home@noreply.github.com
Cc: Yishai Galatzermailto:yigalatz@microsoft.com
Subject: Re: [Home] Missing dependency in NUPKG-file generated from project if indirect dependency already exists with a lower version requirement (#759)

Okay, I know it's been a (long) while, but since this just bit me majorly (broken release), I've decided to put a break on other stuff and look into this.

@yishaigalatzerhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fyishaigalatzer&data=01%7c01%7cyigalatz%40microsoft.com%7c5502e6c1730c4569146c08d2d9185b9e%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=%2fqg29nAEcrVqkuh7dq6%2bMHERUTZqxW3sp3nQ76IF2sM%3d Back when we discussed this at http://blog.nuget.org/20150601/nuget-3.0-rc2.htmlhttps://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fblog.nuget.org%2f20150601%2fnuget-3.0-rc2.html&data=01%7c01%7cyigalatz%40microsoft.com%7c5502e6c1730c4569146c08d2d9185b9e%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=AQMswBjOJliPU850Y7dmFG0eI0swvnkiNIsJfz9MuCM%3d, you mentioned that the design is not there yet. Was it just the recurisive angle or is there more? Also, I'm quite happy to do a 'simple' solution for NuGet v2 first, given that that's what I actually need. (I don't see a way forward to NuGet v3 for me at the moment, given the breaking changes.)

What do you need for v2 and what would be required for v3? I'm thinking of starting to tinker with recursive lookup on the NuGet v2 code base this weekend to get things rolling, but if you guys have time before that for discussing things, that'd be great, too! :)


Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fNuGet%2fHome%2fissues%2f759%23issuecomment-149448481&data=01%7c01%7cyigalatz%40microsoft.com%7c5502e6c1730c4569146c08d2d9185b9e%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=aY55ulcmeJybfVhrPBVPmYTc52W5dDSc3hOdELTVZQU%3d.

yishaigalatzer commented Oct 20, 2015

The code is in nuget2 repo, and applies to the command line built by nuget.client repo.

Yishai


From: Michael Kettingmailto:notifications@github.com
Sent: ‎10/‎19/‎2015 11:33 PM
To: NuGet/Homemailto:Home@noreply.github.com
Cc: Yishai Galatzermailto:yigalatz@microsoft.com
Subject: Re: [Home] Missing dependency in NUPKG-file generated from project if indirect dependency already exists with a lower version requirement (#759)

Okay, I know it's been a (long) while, but since this just bit me majorly (broken release), I've decided to put a break on other stuff and look into this.

@yishaigalatzerhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fyishaigalatzer&data=01%7c01%7cyigalatz%40microsoft.com%7c5502e6c1730c4569146c08d2d9185b9e%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=%2fqg29nAEcrVqkuh7dq6%2bMHERUTZqxW3sp3nQ76IF2sM%3d Back when we discussed this at http://blog.nuget.org/20150601/nuget-3.0-rc2.htmlhttps://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fblog.nuget.org%2f20150601%2fnuget-3.0-rc2.html&data=01%7c01%7cyigalatz%40microsoft.com%7c5502e6c1730c4569146c08d2d9185b9e%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=AQMswBjOJliPU850Y7dmFG0eI0swvnkiNIsJfz9MuCM%3d, you mentioned that the design is not there yet. Was it just the recurisive angle or is there more? Also, I'm quite happy to do a 'simple' solution for NuGet v2 first, given that that's what I actually need. (I don't see a way forward to NuGet v3 for me at the moment, given the breaking changes.)

What do you need for v2 and what would be required for v3? I'm thinking of starting to tinker with recursive lookup on the NuGet v2 code base this weekend to get things rolling, but if you guys have time before that for discussing things, that'd be great, too! :)


Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fNuGet%2fHome%2fissues%2f759%23issuecomment-149448481&data=01%7c01%7cyigalatz%40microsoft.com%7c5502e6c1730c4569146c08d2d9185b9e%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=aY55ulcmeJybfVhrPBVPmYTc52W5dDSc3hOdELTVZQU%3d.

@MichaelKetting

This comment has been minimized.

Show comment
Hide comment
@MichaelKetting

MichaelKetting Oct 20, 2015

Yes, the nuget2 repo is the one that gets used for creating the NuGet v2 releases these days, correct? That would the NuGet version I'm using when building my NuGet packages via the command line.

MichaelKetting commented Oct 20, 2015

Yes, the nuget2 repo is the one that gets used for creating the NuGet v2 releases these days, correct? That would the NuGet version I'm using when building my NuGet packages via the command line.

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Oct 20, 2015

The nuget.exe itself is built out of nuget.client

Please use the 2.10 branch

Sent from my Windows Phone


From: Michael Kettingmailto:notifications@github.com
Sent: ‎10/‎20/‎2015 8:20 AM
To: NuGet/Homemailto:Home@noreply.github.com
Cc: Yishai Galatzermailto:yigalatz@microsoft.com
Subject: Re: [Home] Missing dependency in NUPKG-file generated from project if indirect dependency already exists with a lower version requirement (#759)

Yes, the nuget2 repo is the one that gets used for creating the NuGet v2 releases these days, correct? That would the NuGet version I'm using when building my NuGet packages via the command line.


Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fNuGet%2fHome%2fissues%2f759%23issuecomment-149600286&data=01%7c01%7cyigalatz%40microsoft.com%7c0c4895c33e5a46d1213808d2d96203ee%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=%2fGWRptJgCLX3%2f%2b5MvEpnppxG1cM8yiDvAilbeayFgZM%3d.

yishaigalatzer commented Oct 20, 2015

The nuget.exe itself is built out of nuget.client

Please use the 2.10 branch

Sent from my Windows Phone


From: Michael Kettingmailto:notifications@github.com
Sent: ‎10/‎20/‎2015 8:20 AM
To: NuGet/Homemailto:Home@noreply.github.com
Cc: Yishai Galatzermailto:yigalatz@microsoft.com
Subject: Re: [Home] Missing dependency in NUPKG-file generated from project if indirect dependency already exists with a lower version requirement (#759)

Yes, the nuget2 repo is the one that gets used for creating the NuGet v2 releases these days, correct? That would the NuGet version I'm using when building my NuGet packages via the command line.


Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fNuGet%2fHome%2fissues%2f759%23issuecomment-149600286&data=01%7c01%7cyigalatz%40microsoft.com%7c0c4895c33e5a46d1213808d2d96203ee%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=%2fGWRptJgCLX3%2f%2b5MvEpnppxG1cM8yiDvAilbeayFgZM%3d.

@MichaelKetting

This comment has been minimized.

Show comment
Hide comment
@MichaelKetting

MichaelKetting Oct 20, 2015

Great, thanks!

MichaelKetting commented Oct 20, 2015

Great, thanks!

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Nov 25, 2015

@MichaelKetting we are still happy to take a PR if you are interested

yishaigalatzer commented Nov 25, 2015

@MichaelKetting we are still happy to take a PR if you are interested

@MichaelKetting

This comment has been minimized.

Show comment
Hide comment
@MichaelKetting

MichaelKetting Nov 25, 2015

@yishaigalatzer Thanks for the poke :) Work kind of spiked right after my fateful post. I should never talk about actual timetables... There is a holiday coming up in two weeks, here's hoping to that.

MichaelKetting commented Nov 25, 2015

@yishaigalatzer Thanks for the poke :) Work kind of spiked right after my fateful post. I should never talk about actual timetables... There is a holiday coming up in two weeks, here's hoping to that.

@yishaigalatzer yishaigalatzer modified the milestones: 3.4 Beta, 3.4 RTM Feb 25, 2016

@yishaigalatzer yishaigalatzer modified the milestones: 3.4 RTM, 3.4 RTM - Triage Mar 11, 2016

@rrelyea rrelyea modified the milestones: 3.4 RTM, 3.4 RTM - Triage, 3.5 Beta Mar 29, 2016

@MichaelKetting

This comment has been minimized.

Show comment
Hide comment
@MichaelKetting

MichaelKetting May 19, 2016

@toddm Thanks so much for sending the fix!

MichaelKetting commented May 19, 2016

@toddm Thanks so much for sending the fix!

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