-
Notifications
You must be signed in to change notification settings - Fork 946
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
[bug] Wrong advice when there are dependency conflicts #16253
Comments
Hi @ericriff Thanks for your feedback.
I am afraid this won't be possible. It is not simple to do this, conflicts break the integrity of the graph, so even trying to continue will not return all conflicts, and it might even be throwing a bunch of false positives (or at least confusing ones) after the first one, kind of C++ compilation errors with templates. It has also some technical challenges, as the conflict state is not really stored in the dependency graph nodes, so it will require a relatively large effort. And from our experience, it doesn't really make a huge difference, because they are also typically resolved one by one, iteratively.
This is also quite challenging with the current graph computation process, most information is overriden and the "state" is not there. It can be confusing too, and there are many factors that are involved like package visibility, overrides, forces and many more. This is not something that can be trivially listed in text, and this is why the
I agree that it would be better if the helper message could be improved. But there are also quite some challenges, when the conflict actually occurs, it is not that simple to the exact command that would be necessary, as there are many different inputs, like In your case, you are also seeing the effect of using a partial lockfile, and I will have a look if there are some low hanging fruits that could be used to improve the message, but if not possible, this might be considered as a UX improvement request and might not be changed or just clarified in the message. Thanks for your suggestion! |
I have been investigating this a bit:
Is a good default and work fine in many cases, replacing the There are only few scenarios that will require adding arguments, like the above requires:
I have tried to add something like I have also checked, propagating the information about the command and arguments to the point that the conflict message is printed will be cluttering the codebase a lot, I don't think it is worth the value, maintainability is very important. So I think that even if the message is not perfect for 100% of the cases, the effort and side effects of trying to improve it for some of the corner cases is too much, so better leave this as-is at the moment. Thanks very much for the feedback! |
Describe the bug
I have a simple project where there is a dependency conflict. When I create a lockfile, conan errors out and tells me to
run conan graph info
to better understand the problem. This cmd also errors out.Os: Ubuntu 22.04
Conan: 2.3.0
How to reproduce it
conanfile.txt
Where fake-package-1 has this conanfile
and fake-package-2 has
So I directly require
pybind11/2.12.0
,fake-package-1
requires forpybind11/2.11.1
andfake-package-2
requirespybind11/2.10.4
.I started with a simple lockfile which only contains the direct pybind11/2.12.0 requirement:
The first problem I see is that conan only reports one conflict:
The second problem is that it says the conflict originates from
fake-package-1
, but it doesn't say with which other package is conflicting. For this case it is simple, but it would be harder to track down on a more realistic project with many requirements.But the main problem is that the advice conan gives me to debug this issue, doesn't work
I think that Conan should:
conan graph info ...
by replacing the three dots with something like<conanfile-path>
The text was updated successfully, but these errors were encountered: