RFR: 8189102: All tools should support -?, -h and --help

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8189102: All tools should support -?, -h and --help

Lindenmaier, Goetz
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.

Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8189102: All tools should support -?, -h and --help

Alan Bateman
On 17/11/2017 11:23, 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.
>
A question for Jon Gibbons: In JEP 293 the guideline is that tools
should support `--help`. Do you think this should be expanded to include
`-help`, and `-?` (and maybe `-h` where it make sense)?

As regards the webrev then the changes to the localized resources can be
dropped. As Jon noted, we don't usually edit these directly as they are
bulk updated/replaced by translation drops that usually happen late in
each release.

It's not clear to me that it's wroth trying to update the JAXB, JAX-WS,
and CORBA tools. One reason the corresponding tool modules are
deprecated-for-removal and there is a draft JEP to remove them
completely [1]. In addition, the JAXB ad JAX-WS tools are problematic to
change as they are owned by upstream projects on the Java EE github -
any changes to the code in these modules needs to coordinated to avoid
having a fork here.

-Alan

[1] http://openjdk.java.net/jeps/8189188
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8189102: All tools should support -?, -h and --help

Weijun Wang
In reply to this post by Lindenmaier, Goetz
I am OK with all commands supporting --help, but I am not sure if every tool should show it on the help screen if the tools's other options are still using the old single-"-" style. It looks like the tools are half-converted.

Is there a timetable to add "--" support to all tools?

Thanks
Max

> On Nov 17, 2017, at 7:23 PM, Lindenmaier, Goetz <[hidden email]> 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.
>

Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8189102: All tools should support -?, -h and --help

Alan Bateman
In reply to this post by Alan Bateman
On 20/11/2017 13:41, Lindenmaier, Goetz wrote:
> :
>
> The deprecated tools are
>    orbd,
>    wsgen
>    wsimport
>    schemagen
> Is that correct?
>
Yes, plus xjc, idlj, servertool and tnameserv (the full list is in the
draft JEP that I linked to).

-Alan
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8189102: All tools should support -?, -h and --help

Weijun Wang
In reply to this post by Weijun Wang
Hi Goetz

I would just remove it.

Thanks
Max

> On Nov 22, 2017, at 2:53 PM, Lindenmaier, Goetz <[hidden email]> wrote:
>
> Hi Max,
>
> while removing the comments from the k-tools, I saw this:
>
> --- a/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Klist.java Tue Oct 10 14:39:45 2017 +0200
> +++ b/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Klist.java Tue Nov 21 13:09:17 2017 +0100
> @@ -356,7 +358,6 @@
>         System.out.println("\t-t \t shows keytab entry timestamps");
>         System.out.println("\t-K \t shows keytab entry key value");
>         System.out.println("\t-e \t shows keytab entry key type");
> -        System.out.println("\nUsage: java sun.security.krb5.tools.Klist " +
> -                           "-help for help.");
> +        System.out.println("\n-? -h --help print this help message and exit");
>     }
> }
>
> I don't think the old comment is in the original program :) and anyways, -help
> is not supported by Klist.  It prints the usage called with the flag, but just because
> it prints it on any wrong flag.
>
> So should I replace the comment here?
> Or at least remove it?
>
> Best regards,
>  Goetz
>
>> -----Original Message-----
>> From: Weijun Wang [mailto:[hidden email]]
>> Sent: Monday, November 20, 2017 3:49 PM
>> To: Lindenmaier, Goetz <[hidden email]>
>> Cc: [hidden email]; [hidden email];
>> serviceability-dev ([hidden email]) <serviceability-
>> [hidden email]>
>> Subject: Re: RFR: 8189102: All tools should support -?, -h and --help
>>
>> Hi Goetz
>>
>> I understand your intention.
>>
>> If the reason is that one day every tool will switch to this new style, please at
>> least do not include kinit, klist and ktab. These Windows-only commands are
>> meant to emulate MIT krb5 tools with the same names and we need to keep
>> the option (and maybe the help screen) as similar as possible.
>>
>> I am OK with supporting the --help option undocumented.
>>
>> Thanks
>> Max
>>
>>> On Nov 20, 2017, at 9:46 PM, Lindenmaier, Goetz
>> <[hidden email]> wrote:
>>>
>>> Hi Max,
>>>
>>> I think there are so many tools mixing both kinds of
>>> options, that it's rather a gain if all at least document
>>> the same, up to date help message, than if the documentation
>>> is skipped for some.
>>>
>>> After my change, all the help messages are quite similar.
>>> I updated them to use the same wording while trying to
>>> keep the sentence structure in accordance with the other
>>> documented flags, see below.
>>>
>>> Best regards,
>>> Goetz.
>>>
>>>
>>>
>>> -? -h --help               display this help message
>>> -? -h --help              display this help message
>>> -h, --help (Print this help message.)
>>> -?, --help                   Print this help message
>>> -? -h --help                 Print this help message
>>> --help, -h, -?  Display command line options and exit
>>> -? -h --help                     Print this help message
>>> -h -? --help                  Print this help message
>>> -? -h --help
>>> -? -h --help          : display this help message and exit
>>> -? -h --help       :  display this help message and exit
>>> -? -h --help      print this help message and exit
>>> -? | -h | --help     to print this help message
>>> jmap -? -h --help  to print this help message
>>> usage: jps [-? -h --help]
>>> -? -h --help to print this help message
>>> -? -h --help  Prints this help message.
>>> -? -h --help print this help message
>>> -? -h --help          Print this synopsis of standard options and exit
>>> Use "keytool -? -h or --help" for all available commands
>>> --help        print this help message to the output stream
>>> -?, -h, --help                       Print this help message
>>> -h, --help, -?                        Print this help message
>>> -?, -h, --help                       Print this help message
>>> -? -h --help         Print this help message and exit
>>> -?, -h, --help                  print this help message
>>> -?, -h, --help                print this help message
>>> -? -h --help           Print this help message
>>> -?, -h, --help[:compat]    Give this, or optionally the compatibility, help
>>> [-? -h --help]              Print this help message
>>> jstatd -?|-h|--help
>>>
>>>
>>>> -----Original Message-----
>>>> From: Weijun Wang [mailto:[hidden email]]
>>>> Sent: Sonntag, 19. November 2017 01:28
>>>> To: Lindenmaier, Goetz <[hidden email]>
>>>> Cc: [hidden email]; [hidden email];
>>>> serviceability-dev ([hidden email]) <serviceability-
>>>> [hidden email]>
>>>> Subject: Re: RFR: 8189102: All tools should support -?, -h and --help
>>>>
>>>> I am OK with all commands supporting --help, but I am not sure if every
>> tool
>>>> should show it on the help screen if the tools's other options are still using
>>>> the old single-"-" style. It looks like the tools are half-converted.
>>>>
>>>> Is there a timetable to add "--" support to all tools?
>>>>
>>>> Thanks
>>>> Max
>>>>
>>>>> On Nov 17, 2017, at 7:23 PM, Lindenmaier, Goetz
>>>> <[hidden email]> 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.
>>>>>
>>>
>