qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v7 10/14] qapi: Detect collisions in C member na


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v7 10/14] qapi: Detect collisions in C member names
Date: Mon, 12 Oct 2015 10:34:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 10/09/2015 08:11 AM, Markus Armbruster wrote:
>> Eric Blake <address@hidden> writes:
>> 
>>> Detect attempts to declare two object members that would result
>>> in the same C member name, by keying the 'seen' dictionary off
>>> of the C name rather than the qapi name.  It also requires passing
>>> info through some of the check() methods.
>>>
>>> This fixes two previously-broken tests, and the resulting error
>>> messages demonstrate the utility of the .describe() method added
>>> previously.  No change to generated code.
>>>
>>> Signed-off-by: Eric Blake <address@hidden>
>>>
>
>>> +++ b/tests/qapi-schema/args-name-clash.err
>>> @@ -0,0 +1 @@
>>> +tests/qapi-schema/args-name-clash.json:5: 'a_b' (member of oops
>>> arguments) collides with 'a-b' (member of oops arguments)
>> 
>> "(argument of oops)" would be better, but "(member of oops arguments)"
>> will do.
>
> May be possible to tweak the describe() function in the previous commit
> along those lines, especially since I'm already tweaking it to not have
> space in the generated name.  I'll have to play with it.

At some point, implementation simplicity trumps error message polish.
Use your judgement.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]