On Fri, 8 Dec 2023 10:10:28 -0500 jleivent <jleiv...@comcast.net> wrote:
> On Fri, 8 Dec 2023 12:54:35 +0100 > Sebastian Wick <sebastian.w...@redhat.com> wrote: > > > ... > > I think a more useful thing to do would be to add this restriction (an > > interface cannot have an event and a request with the same name) to > > the documentation and to wayland-scanner. > > > > Also: an event and request with the same name would probably confuse > anyone using WAYLAND_DEBUG. The printout includes an arrow for sending, so you can use that to decipher event from request if you know whether you are looking at client or server side. > But: Would changing wayland-scanner to prevent this be backward > compatible? Can't someone somewhere already have an event/request pair > with the same name in their own private protocol extension? One would just have to try with the latest and some old version of wayland-scanner, would the generated C code and headers ever pass a C compiler. There are no other obstacles in using the same name for both event and request in the same interface. If it always fails to build, then adding the check would be ok. If it builds fine, then the check would be backward-incompatible. A completely other question is whether that break would be a good idea anyway. Thanks, pq
pgp36nqod3UXn.pgp
Description: OpenPGP digital signature