qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Benoît Canet" <benoit.canet@irqsave.net>
To: Eric Blake <eblake@redhat.com>
Cc: "Benoît Canet" <benoit.canet@irqsave.net>,
	armbru@redhat.com, lcapitulino@redhat.com, qemu-devel@nongnu.org,
	vilanova@ac.upc.edu
Subject: Re: [Qemu-devel] [PATCH V2] qapi: Let redundant includes be skipped excepted the first occurrence.
Date: Wed, 14 May 2014 16:04:35 +0200	[thread overview]
Message-ID: <20140514140435.GA3531@irqsave.net> (raw)
In-Reply-To: <537100CD.4020803@redhat.com>

The Monday 12 May 2014 à 11:11:41 (-0600), Eric Blake wrote :
> On 05/09/2014 09:48 AM, Benoît Canet wrote:
> 
> Subject line has problems. 'excepted' is not a word, and you are already
> asked to avoid trailing '.'.  I suggest a much simpler:
> 
> qapi: skip redundant includes
> 
> > The purpose of this change is to help create a json file containing
> > common definitions; each bit of generated C code must be spitted
> 
> s/spitted/emitted/
> 
> > only one time.
> > 
> > A second history global to all QAPISchema instances has been added
> > to detect when a file is included more than one time and skip these
> > includes.
> > It does not act as a stack and the changes made to it by the
> > __init__ function are propagated back to the caller so it's really
> > a global state.
> > 
> > Signed-off-by: Benoit Canet <benoit@irqsave.net>
> > ---
> 
> > index 0000000..573541a
> > --- /dev/null
> > +++ b/tests/qapi-schema/include-only-one-time.exit
> > @@ -0,0 +1 @@
> > +0
> > diff --git a/tests/qapi-schema/include-only-one-time.json b/tests/qapi-schema/include-only-one-time.json
> > new file mode 100644
> > index 0000000..11772e3
> > --- /dev/null
> > +++ b/tests/qapi-schema/include-only-one-time.json
> 
> Long name; you could get by with:
> 
> tests/qapi-schema/include-repetition.json
> 
> > @@ -0,0 +1,3 @@
> > +{ 'include': 'comments.json' }
> > +{ 'include': 'sub-include-only-one-time.json' }
> 
> This naming doesn't preserve the 'include-' prefix used by all other
> files related to include.  Maybe:
> 
> { 'include': 'include-repetition-sub.json' }
> 
> -- 
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
> 

Thanks for the review I'll iterate.

      reply	other threads:[~2014-05-14 14:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 15:48 [Qemu-devel] [PATCH V2] Let the C generated bits of QAPI be generated only once when identical includes are done Benoît Canet
2014-05-09 15:48 ` [Qemu-devel] [PATCH V2] qapi: Let redundant includes be skipped excepted the first occurrence Benoît Canet
2014-05-12 17:11   ` Eric Blake
2014-05-14 14:04     ` Benoît Canet [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=20140514140435.GA3531@irqsave.net \
    --to=benoit.canet@irqsave.net \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --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).