-
Notifications
You must be signed in to change notification settings - Fork 991
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
Improve graph conflict message when Conan can't show one of the conflicting recipes #13946
Improve graph conflict message when Conan can't show one of the conflicting recipes #13946
Conversation
@RubenRBS can we output graph to the stdout (e.g. json format) instead of asking to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --format=html
suggestion for conflicts is not useful at the moment, because the html output is not that evident yet. I would add the html changes in this PR too.
conans/client/graph/graph_error.py
Outdated
return f"Version conflict: " \ | ||
f"Conflict between {self.require.ref} and {self.prev_require.ref} in the graph." \ | ||
f"{conflicting_node_msg}" \ | ||
f"\nRun conan graph info ... --format=html to inspect the graph errors." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would print this --format=html
(with redirect > graph.html
) in all cases, even the "simple" part of the if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can it print actual arguments here instead of ...
? so it could be copy-pasted easily.
|
||
c.run("install --requires=engine/1.0 --requires=ai/1.0", assert_error=True) | ||
assert "Conflict between math/1.0.1 and math/1.0 in the graph" | ||
assert "Conflict originates from ai/1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check that --format=html
is also suggested
to execute this suggestion on CI server (e.g. ConanCenterIndex) I would need:
|
The idea is that not all debugging needs to happen in the CI server. Especially something that should have been detected by the developer in their machine while testing locally in the first place. It is not that a version conflict is something that only happens and can be debugged in the CI server. So the recommended approach is not start modifying the CI, but execute a |
Remove red from UI, change lib link to red |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix broken test (checking for the wrong output message), and can be merged
Changelog: Fix: Improve graph conflict message when Conan can't show one of the conflicting recipes.
Docs: Omit
The error now looks like:
The graph output with conflict errors now looks like this:
Pinging @SSE4