-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[MNG-8177] Add contextual info for model warnings #1633
Conversation
As they really can come from anywhere. In case of this issue even from some eliminated POM that was read while collecting dirty tree, and was later eliminated. So confusing for users. --- https://issues.apache.org/jira/browse/MNG-8177
* Method that creates some informational string based on passed in {@link RequestTrace}. The contents of request | ||
* trace can literally be anything, but this class tries to cover "most common" cases that are happening in Maven. | ||
*/ | ||
public static String interpretTrace(boolean explain, RequestTrace requestTrace) { |
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.
explain
is always true
} else if (data instanceof CollectStepData) { | ||
CollectStepData stepData = (CollectStepData) data; | ||
return (explain ? "collect path " : "") | ||
+ stepData.getPath().stream().map(Object::toString).collect(Collectors.joining(" -> ")); |
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.
It can generate very long one line message ... maybe more readable will be separated by new line
Updated PR: in "normal" invocation, it is one liner:
When mvn -X used, it explains:
|
(I am the original reporter of this issue) I preferred the first approach to print full details out of the box. Could you add a hint " (use -X for full details)" to the short version? |
@WolfgangHG I think always printing out path would be "too much", Maven is already way way too chatty... but here are few facts to tinker about:
So IMO one liner is fine, and will add "use -X for full details" |
Updated messages: Without
With
|
One more thought: you wrote that the problematic dependency might be replaced later anyway for the effective dependency tree (as happened in my sample). Would it make sense to add another hint like "(problem might be resolved when building effective dependency tree)"? |
IMO adding that info may be superfluous (and would lengthen the message much much more). I just assume users are aware what "verbose" tree is and will be able to track it down, after all, the path is present now in message (in -X mode). |
As they really can come from anywhere. In case of this issue even from some eliminated POM that was read while collecting dirty tree, and was later eliminated. So confusing for users.
https://issues.apache.org/jira/browse/MNG-8177