[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim m
From: |
Markus Armbruster |
Subject: |
Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline) |
Date: |
Tue, 04 Aug 2020 09:28:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Kevin Wolf <kwolf@redhat.com> writes:
> Am 03.08.2020 um 18:03 hat Markus Armbruster geschrieben:
>> Paolo Bonzini <pbonzini@redhat.com> writes:
>> > This means the two parts might be considered separately:
>> >
>> > - replacing single-quote with double-quote strings
>> >
>> > - replacing # comments with //
>>
>> If all we want is decent editor support out of the box, then rename to
>> .py, and drop the modelines. No merge conflicts, no git-blame
>> pollution.
>>
>> To make the .py files actual Python, additionally rename the bool
>> literals. Much, much less churn than massaging all strings or all
>> comments.
>
> I guess I could get behind this one. File renames still have a cost, but
> it feels like it wouldn't be absurdly high at least.
>
> And that you actually occasionally paste schema parts into real Python
> code suggests that there would be even a small benefit in addition to
> the good syntax highlighting out of the box.
>
> I fully expect that we'd keep our existing parser instead of using an
> actual Python parser, because the existing code (a) exists and (b) is
> probably simpler than the resulting code.
Replacing the part of parser.py that deals with JSON by off-the-shelf
code is a non-goal for me. I got better things to do than replacing[*]
a tiny parser that works by glue for another parser, moving QAPI
sideways instead of forward.
Any messing with the lower syntax layer in non-trivial ways needs to
bring benefits that make it worth our while.
[*] Includes reviewing patches.
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Markus Armbruster, 2020/08/03
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Paolo Bonzini, 2020/08/03
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Markus Armbruster, 2020/08/03
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Paolo Bonzini, 2020/08/03
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Markus Armbruster, 2020/08/04
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), John Snow, 2020/08/04
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Markus Armbruster, 2020/08/05
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Paolo Bonzini, 2020/08/05
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Dr. David Alan Gilbert, 2020/08/05
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Paolo Bonzini, 2020/08/05
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Daniel P . Berrangé, 2020/08/05
- Re: cleanups with long-term benefits, Cornelia Huck, 2020/08/05
- Re: cleanups with long-term benefits, Daniel P . Berrangé, 2020/08/05