[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] schemas: Add vim modeline
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH] schemas: Add vim modeline |
Date: |
Fri, 31 Jul 2020 09:48:57 +0100 |
User-agent: |
Mutt/1.14.5 (2020-06-23) |
On Fri, Jul 31, 2020 at 09:15:13AM +0200, Kevin Wolf wrote:
> Am 30.07.2020 um 17:11 hat Eric Blake geschrieben:
> > > The QAPI schema language has two layers:
> > >
> > > * JSON, with a lexical and a syntactical sub-layer (both in parser.py)
> > >
> > > * QAPI, with a context-free and a context-dependend sub-layer (in
> > > expr.py and schema.py, respectively)
> > >
> > > Replacing the JSON layer is possible as long as the replacement is
> > > sufficiently expressive (not a tall order).
> >
> > I'm open to the idea, if we want to attempt it, and agree with the
> > assessment that it is not a tall order.
>
> I'm not so sure about that. I mean, it certainly sounds doable if need
> be, but getting better syntax highlighting by default in some editors
> feels like a pretty weak reason to switch out the complete schema
> language.
The main compelling reason to me is that we get to throw away our
custom written parsing code and use a standard python library.
Actually following a standardized document format is a benefit to
contributors, over something that looks like a standard format but
is actually slightly different as it is our own parser.
Automatic correct syntax highlighting is a happy side effect.
More interesting is if the editor automatically does the right
thing with indentation/formatting when writing schemas.
I wont miss the "not allowed a trailing comma after the last field"
part of JSON as I always get it wrong.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), (continued)
- cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Paolo Bonzini, 2020/07/31
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Daniel P . Berrangé, 2020/07/31
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Paolo Bonzini, 2020/07/31
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Daniel P . Berrangé, 2020/07/31
- Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline), Paolo Bonzini, 2020/07/31
- Re: [PATCH] schemas: Add vim modeline, Kevin Wolf, 2020/07/31
- Re: [PATCH] schemas: Add vim modeline, Eric Blake, 2020/07/30
- Re: [PATCH] schemas: Add vim modeline, John Snow, 2020/07/30
- Re: [PATCH] schemas: Add vim modeline, John Snow, 2020/07/30
- Re: [PATCH] schemas: Add vim modeline, Kevin Wolf, 2020/07/31
- Re: [PATCH] schemas: Add vim modeline,
Daniel P . Berrangé <=
- Re: [PATCH] schemas: Add vim modeline, Markus Armbruster, 2020/07/31
- Re: [PATCH] schemas: Add vim modeline, Kevin Wolf, 2020/07/31
- Re: [PATCH] schemas: Add vim modeline, Nir Soffer, 2020/07/31
- Re: [PATCH] schemas: Add vim modeline, Markus Armbruster, 2020/07/30