Enums, bitfields and wl_arrays in the .xml file

Pekka Paalanen ppaalanen at gmail.com
Fri Oct 2 04:23:24 PDT 2015


On Fri, 25 Sep 2015 12:43:55 +0200
Victor Berger <victor.berger at polytechnique.org> wrote:

> On 2015-09-25 12:25, Nils Chr. Brause wrote :
> > Hi,
> > 
> > On Fri, Sep 25, 2015 at 10:52 AM, Victor Berger
> > <victor.berger at polytechnique.org> wrote:

> >> The questions about how breaking evolutions will be handled need to be
> >> specified as well: how should an old scanner behave when it encounters 
> >> a
> >> more recent protocol file, containing fields or attributes it does not
> >> recognize ? Ignore them ? Fail and declare being "not compatible with 
> >> this
> >> protocol format, please upgrade" ?
> > 
> > The last one makes the most sense to me. Someone who develops a
> > language binding should always keep her/his scanner up to date with the
> > most recent XML file format.
> 
> Agreed...

This fails if someone is stuck with an old version of libwayland and
the scanner, e.g. due to policy or proprietary software reasons, and
wants to use a recent third party XML. They are not good reasons...

But since I believe that wayland-scanner already ignores unknown
attributes, there is no problem. We cannot retroactively change old
scanners anyway.


> > [...]
> > Also, from the discussion last year it emerged that the scanner should 
> > also be
> > modified to at least check for the validity of the new attribues.
> > You can find the work that I had done so far here:
> > https://github.com/NilsBrause/Wayland/commits/xml
> 
> ... but from the discussion I had with pq on IRC, it does not seem like 
> having the C-scanner start rejecting "old" protocol files is a welcomes 
> outcome, from they point of view.

Yes. Let's not break existing users, be that old XML files or old
scanners.

> However, maybe checking the file, and emitting warnings if it is in an 
> old format could be an option ?
> 
> The other bindings could explicitly refuse old formats, I don't think 
> it's a deal breaker either.

Did you just swap the scenario here? How can you even detect old XML
files? The proposals so far do not include anything for that, and I
don't think it should even be an issue.

Adding an XML language version might be possible, but is it necessary?


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151002/0758b6a3/attachment.sig>


More information about the wayland-devel mailing list