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

convert-from-nuget indirect refs should not override direct deps #163

Closed
bartelink opened this issue Sep 24, 2014 · 5 comments
Closed

convert-from-nuget indirect refs should not override direct deps #163

bartelink opened this issue Sep 24, 2014 · 5 comments

Comments

@bartelink
Copy link
Member

convert-from-nuget got the conversion of hyprlinkr almost perfect:

There were 2 unit tests using Moq, both specifying 4.2.1312.1622.

The converted file instead had latest (4.2.1409.1722)

This is more than likely due to, as the lock file shows, AutoFixture has an indirect reference to Moq too:

    AutoFixture.AutoMoq (3.16.4)
      AutoFixture (>= 3.16.4)
      Moq (>= 3.1)

The tests have assemblyRedirect elements pointing at the specific Moq version and test running fails when the when the version is inferred incorrectly.

One final thing is that the global packages.config didnt declare NuGet.CommandLine, so deps needs:

nuget NuGet.CommandLine

Final deps file with 2 adjustments above:

source http://nuget.org/api/v2

nuget Moq 4.2.1312.1622
nuget NuGet.CommandLine

nuget xunit.runners 1.9.2
nuget Zero29 0.5.0
nuget Microsoft.AspNet.Mvc 4.0.20710.0
nuget Microsoft.AspNet.Razor 2.0.20710.0
nuget Microsoft.AspNet.WebApi 4.0.20710.0
nuget Microsoft.AspNet.WebApi.Client 4.0.20710.0
nuget Microsoft.AspNet.WebApi.Core 4.0.20710.0
nuget Microsoft.AspNet.WebApi.WebHost 4.0.20710.0
nuget Microsoft.AspNet.WebPages 2.0.20710.0
nuget Microsoft.Net.Http 2.0.20710.0
nuget Microsoft.Web.Infrastructure 1.0.0.0
nuget Newtonsoft.Json 5.0.8
nuget Albedo 0.5.0
nuget AutoFixture 3.16.4
nuget AutoFixture.AutoMoq 3.16.4
nuget AutoFixture.Idioms 3.16.4
nuget AutoFixture.Xunit 3.16.4
nuget netfx-Guard 1.3.2.0
nuget netfx-Reflector 1.0.0.10
nuget xunit 1.9.2
nuget xunit.extensions 1.9.2
@theimowski
Copy link
Member

what was the warning message? convert-from-nuget should take latest version from all defined in packages.config files, so maybe it's likely that one of your project had the dep on that version?

@bartelink
Copy link
Member Author

No, 2 had exactly 4.2.1312.1622

But an indirect dep (Moq from AutoFixture), specifies >= 3.1

This resulted in the deps file getting 4.2.1409.1722 instead of 4.2.1312.1622

UPDATE: Can review the messages but pretty confident it is wrong (the tests fail :) )

@bartelink
Copy link
Member Author

@theimowski One thing I didnt mention is that it #158 is also useful in the context of converting hyprlinkr

@theimowski
Copy link
Member

what's the status of this? Is the --interactive mode for simplify enough to deal with the problem?

@bartelink
Copy link
Member Author

I don't know - for me there is a clear algorithmically derivable solution, and I'd prefer that. But OTOH I'll be honest and say that I haven't used --interactive (I want it to do its best, warn about stuff it can warn about, giving suggestions. I can edit the file myself).

The bottom line is that the assembly redirects in the project want it to be exactly that version and an indirect dependency I have no control over caused it to agressively override 2 identical clear instructions)

But I'm not familiar with the resolution code - if this conflicts with a lot of what it does this might be very messy. And there are definitely bigger fish to fry - as #154 shows, there's plenty scope for more work on the coding rules. Fixing this is not exactly closing the final issue in resolution 4eva :)

I'd moan a lot more if other issues are closed than I would for this one, but unless someone can explain why I'm wrong I do consider it technically a bug.

@forki forki closed this as completed Jan 31, 2015
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

No branches or pull requests

3 participants