[Xcb] Re RFC: The need to break the API. (Im)Possible?

Mark Kettenis mark.kettenis at xs4all.nl
Mon Jul 21 14:07:12 PDT 2014


> From: Steven Stewart-Gallus <sstewartgallus00 at mylangara.bc.ca>
> Date: Mon, 21 Jul 2014 19:48:38 +0000 (GMT)
> 
> ----- Original Message -----
> Date: Sat, 19 Jul 2014 22:11:41 +0200
> rom: Daniel Martin <consume.noise at gmail.com>
> To: xcb at lists.freedesktop.org
> Subject: [Xcb] RFC: The need to break the API. (Im)Possible?
> Message-ID: <20140719201140.GA2767 at unplugged.fritz.box>
> Content-Type: text/plain; charset=us-ascii
>  
> > Dear list readers,
> > 
> > we've had a few places in proto we couldn't fix correctly as a correct
> > fix would break the API of libxcb, recently. Then I see a lot of 
> > placesin proto that should be changed to represent the actual 
> > protocol more
> > precisely. To mention a few:
> > - replace valueparams with switch/bitcases
> > - replace unions with switch/cases (yes, they aren't supported yet)
> > - or just the typo "permament":
> >    http://cgit.freedesktop.org/xcb/proto/tree/src/xkb.xml#n471
> > 
> > I would like to contribute such changes to proto, but they all 
> > break the
> > API of libxcb. So, does anyone has an idea how we can handle such
> > changes?
> > 
> > 
> > Cheers,
> >    Daniel
> > 
> > PS: Replacing unions with switch/cases is one requirement if anyone 
> > ever    wants to generate the byte-swapping code for the server. ;)
> 
> I agree with Josh Triplett that API change is not a worry and that ABI
> change is.  I believe that approaches similiar to the one I advocated
> in https://bugs.freedesktop.org/show_bug.cgi?id=80044 work for API
> changes.

Sorry, but I don't understand.  ABI breaks are easy.  You just bump
the shared library major version.  And people can choose if they want
to continue to distribute old binaries or recompile their code.

API changes are much more annoying.  They require changes to
(potentially) all software that uses the library.  And if people want
to continue supporting the old API, they'll have to turn their code
into #ifdef spagetthi.


More information about the Xcb mailing list