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

Better information on mismatch in dependency tree #3316

Closed
fulara opened this issue Aug 7, 2018 · 4 comments · Fixed by #3438
Closed

Better information on mismatch in dependency tree #3316

fulara opened this issue Aug 7, 2018 · 4 comments · Fixed by #3438
Assignees
Milestone

Comments

@fulara
Copy link
Contributor

fulara commented Aug 7, 2018

using conan v1.6.1
Consider following scenario:
Monday:
binary foo depends on potato and carrot in both versions 1.0.0
carrot depends on potato in version 1.0.0
potato does not depends on anything.

All compiles fine.
Tuesday:
updating dependency in foo to potato 2.0.0

This leads to error like this:

Packages
    carrot/1.0.0@user/testing:1edc358bbd62390e309c027c1fcc23c7feea92d7 - Missing
    potato/2.0.0@user/testing:de9c231f84c85def9df09875e1785a1319fa8cb6 - Cache

potato/2.0.0@user/testing: Already installed!
carrot/1.0.0@user/testing: WARN: Can't find a 'carrot/1.0.0@user/testing' package for the specified options and settings:
- Settings: arch=x86_64, build_type=Release, compiler=gcc, compiler.libcxx=libstdc++, compiler.version=4.8, os=Linux
- Options: 
- Package ID: ...

ERROR: Missing prebuilt package for 'carrot/1.0.0@user/testing'
Try to build it from sources with "--build carrot"
Or read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package"

Nowhere it hints to user that it is simply the issue of the carrot depending on the potato 1.0.0.
One has to dig deeper by for example conan info to compare all the flags and the dependencies to find the issue.

Maybe it would be possible for conan to compare the settings in the prebuilt ones, and get closest match, and inform why exactly that dependency cannot work?

@danimtb
Copy link
Member

danimtb commented Aug 8, 2018

Hi @fulara and thanks a lot for your report.

Basically what is happening here is that Conan overrides potato/1.0.0 dependency declared in carrot by potato/2.0.0 as indicated in the downstream foo package. That behavior is clearly indicated in the trace:

foo/1.0.0@dani/test: Exporting package recipe
foo/1.0.0@dani/test: A new conanfile.py version was exported
foo/1.0.0@dani/test: Folder: C:\Users\danimtb\AppData\Local\Temp\tmpnh9d7itmconans\path with spaces\.conan\data\foo\1.0.0\dani\test\export
carrot/1.0.0@dani/test requirement potato/1.0.0@dani/test overriden by foo/1.0.0@dani/test to potato/2.0.0@dani/test

My understanding is that, as there is no carrot package with the new potato/2.0.0 dependency, a new carrot package has to be built. I am not sure if that is completely the right behavior (@memsharded could you take a look?) but I think the message is clear and you can even see the status of carrot package marked as "missing".

@fulara
Copy link
Contributor Author

fulara commented Aug 8, 2018

My problem regarding the error message, is that nowhere it hints to the user that the mismatch against carrot is that the carrot depends on different potato than foo does. it prints Settings which are perfect match, error message is:

WARN: Can't find a 'carrot/1.0.0@user/testing' package for the specified options and settings:

Whereas thats not true, options and settings match.

@danimtb
Copy link
Member

danimtb commented Aug 8, 2018

Yes, that's right...

As Conan uses semver mode for compatibility, changes on the major version of the requirement (potato changes from 1.0.0 to 2.0.0) changes the carrot's package ID. As carrot does not exists with potato/2.0.0 doesn't exist this is the result.

This message could be improved for sure.

@memsharded
Copy link
Member

Yes, I agree with @fulara, showing the requirements (maybe evaluated to what package_id() says) in the error message won't do any harm, and might help identifying the origin of the missing binary. I think this can be added.

@ghost ghost assigned jgsogo Aug 30, 2018
@ghost ghost added stage: review and removed to do labels Aug 30, 2018
@ghost ghost removed the stage: review label Aug 31, 2018
memsharded added a commit that referenced this issue Aug 31, 2018
Add dependencies to package output info when binary is not found (close #3316)
@memsharded memsharded added this to the 1.8 milestone Aug 31, 2018
grisumbras pushed a commit to grisumbras/conan that referenced this issue Dec 27, 2018
Add dependencies to package output info when binary is not found (close conan-io#3316)
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 a pull request may close this issue.

4 participants