-
Notifications
You must be signed in to change notification settings - Fork 267
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
#571 Make use of MessageUtils.getTerminalWidth when displayTerminalWidth is configured to -1 #572
Conversation
…dth is configured to -1
Well, Maven will use it as well for its output, so I'd suggest to file an issue at JAnsi, otherwise Maven will hit similar issues |
that's strange as i'm using the latest version of Maven every day since years with git bash and never have seen such display problems. it seems getTerminalWidth() is not used for the usual use cases. we also have to consider that the output of these goals may also be redirected to an outputfile, and in that case it might not be desirable to depend on the current terminal width. |
i've created fusesource/jansi#233 for JANSI if there are not objections i will merge the PR as-is, having the automatic JANSI terminal width support only optionally if configured explicitly (set to -1), because a) it's broken at least on git bash and windows and b) we have to consider the other output channels as well (e.g. output file). |
Well, it is up to you, I prefer to have a minimum set of parameters where possible. IMO switching to terminalWidth via JAnsi is already an improvement compared to what it was. Even 13249 is likely be better (and should be fixed), as I don't expect output with such long lines. |
the problem in this case is that the versions maven plugin uses the width to format the full line filled with "...". so instead of an output like
i get on git bash:
which is completely unusable. renaming the parameter is a good idea. the output as shown above is not very good readable even if ANSI terminal width is detected correctly because then the lines are rendered too wide in this style. i will drop this PR and create an new one to rename the parameter to something more feasible. |
Fixes #571
making use of MessageUtils.getTerminalWidth is not the default behavior. i tested this method on different terminals on windows and got varying results:
that's probably a bug https://github.com/fusesource/jansi, did not look deeper into this. as Git bash is quite popular on windows i advise not to enable this behavior by default.
@rfscholte WDYT?