qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: "Lluís Vilanova" <vilanova@ac.upc.edu>
Cc: Michael Roth <mdroth@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] [trivial] qapi: Build-depend on all json files
Date: Thu, 4 Feb 2016 16:13:41 +0000	[thread overview]
Message-ID: <20160204161341.GE30301@redhat.com> (raw)
In-Reply-To: <145460194285.5818.14237884467366648188.stgit@localhost>

On Thu, Feb 04, 2016 at 05:05:45PM +0100, Lluís Vilanova wrote:
> Dynamically detects the files used to generate QAPI code, thus ensuring
> it's never out of sync with the sources.
> 
> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
> ---
>  Makefile |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index d0de2d4..f8e8648 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -269,10 +269,8 @@ $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
>  		$(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
>  		"  GEN   $@")
>  
> -qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \
> -               $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json \
> -               $(SRC_PATH)/qapi/event.json $(SRC_PATH)/qapi/introspect.json \
> -               $(SRC_PATH)/qapi/crypto.json
> +qapi-modules = $(SRC_PATH)/qapi-schema.json
> +qapi-modules += $(wildcard $(SRC_PATH)/qapi/*.json)
>  
>  qapi-types.c qapi-types.h :\
>  $(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)

I'm not really a fan of the use of wildcards - IME they also lead to
bugs where the build picks up too many or too few files and you don't
notice the mistake until later - this is particularly true at release
time when making dist, but also where a developer has a file locally
they forget to commit and submit for merge, it can be silently missed.

So yes you are fixing one possible source of mistakes, but in exchange
you are introducing a different possible source of mistakes. I don't
think one is clearer better than the other, and IMHO so we're better
sticking with normal QEMU practice listing all files explicitly.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

      reply	other threads:[~2016-02-04 16:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04 16:05 [Qemu-devel] [PATCH v2] [trivial] qapi: Build-depend on all json files Lluís Vilanova
2016-02-04 16:13 ` Daniel P. Berrange [this message]

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=20160204161341.GE30301@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=mdroth@linux.vnet.ibm.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).