From: Eric Blake <eblake@redhat.com>
To: "Lluís Vilanova" <vilanova@ac.upc.edu>, qemu-devel@nongnu.org
Cc: "Benoît Canet" <benoit.canet@irqsave.net>,
"Markus Armbruster" <armbru@redhat.com>,
"Luiz Capitulino" <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCHv51/3] qapi: Use an explicit input file
Date: Mon, 31 Mar 2014 10:30:06 -0600 [thread overview]
Message-ID: <5339980E.4010808@redhat.com> (raw)
In-Reply-To: <20140330203515.16278.67149.stgit@fimbulvetr.bsc.es>
[-- Attachment #1: Type: text/plain, Size: 2493 bytes --]
On 03/30/2014 02:35 PM, Lluís Vilanova wrote:
Missing a space in the subject line (this is not version 51 of the
patches, but v5 and patch 1/3 :)
> Use an explicit input file on the command-line instead of reading from standard input
>
> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
> ---
> 25 files changed, 72 insertions(+), 41 deletions(-)
Now we've got competing versions of the patches between Benoît and Lluís
(and apologies to either of you if I accidentally mis-spell the 'i' in
your name due to my keyboard not making it as easy to add accents).
>
> diff --git a/Makefile b/Makefile
> index ec74039..c7cec01 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -237,23 +237,35 @@ qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
>
> qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\
> $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
> - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@")
> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \
> + $(gen-out-type) -i "$<" -o qga/qapi-generated -p "qga-", \
> + " GEN $@")
I _like_ that you used \ to break long lines to fit into 80 columns.
But doing it at the same time as adding an option makes it a little
harder to see the addition; maybe it's worth splitting into two patches
(one for the reformatting but no semantic change, the other for the
addition)? And maybe by using '-i $<' at the place where '< $<'
currently appears will make it a bit easier to see the change being
done, rather than having to spot that things are reordered to provide -i
earlier?
> +++ b/docs/qapi-code-gen.txt
> @@ -221,7 +221,7 @@ created code.
> Example:
>
> mdroth@illuin:~/w/qemu2.git$ python scripts/qapi-types.py \
> - --output-dir="qapi-generated" --prefix="example-" < example-schema.json
> + --input-file=example-schema.json --output-dir="qapi-generated" --prefix="example-"
On Benoît's version, the comment was made that it is more
'compiler-like' to take the input file as an argument name, rather than
an option name (that is, use '$<' directly, rather than '-i $<' in the
Makefile) - but if we do that, it is best to put the argument after all
options.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-03-31 16:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-30 20:35 [Qemu-devel] [PATCHv50/3] qapi: Allow modularization of QAPI schema files Lluís Vilanova
2014-03-30 20:35 ` [Qemu-devel] [PATCHv51/3] qapi: Use an explicit input file Lluís Vilanova
2014-03-31 16:30 ` Eric Blake [this message]
2014-03-30 20:35 ` [Qemu-devel] [PATCHv52/3] qapi: Add a primitive to include other files from a QAPI schema file Lluís Vilanova
2014-03-31 16:48 ` Eric Blake
2014-03-30 20:35 ` [Qemu-devel] [PATCHv53/3] qapi: Add tests for the "include" directive Lluís Vilanova
2014-03-31 15:39 ` [Qemu-devel] [PATCHv50/3] qapi: Allow modularization of QAPI schema files Benoît Canet
2014-03-31 18:14 ` Lluís Vilanova
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=5339980E.4010808@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=benoit.canet@irqsave.net \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vilanova@ac.upc.edu \
/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).