[PATCH wayland] introduce new headers wayland-client/server-core.h

Bill Spitzak spitzak at gmail.com
Tue Apr 28 16:17:44 PDT 2015


>>>>> The problem is when you have an extension.xml, and generate
>>>>> extension-client-protocol.h. Then you have some preexisting code
>>>>> including that and relying on it including wayland-client.h and then
>>>>> wayland-client-protocol.h, and if you use something from that it will
>>>>> not build anymore, because wayland-client-core.h doesn't include it.

I think it is acceptable to say that the code has to be fixed in this 
case. It will only happen if they call a function that wayland-client.h 
defines but is not in wayland-client-core.h. You are being much too 
concerned about back compatibility here.

Removing the circular dependency in the header files is probably a good 
idea.

If it really is necessary to not break anything, I would write the 
protocol to a different .h file (best I can think of is to remove 
"-protocol" from the current name), and make back-compatibility headers 
that include this file and also wayland-client.h. Then encourage 
programmers to include the new header file. Code that includes the old 
one will still compile. This will also remove the deprecated functions 
from new programs.



More information about the wayland-devel mailing list