qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Kevin Wolf <kwolf@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Max Reitz <mreitz@redhat.com>, Cleber Rosa <crosa@redhat.com>
Subject: Re: [Qemu-devel] [PATCH RFC 2/3] pxtool: Add new qemu-img command info generation tool
Date: Wed, 10 Apr 2019 07:54:42 +0200	[thread overview]
Message-ID: <87sguq2yn1.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20190410012413.31569-3-jsnow@redhat.com> (John Snow's message of "Tue, 9 Apr 2019 21:24:12 -0400")

John Snow <jsnow@redhat.com> writes:

> Presently we use hxtool and a .hx format to generate a few things like
> the qemu_img subcommand dispatch table, the qemu_img help() display output,
> and a help output in qemu-img.texi.
>
> Unfortunately, this means that this information is duplicated in at least
> three places:
>
> (1) in qemu-img-cmds.hx as a human readable string
> (2) in qemu-img-cmds.hx as a texi string
> (3) in qemu-img.texi again, as a texi string
>
> We can do a little better, though: all of these sources can be generated
> from a single json file. Add a new small tool ("pxtool") that can do this.
>
> This tool can at least handle generating (1) and (2) from the same source
> without needing to reduplicate that information. Deduplicating (3) happens
> in the next patch.
>
> Notes:
>  - The json format was chosen to be very "stupid", and the command line
>    documentation is being kept one-per-line to make future diffs easier
>    to read.
>  - It's easy enough to generate the human-readable output from the texi
>    output by removing '@var{foo}' with 'foo'.
>  - The qemu-img command dispatch always calls img_cmdname, so we don't
>    need to store this information separately, either.
>  - The need for DEF() macros could be removed as well, but I left it in
>    to create a minimally disruptive patch.
> Signed-off-by: John Snow <jsnow@redhat.com>

We got just five .hx:

    qemu-img.cmds.hx            killed off by this patch
    qemu-options.hx             CLI QAPIfication should kill this off
    hw/audio/pl041.hx           misnamed, not actually food for hxtool
    hmp-commands.hx             no exit strategy
    hmp-commands-info.hx            for these two, yet

CLI QAPIfication got stuck in the back-burner, and as long as that's the
case, it's not an alternative to your patches.

WARNING: multiple messages have this Message-ID (diff)
From: Markus Armbruster <armbru@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	Max Reitz <mreitz@redhat.com>, Cleber Rosa <crosa@redhat.com>
Subject: Re: [Qemu-devel] [PATCH RFC 2/3] pxtool: Add new qemu-img command info generation tool
Date: Wed, 10 Apr 2019 07:54:42 +0200	[thread overview]
Message-ID: <87sguq2yn1.fsf@dusky.pond.sub.org> (raw)
Message-ID: <20190410055442.L5vdVKetYK1Wjx6AAYz-UfiIAi50piiK3TtNmp00Cqo@z> (raw)
In-Reply-To: <20190410012413.31569-3-jsnow@redhat.com> (John Snow's message of "Tue, 9 Apr 2019 21:24:12 -0400")

John Snow <jsnow@redhat.com> writes:

> Presently we use hxtool and a .hx format to generate a few things like
> the qemu_img subcommand dispatch table, the qemu_img help() display output,
> and a help output in qemu-img.texi.
>
> Unfortunately, this means that this information is duplicated in at least
> three places:
>
> (1) in qemu-img-cmds.hx as a human readable string
> (2) in qemu-img-cmds.hx as a texi string
> (3) in qemu-img.texi again, as a texi string
>
> We can do a little better, though: all of these sources can be generated
> from a single json file. Add a new small tool ("pxtool") that can do this.
>
> This tool can at least handle generating (1) and (2) from the same source
> without needing to reduplicate that information. Deduplicating (3) happens
> in the next patch.
>
> Notes:
>  - The json format was chosen to be very "stupid", and the command line
>    documentation is being kept one-per-line to make future diffs easier
>    to read.
>  - It's easy enough to generate the human-readable output from the texi
>    output by removing '@var{foo}' with 'foo'.
>  - The qemu-img command dispatch always calls img_cmdname, so we don't
>    need to store this information separately, either.
>  - The need for DEF() macros could be removed as well, but I left it in
>    to create a minimally disruptive patch.
> Signed-off-by: John Snow <jsnow@redhat.com>

We got just five .hx:

    qemu-img.cmds.hx            killed off by this patch
    qemu-options.hx             CLI QAPIfication should kill this off
    hw/audio/pl041.hx           misnamed, not actually food for hxtool
    hmp-commands.hx             no exit strategy
    hmp-commands-info.hx            for these two, yet

CLI QAPIfication got stuck in the back-burner, and as long as that's the
case, it's not an alternative to your patches.


  parent reply	other threads:[~2019-04-10  5:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10  1:24 [Qemu-devel] [PATCH RFC 0/3] qemu-img: remove command documentation duplication John Snow
2019-04-10  1:24 ` John Snow
2019-04-10  1:24 ` [Qemu-devel] [PATCH RFC 1/3] qemu-img: fix .hx and .texi disparity John Snow
2019-04-10  1:24   ` John Snow
2019-04-10  1:24 ` [Qemu-devel] [PATCH RFC 2/3] pxtool: Add new qemu-img command info generation tool John Snow
2019-04-10  1:24   ` John Snow
2019-04-10  5:54   ` Markus Armbruster [this message]
2019-04-10  5:54     ` Markus Armbruster
2019-04-10 17:55     ` John Snow
2019-04-10 17:55       ` John Snow
2019-04-11  6:22       ` Markus Armbruster
2019-04-11  6:22         ` Markus Armbruster
2019-04-11 20:02         ` John Snow
2019-04-11 20:02           ` John Snow
2019-04-12  8:04           ` Markus Armbruster
2019-04-12  8:04             ` Markus Armbruster
2019-04-10  1:24 ` [Qemu-devel] [PATCH RFC 3/3] qemu-img.texi: use macros for command summaries John Snow
2019-04-10  1:24   ` John Snow
2019-06-26 18:03 ` [Qemu-devel] [PATCH RFC 0/3] qemu-img: remove command documentation duplication Max Reitz
2019-06-26 18:07   ` John Snow

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=87sguq2yn1.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).