* Use of "?" for help has been deprecated for 8 years, can we drop it?
@ 2020-10-01 10:35 Markus Armbruster
2020-10-01 10:46 ` Thomas Huth
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Markus Armbruster @ 2020-10-01 10:35 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Peter Maydell, Daniel P. Berrangé
We deprecated "?" more than eight years ago. We didn't have a
deprecation process back then, but we did purge "?" from the
documentation and from help texts. Can we finally drop it?
I'm asking because there is a patch on the list that bypasses
is_help_option() to not add deprecated "?" to a new place: "[PATCH v2
1/4] keyval: Parse help options".
commit c8057f951d64de93bfd01569c0a725baa9f94372
Author: Peter Maydell <peter.maydell@linaro.org>
Date: Thu Aug 2 13:45:54 2012 +0100
Support 'help' as a synonym for '?' in command line options
For command line options which permit '?' meaning 'please list the
permitted values', add support for 'help' as a synonym, by abstracting
the check out into a helper function.
This change means that in some cases where we were being lazy in
our string parsing, "?junk" will now be rejected as an invalid option
rather than being (undocumentedly) treated the same way as "?".
Update the documentation to use 'help' rather than '?', since '?'
is a shell metacharacter and thus prone to fail confusingly if there
is a single character filename in the current working directory and
the '?' has not been escaped. It's therefore better to steer users
towards 'help', though '?' is retained for backwards compatibility.
We do not, however, update the output of the system emulator's -help
(or any documentation autogenerated from the qemu-options.hx which
is the source of the -help text) because libvirt parses our -help
output and will break. At a later date when QEMU provides a better
interface so libvirt can avoid having to do this, we can update the
-help text too.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
commit 585f60368f23e6603cf86cfdaeceb89d1169f4b8
Author: Peter Maydell <peter.maydell@linaro.org>
Date: Thu Oct 4 16:22:01 2012 +0100
qemu-options.hx: Change from recommending '?' to 'help'
Update the -help output and documentation so that it recommends
'help' rather than '?' for the various "list valid values for this
option" cases. '?' is deprecated (as it can fail confusingly if
not quoted), so it's better to steer users towards 'help'. ('?'
still works, for backwards compatibility.)
This is the -help option part of the change otherwise done in
commit c8057f9, since we are now past release 1.2 and free to
change our help text without worrying about breaking libvirt.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Use of "?" for help has been deprecated for 8 years, can we drop it?
2020-10-01 10:35 Use of "?" for help has been deprecated for 8 years, can we drop it? Markus Armbruster
@ 2020-10-01 10:46 ` Thomas Huth
2020-10-01 11:20 ` Peter Maydell
2020-10-01 13:06 ` Eric Blake
2 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2020-10-01 10:46 UTC (permalink / raw)
To: Markus Armbruster, qemu-devel
Cc: Kevin Wolf, Peter Maydell, Daniel P. Berrangé
On 01/10/2020 12.35, Markus Armbruster wrote:
> We deprecated "?" more than eight years ago. We didn't have a
> deprecation process back then, but we did purge "?" from the
> documentation and from help texts. Can we finally drop it?
It's not mentioned in docs/system/deprecated.rst yet, so it is not
officially deprecated yet. Provide a patch to add it to the list there,
then you can remove it after two releases.
Thomas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Use of "?" for help has been deprecated for 8 years, can we drop it?
2020-10-01 10:35 Use of "?" for help has been deprecated for 8 years, can we drop it? Markus Armbruster
2020-10-01 10:46 ` Thomas Huth
@ 2020-10-01 11:20 ` Peter Maydell
2020-10-01 15:23 ` Christian Borntraeger
2020-10-01 13:06 ` Eric Blake
2 siblings, 1 reply; 10+ messages in thread
From: Peter Maydell @ 2020-10-01 11:20 UTC (permalink / raw)
To: Markus Armbruster; +Cc: Kevin Wolf, Daniel P. Berrangé, QEMU Developers
On Thu, 1 Oct 2020 at 11:35, Markus Armbruster <armbru@redhat.com> wrote:
>
> We deprecated "?" more than eight years ago. We didn't have a
> deprecation process back then, but we did purge "?" from the
> documentation and from help texts. Can we finally drop it?
Is it really that terrible a burden to support having an
alias for 'help' ?
thanks
-- PMM
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Use of "?" for help has been deprecated for 8 years, can we drop it?
2020-10-01 10:35 Use of "?" for help has been deprecated for 8 years, can we drop it? Markus Armbruster
2020-10-01 10:46 ` Thomas Huth
2020-10-01 11:20 ` Peter Maydell
@ 2020-10-01 13:06 ` Eric Blake
2020-10-01 13:17 ` Kevin Wolf
2020-10-01 14:02 ` BALATON Zoltan via
2 siblings, 2 replies; 10+ messages in thread
From: Eric Blake @ 2020-10-01 13:06 UTC (permalink / raw)
To: Markus Armbruster, qemu-devel
Cc: Kevin Wolf, Peter Maydell, Daniel P. Berrangé
[-- Attachment #1.1: Type: text/plain, Size: 802 bytes --]
On 10/1/20 5:35 AM, Markus Armbruster wrote:
> We deprecated "?" more than eight years ago. We didn't have a
> deprecation process back then, but we did purge "?" from the
> documentation and from help texts. Can we finally drop it?
>
> I'm asking because there is a patch on the list that bypasses
> is_help_option() to not add deprecated "?" to a new place: "[PATCH v2
> 1/4] keyval: Parse help options".
>
Did we ever issue a warning when it was used? It's easier to argue that
it can be dropped if users had notice of some form or another. That
said, I'm not heartbroken if we yank it immediately instead of letting
it live for 2 more releases.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Use of "?" for help has been deprecated for 8 years, can we drop it?
2020-10-01 13:06 ` Eric Blake
@ 2020-10-01 13:17 ` Kevin Wolf
2020-10-01 15:04 ` Thomas Huth
2020-10-01 14:02 ` BALATON Zoltan via
1 sibling, 1 reply; 10+ messages in thread
From: Kevin Wolf @ 2020-10-01 13:17 UTC (permalink / raw)
To: Eric Blake
Cc: Peter Maydell, Daniel P. Berrangé, Markus Armbruster, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 925 bytes --]
Am 01.10.2020 um 15:06 hat Eric Blake geschrieben:
> On 10/1/20 5:35 AM, Markus Armbruster wrote:
> > We deprecated "?" more than eight years ago. We didn't have a
> > deprecation process back then, but we did purge "?" from the
> > documentation and from help texts. Can we finally drop it?
> >
> > I'm asking because there is a patch on the list that bypasses
> > is_help_option() to not add deprecated "?" to a new place: "[PATCH v2
> > 1/4] keyval: Parse help options".
> >
>
> Did we ever issue a warning when it was used? It's easier to argue that
> it can be dropped if users had notice of some form or another. That
> said, I'm not heartbroken if we yank it immediately instead of letting
> it live for 2 more releases.
A deprecation warning for a help option would somehow feel strange.
I would consider this a human-only interface that can be changed at
will, like HMP syntax.
Kevin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Use of "?" for help has been deprecated for 8 years, can we drop it?
2020-10-01 13:06 ` Eric Blake
2020-10-01 13:17 ` Kevin Wolf
@ 2020-10-01 14:02 ` BALATON Zoltan via
2020-10-02 10:50 ` Gerd Hoffmann
1 sibling, 1 reply; 10+ messages in thread
From: BALATON Zoltan via @ 2020-10-01 14:02 UTC (permalink / raw)
To: Eric Blake
Cc: Kevin Wolf, Peter Maydell, Daniel P. Berrangé,
Markus Armbruster, qemu-devel
On Thu, 1 Oct 2020, Eric Blake wrote:
> On 10/1/20 5:35 AM, Markus Armbruster wrote:
>> We deprecated "?" more than eight years ago. We didn't have a
>> deprecation process back then, but we did purge "?" from the
>> documentation and from help texts. Can we finally drop it?
>>
>> I'm asking because there is a patch on the list that bypasses
>> is_help_option() to not add deprecated "?" to a new place: "[PATCH v2
>> 1/4] keyval: Parse help options".
>>
>
> Did we ever issue a warning when it was used? It's easier to argue that
> it can be dropped if users had notice of some form or another. That
> said, I'm not heartbroken if we yank it immediately instead of letting
> it live for 2 more releases.
How about keeping it as a convenience? I find it easier to type ? than
help and often use it instead. It's sufficiently hidden to not cause any
confusion for those who don't know and convenient for those who know. I
agree with Peter that it should not be something that causes that much
trouble that it would need to be removed immediately (or even in the
future).
Regrads,
BALATON Zoltan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Use of "?" for help has been deprecated for 8 years, can we drop it?
2020-10-01 13:17 ` Kevin Wolf
@ 2020-10-01 15:04 ` Thomas Huth
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2020-10-01 15:04 UTC (permalink / raw)
To: Kevin Wolf, Eric Blake
Cc: Peter Maydell, Daniel P. Berrangé, Markus Armbruster, qemu-devel
On 01/10/2020 15.17, Kevin Wolf wrote:
> Am 01.10.2020 um 15:06 hat Eric Blake geschrieben:
>> On 10/1/20 5:35 AM, Markus Armbruster wrote:
>>> We deprecated "?" more than eight years ago. We didn't have a
>>> deprecation process back then, but we did purge "?" from the
>>> documentation and from help texts. Can we finally drop it?
>>>
>>> I'm asking because there is a patch on the list that bypasses
>>> is_help_option() to not add deprecated "?" to a new place: "[PATCH v2
>>> 1/4] keyval: Parse help options".
>>>
>>
>> Did we ever issue a warning when it was used? It's easier to argue that
>> it can be dropped if users had notice of some form or another. That
>> said, I'm not heartbroken if we yank it immediately instead of letting
>> it live for 2 more releases.
>
> A deprecation warning for a help option would somehow feel strange.
>
> I would consider this a human-only interface that can be changed at
> will, like HMP syntax.
I'm not so sure ... for example we use "-device help" in the qemu-iotest
scripts, so other people out there might use "-device ?" in their
scripts, too, to check for the availability of devices... so IMHO we
should follow the deprecation process properly here.
Thomas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Use of "?" for help has been deprecated for 8 years, can we drop it?
2020-10-01 11:20 ` Peter Maydell
@ 2020-10-01 15:23 ` Christian Borntraeger
2020-10-01 15:45 ` Kevin Wolf
0 siblings, 1 reply; 10+ messages in thread
From: Christian Borntraeger @ 2020-10-01 15:23 UTC (permalink / raw)
To: Peter Maydell, Markus Armbruster
Cc: Kevin Wolf, Daniel P. Berrangé, QEMU Developers
On 01.10.20 13:20, Peter Maydell wrote:
> On Thu, 1 Oct 2020 at 11:35, Markus Armbruster <armbru@redhat.com> wrote:
>>
>> We deprecated "?" more than eight years ago. We didn't have a
>> deprecation process back then, but we did purge "?" from the
>> documentation and from help texts. Can we finally drop it?
>
> Is it really that terrible a burden to support having an
> alias for 'help' ?
I agree. Having the "?" is really convenient.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Use of "?" for help has been deprecated for 8 years, can we drop it?
2020-10-01 15:23 ` Christian Borntraeger
@ 2020-10-01 15:45 ` Kevin Wolf
0 siblings, 0 replies; 10+ messages in thread
From: Kevin Wolf @ 2020-10-01 15:45 UTC (permalink / raw)
To: Christian Borntraeger
Cc: Peter Maydell, Daniel P. Berrangé,
Markus Armbruster, QEMU Developers
Am 01.10.2020 um 17:23 hat Christian Borntraeger geschrieben:
>
>
> On 01.10.20 13:20, Peter Maydell wrote:
> > On Thu, 1 Oct 2020 at 11:35, Markus Armbruster <armbru@redhat.com> wrote:
> >>
> >> We deprecated "?" more than eight years ago. We didn't have a
> >> deprecation process back then, but we did purge "?" from the
> >> documentation and from help texts. Can we finally drop it?
> >
> > Is it really that terrible a burden to support having an
> > alias for 'help' ?
>
> I agree. Having the "?" is really convenient.
If people actually care about "?", can one of you send a patch to remove
the comment that declares it deprecated?
Kevin
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Use of "?" for help has been deprecated for 8 years, can we drop it?
2020-10-01 14:02 ` BALATON Zoltan via
@ 2020-10-02 10:50 ` Gerd Hoffmann
0 siblings, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2020-10-02 10:50 UTC (permalink / raw)
To: BALATON Zoltan
Cc: Kevin Wolf, Peter Maydell, Daniel P. Berrangé,
qemu-devel, Markus Armbruster
Hi,
> > Did we ever issue a warning when it was used? It's easier to argue that
> > it can be dropped if users had notice of some form or another. That
> > said, I'm not heartbroken if we yank it immediately instead of letting
> > it live for 2 more releases.
>
> How about keeping it as a convenience? I find it easier to type ? than help
> and often use it instead.
Well, ? has the problem that it is a shell glob char[1], which is for me
enough reason to avoid it at least standalone ("-device ?"). When
querying properties ("-device foo,?") it is much less likely to trip you
up.
On the other hand I don't see any harm in keeping it. What would we
save when we drop it? Given we already have a helper function to check
it is only 2-3 lines of extra code I guess?
take care,
Gerd
[1] IIRC that was the reason to add "help" in the first place.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-10-02 10:51 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 10:35 Use of "?" for help has been deprecated for 8 years, can we drop it? Markus Armbruster
2020-10-01 10:46 ` Thomas Huth
2020-10-01 11:20 ` Peter Maydell
2020-10-01 15:23 ` Christian Borntraeger
2020-10-01 15:45 ` Kevin Wolf
2020-10-01 13:06 ` Eric Blake
2020-10-01 13:17 ` Kevin Wolf
2020-10-01 15:04 ` Thomas Huth
2020-10-01 14:02 ` BALATON Zoltan via
2020-10-02 10:50 ` Gerd Hoffmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.