-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8296420: javac has long lines in its command-line help #13329
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
Conversation
👋 Welcome back archiecobbs! A progress list of the required criteria for merging this PR into |
@archiecobbs The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
javac.opt.Werror=\ | ||
Terminate compilation if warnings occur | ||
javac.opt.A=\ | ||
Options to pass to annotation processors | ||
javac.opt.implicit=\ | ||
Specify whether or not to generate class files for implicitly referenced files | ||
Specify whether or not to generate class files\n\ |
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.
There's been a lot of discussion (elsewhere) of late regarding the phrase whether or not.
Generally, the consensus seems to be that the correct form in cases like this is just whether and that whether or not idiomatically means something else. With that in mind, I'd suggest dropping or not and then see how that affects the needs for any line-wrapping.
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.
Nice - and now it fits in one line :)
Fixed in cfc2c3d.
javac.opt.preview=\ | ||
Enable preview language features. To be used in conjunction with either -source or --release. | ||
Enable preview language features. To be used in conjunction\n\ |
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'd consider breaking "early", after the initial period.
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.
Fixed in b43a1ca.
final String tooLongLine = log.stream() | ||
.filter(line -> line.length() > MAX_COLUMNS) | ||
.findFirst() | ||
.orElse(null); | ||
if (tooLongLine != null) | ||
throw new Exception("output line too long: \"" + tooLongLine.trim() + "\""); | ||
} |
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.
This is good. It would be even better if you removed findFirst
and then reported all the lines if the resulting list is non-empty.
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.
Nice idea. Fixed in 2137122.
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.
Nice work; nice test!
One optional suggestion to improve the test.
@archiecobbs This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 6 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@jonathan-gibbons) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
@archiecobbs |
/sponsor |
Going to push as commit e0620b8.
Your commit was automatically rebased without conflicts. |
@vicente-romero-oracle @archiecobbs Pushed as commit e0620b8. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The issue states that the output of
javac --help
andjavac --help-extra
should not overflow 80 columns.This patch updates
javac.properties
to add newlines, etc. to address this issue, and adds a regression test.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13329/head:pull/13329
$ git checkout pull/13329
Update a local copy of the PR:
$ git checkout pull/13329
$ git pull https://git.openjdk.org/jdk.git pull/13329/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13329
View PR using the GUI difftool:
$ git pr show -t 13329
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13329.diff
Webrev
Link to Webrev Comment