qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Michael Roth <mdroth@linux.vnet.ibm.com>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH v2 0/7] qapi: Specify default value for optional argument in schema json
Date: Tue, 20 May 2014 17:16:51 +0800	[thread overview]
Message-ID: <20140520091651.GC13450@T430.nay.redhat.com> (raw)
In-Reply-To: <1400576881-6954-1-git-send-email-famz@redhat.com>

My script failed to generate a good Cc list, manual fix. Sorry for the noise.

Fam

On Tue, 05/20 17:07, Fam Zheng wrote:
> Please first take a look at patch 7 to see what is supported by this series.
> 
> Patch 1 ~ 3 allows some useful basic types in schema.
> 
> Patch 4 ~ 6 implements the new syntax.
> 
> Note: The introduced '@arg' sigil, just like the preexisting '*arg', is
> reducing the cleanness of the syntax. We should get rid of both of them in long
> term. Here, this series compromises on this and introduces '@arg' because:
> 
>   - We have to distinguish the argument property dictionary from nested struct:
> 
>     I.e.:
> 
>         'data': {
>             'arg1': { 'member1': 'int', 'member2': 'str' }
>             '@arg2': { 'type': 'int', 'default': 100 }
>          }
> 
>     Until we completely drop and forbid the 'arg1' nested struct use case.
> 
>   - Forbidding 'arg1' it's doable, but doing it now means we pull in many
>     distractive patches to this series.
> 
>     Basically we need to:
> 
>     * converting existing nested structs to named structs in qapi-schema.json.
> 
>     * converting C code that references these structs because member structures
>       become member structure pointers.
> 
>     * coverting qapi-schema test cases on nested structure.
> 
>     * updating docs/qapi-code-gen.txt.
> 
>   - So let's focus on the default value requirement for now, because it's not
>     making the above change harder.
> 
> Test cases, documentation, more data types of default value, and conversion of
> more qmp commands will come later, if we could agree on the schema design and
> framework.
> 
> Thanks,
> Fam
> 
> 
> Fam Zheng (7):
>   qapi: Allow decimal values
>   qapi: Allow true, false and null in schema json
>   tests: Add decimal test cases for qapi-schema
>   qapi: Add c_val(t, val) for int
>   qapi: Add @arg property dictionary syntax
>   qapi: Initialize argument value in generated code if has 'default'
>   qmp: Convert block-commit speed to arg property dict
> 
>  blockdev.c                                   |  6 +--
>  qapi-schema.json                             |  2 +-
>  scripts/qapi-commands.py                     | 55 +++++++++++++++----------
>  scripts/qapi-types.py                        |  2 +-
>  scripts/qapi-visit.py                        |  4 +-
>  scripts/qapi.py                              | 60 +++++++++++++++++++++++++---
>  tests/Makefile                               |  3 +-
>  tests/qapi-schema/integers-leading-zero.err  |  1 +
>  tests/qapi-schema/integers-leading-zero.exit |  1 +
>  tests/qapi-schema/integers-leading-zero.json |  1 +
>  tests/qapi-schema/integers-leading-zero.out  |  0
>  tests/qapi-schema/integers-overflow.err      |  1 +
>  tests/qapi-schema/integers-overflow.exit     |  1 +
>  tests/qapi-schema/integers-overflow.json     |  1 +
>  tests/qapi-schema/integers-overflow.out      |  0
>  tests/qapi-schema/integers.err               |  0
>  tests/qapi-schema/integers.exit              |  1 +
>  tests/qapi-schema/integers.json              | 10 +++++
>  tests/qapi-schema/integers.out               |  3 ++
>  19 files changed, 117 insertions(+), 35 deletions(-)
>  create mode 100644 tests/qapi-schema/integers-leading-zero.err
>  create mode 100644 tests/qapi-schema/integers-leading-zero.exit
>  create mode 100644 tests/qapi-schema/integers-leading-zero.json
>  create mode 100644 tests/qapi-schema/integers-leading-zero.out
>  create mode 100644 tests/qapi-schema/integers-overflow.err
>  create mode 100644 tests/qapi-schema/integers-overflow.exit
>  create mode 100644 tests/qapi-schema/integers-overflow.json
>  create mode 100644 tests/qapi-schema/integers-overflow.out
>  create mode 100644 tests/qapi-schema/integers.err
>  create mode 100644 tests/qapi-schema/integers.exit
>  create mode 100644 tests/qapi-schema/integers.json
>  create mode 100644 tests/qapi-schema/integers.out
> 
> -- 
> 1.9.2
> 
> 

  parent reply	other threads:[~2014-05-20  9:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20  9:07 [Qemu-devel] [RFC PATCH v2 0/7] qapi: Specify default value for optional argument in schema json Fam Zheng
2014-05-20  9:07 ` [Qemu-devel] [RFC PATCH v2 1/7] qapi: Allow decimal values Fam Zheng
2014-05-20 15:11   ` Eric Blake
2014-05-20  9:07 ` [Qemu-devel] [RFC PATCH v2 2/7] qapi: Allow true, false and null in schema json Fam Zheng
2014-05-20 19:20   ` Eric Blake
2014-05-20  9:07 ` [Qemu-devel] [RFC PATCH v2 3/7] tests: Add decimal test cases for qapi-schema Fam Zheng
2014-05-20 12:43   ` Eric Blake
2014-05-20  9:07 ` [Qemu-devel] [RFC PATCH v2 4/7] qapi: Add c_val(t, val) for int Fam Zheng
2014-05-20  9:07 ` [Qemu-devel] [RFC PATCH v2 5/7] qapi: Add @arg property dictionary syntax Fam Zheng
2014-05-20  9:08 ` [Qemu-devel] [RFC PATCH v2 6/7] qapi: Initialize argument value in generated code if has 'default' Fam Zheng
2014-05-20  9:08 ` [Qemu-devel] [RFC PATCH v2 7/7] qmp: Convert block-commit speed to arg property dict Fam Zheng
2014-05-20  9:16 ` Fam Zheng [this message]
2014-05-20 19:13 ` [Qemu-devel] [RFC PATCH v2 0/7] qapi: Specify default value for optional argument in schema json Eric Blake
2014-05-21  1:59   ` Fam Zheng
2014-05-21  5:54     ` Markus Armbruster
2014-05-21  7:09       ` Fam Zheng
2014-05-21  7:46         ` Markus Armbruster
2014-05-21  8:23           ` Kevin Wolf
2014-05-21  8:42             ` Fam Zheng
2014-05-21  9:01               ` Kevin Wolf
2014-05-21 11:32               ` Eric Blake
2014-05-21  9:35             ` 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=20140520091651.GC13450@T430.nay.redhat.com \
    --to=famz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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).