RFR: 8189102: All tools should support -?, -h and --help
Lindenmaier, Goetz
goetz.lindenmaier at sap.com
Mon Nov 20 11:21:57 UTC 2017
Hi Jon,
thanks for your feedback.
Sorry for getting the javac/Javadoc wrong, I missed that.
The point is that the option implementation there does not have
the possibility to accept an option but not document it.
javac:
I'd like to propose to add -help again. javac else prints:
javac: invalid flag: -help
Usage: javac <options> <source files>
use --help for a list of possible options
Which isn't that nice.
Javadoc:
I'd prefer to remove -help because then it's not documented
which is more streamlined with the overall idea of this change. And Javadoc
behaves "friendly": Javadoc -help prints the usage but exits with
return code '1'. I don't think that's a major problem.
I'll update the CSR accordingly once we decide on this.
I'm happy not to edit the properties files :) I'll revert that.
(Although I would have liked to edit some of the German translations.)
I fixed the typos in the CSR.
Best regards,
Goetz
Change to javac:
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java Tue Oct 10 14:39:45 2017 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java Mon Nov 20 12:19:49 2017 +0100
@@ -360,7 +360,7 @@
},
// Note: -h is already taken for "native header output directory".
- HELP("-? --help", "opt.help", STANDARD, INFO) {
+ HELP("-? --help -help", "opt.help", STANDARD, INFO) {
@Override
public void process(OptionHelper helper, String option) throws InvalidValueException {
Log log = helper.getLog();
> -----Original Message-----
> From: Jonathan Gibbons [mailto:jonathan.gibbons at oracle.com]
> Sent: Freitag, 17. November 2017 19:30
> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; core-libs-
> dev at openjdk.java.net; 'compiler-dev at openjdk.java.net' <compiler-
> dev at openjdk.java.net>; serviceability-dev (serviceability-
> dev at openjdk.java.net) <serviceability-dev at openjdk.java.net>
> Subject: Re: RFR: 8189102: All tools should support -?, -h and --help
>
> Goetz,
>
> I understand why you might want to ensure that a basic set of help options is
> supported,
> but I don't understand why that justifies removing older options, like "-help"
> for many tools.
>
> In addition, I notice the CSR says:
>
>
>
> Compatibility Risk Description:
> <https://bugs.openjdk.java.net/browse/JDK-8191477#> Only new flags are
> added, none removed.
>
>
>
> But that is not true, since your edits for javac and javadoc remove the option
> completely.
>
> Also, in the CSR, look for these typos:
> serveral
> deperecation
> OpenJdk (should be OpenJDK)
>
>
> Also, I note that you've changed localized resource files. The usual procedure
> is to never
> touch those files, since they get updated later by Oracle's localization team.
>
> -- Jon
>
>
> On 11/17/2017 03:23 AM, Lindenmaier, Goetz wrote:
>
>
> Hi,
>
> please review this change. I also filed a CSR for this:
> http://cr.openjdk.java.net/~goetz/wr17/8189102-
> helpMessage/webrev.02/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8189102
> CSR: https://bugs.openjdk.java.net/browse/JDK-8191477
>
> See the webrev for a detailed description of the changes.
>
> If required, I'll make break-out changes to be reviewed separately.
>
> I had posted a RFR before, but improved the change to
> give a more complete overview of currently supported flags
> for the CSR:
> http://mail.openjdk.java.net/pipermail/hotspot-dev/2017-
> October/028615.html
>
> Best regards,
> Goetz.
>
>
More information about the serviceability-dev
mailing list