From: Anthony Liguori <anthony@codemonkey.ws>
To: Amit Shah <amit.shah@redhat.com>
Cc: qemu list <qemu-devel@nongnu.org>,
Juan Quintela <quintela@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/5] Add '-device help' output for device params and help text
Date: Mon, 14 Jun 2010 11:55:33 -0500 [thread overview]
Message-ID: <4C165F05.6060700@codemonkey.ws> (raw)
In-Reply-To: <20100608052104.GC11937@amit-laptop.redhat.com>
On 06/08/2010 12:21 AM, Amit Shah wrote:
> On (Mon) Jun 07 2010 [11:09:32], Anthony Liguori wrote:
>
>> On 05/31/2010 07:41 AM, Amit Shah wrote:
>>
>>> Hello,
>>>
>>> This patch series adds support to specify some descriptive help text
>>> to qdev device parameters. This series adds some help text to the
>>> virtserialport and net family of devices as an example, and the new
>>> output is shown in the respective commits.
>>>
>>> This series also adds a new '-device help' option that lists all the
>>> available qdev devices (which is avl. via -device ? now), and adds
>>> each device's parameters to the output listing. This output also shows
>>> the descriptive text.
>>>
>>> The idea is to auto-generate documentation from code and to populate
>>> some wiki / qemu-doc.texi using this new target.
>>>
>> I really dislike having options print their own help.
>>
> Why? I really like it, coders can embed help exactly in the same place
> they're adding / changing options and there's much less chance of
> someone missing updating help strings when updating / adding options.
>
Because it's inconsistent from a UI perspective. -device help, -M ?, etc.
How's a user supposed to know which options can display help and what
the magic invocation is that is used to display it?
-help device/-help machine
Provides a consistent, self discoverable interface for users to get
detailed inline help.
>> Maybe we can introduce a proper -help option that takes an argument
>> that can display subsystem specific help?
>>
>> For instance:
>>
>> qemu -help device
>>
>> Would display the help output in this series.
>>
> What I'm adding here is similar; instead of -help device, I'm adding
> -device help, and I think it's nicer because it fits directly in the
> qdev code.
>
The UI should not be a consequence of the implementation.
>> My other concern is that we now have a big mess of properties that
>> don't have help text. What are the chances that anyone is going to
>> go through and do this?
>>
>> I'd rather we bite the bullet and add help everywhere before merging
>> any of this because experience has shown that existing code usually
>> never gets converted if not converted all at once.
>>
> Let me put my community contributor hat on: we're not really giving away
> vibes that qemu has to be 100% enterprise-ready at each commit, are we?
> qemu is a *development* project, and development happens one small
> commit at a time, commit early and often. If I'm going to have to
> maintiain hundreds of small help-related patches, it's soon going to
> grow stale as people change related code and in the end I'll grow
> frustrated and drop then entire exercise. Not the first time that
> would've happened.
>
The problem with this argument is that people introduce things like this
with this exact argument and then nothing every ends up getting help
options.
> On the other hand, we commit this right away, and interested developers
> in their own domains start contributing the small one-liners which
> brings their subsystem up to the mark for documentation.
>
It simply doesn't happen or else it already would have. The best way to
make this is a one time painful conversion followed by strong
enforcement that all new options take help strings.
Regards,
Anthony Liguori
> I think this is the best way to contribute such patches.
>
> If you think some devices are going to go documentation-less, instead of
> empty strings, I can do "description needed" strings, which can even
> invite first-time contributors grep through this and contribute the
> one-liners.
>
> If the enterprise people want this fixed before any enterprise release,
> they better commit resources to ensure they don't release anything that
> has a 'documentation needed!' line. :-)
>
> Amit
>
>
>
next prev parent reply other threads:[~2010-06-14 16:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 12:41 [Qemu-devel] [PATCH 0/5] Add '-device help' output for device params and help text Amit Shah
2010-05-31 12:41 ` [Qemu-devel] [PATCH 1/5] qdev: Add a description field for qdev properties for documentation Amit Shah
2010-05-31 12:41 ` [Qemu-devel] [PATCH 2/5] virtio-serial: Add description fields for qdev properties Amit Shah
2010-05-31 12:41 ` [Qemu-devel] [PATCH 3/5] net.h: Add description fields for qdev properites Amit Shah
2010-05-31 12:41 ` [Qemu-devel] [PATCH 4/5] qdev: Re-arrange code to have device properties shown from own function Amit Shah
2010-05-31 12:41 ` [Qemu-devel] [PATCH 5/5] qdev: Add new '-device help' option, shows all devices and properties Amit Shah
2010-06-07 14:43 ` Markus Armbruster
2010-06-08 5:13 ` Amit Shah
2010-06-07 16:09 ` [Qemu-devel] [PATCH 0/5] Add '-device help' output for device params and help text Anthony Liguori
2010-06-08 5:21 ` Amit Shah
2010-06-14 16:55 ` Anthony Liguori [this message]
2010-06-15 9:17 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C165F05.6060700@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).