[PATCH wayland v2] Remove protocol/wayland.dtd

Pekka Paalanen ppaalanen at gmail.com
Fri Oct 16 01:42:21 PDT 2015


On Fri, 16 Oct 2015 12:29:11 +1000
Peter Hutterer <peter.hutterer at who-t.net> wrote:

> On Fri, Oct 09, 2015 at 01:16:49PM +0200, Nils Chr. Brause wrote:
> > Hi,
> > 
> > Reviewed-by: Nils Christopher Brause <nilschrbrause at googlemail.com>
> > 
> > I ran distcheck and it worked. :)
> 
> a bit late, but I would like to register my disagreement with this patch :)
> 
> Having the DTD is a much simpler and less bug-prone description of what the
> protocol should look like. Having the scanner define the protocol means the
> protocol is whatever the current version of the scanner supports, which is
> not a good contract.

Hi Peter,

can't argue with that. It's just that the DTD was unused since
6292fe2af6a45decb7fd39090e74dd87bc4e22b2, Feb 2014.

> I'd argue for reverting this and fixing any mismatch if there is one. And
> using the DTD to validate before the scanner even runs.

We talked in IRC about this, and came to the conclusion that maybe we
could have wayland-scanner invoke a validity checker against a DTD or
an XSD.

If the original objection to a DTD was because it required manually
writing a lint phase in every project build system using the XML files,
then having wayland-scanner invoke the check automatically solves that.

Then it becomes a question of how to do that and what tools or
libraries to rely on. Running an external lint program from scanner.c
could be a start.

Migrating scanner.c from expat to some validating XML parser library
would be a big enough change that I would like to see some scanner
tests written before that.

I think this summarises our IRC discussion for the mailing list.


Thanks,
pq

> > On Fri, Oct 9, 2015 at 10:01 AM, Auke Booij <auke at tulcod.com> wrote:
> > > Yeah, that was a pretty embarrassing mistake by me, for such a simple
> > > patch. Thanks to Bryce for catching it.
> > >
> > > On 8 October 2015 at 15:05, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > >> On Thu,  8 Oct 2015 14:35:34 +0100
> > >> Auke Booij <auke at tulcod.com> wrote:
> > >>
> > >>> The wayland scanner defines the protocol. The DTD specification is not used.
> > >>> ---
> > >>>  Makefile.am          |  4 ++--
> > >>>  protocol/wayland.dtd | 29 -----------------------------
> > >>>  2 files changed, 2 insertions(+), 31 deletions(-)
> > >>>  delete mode 100644 protocol/wayland.dtd
> > >>
> > >> Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
-------------- 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/20151016/33762320/attachment.sig>


More information about the wayland-devel mailing list