[PATCH wayland 0/4] Untangle the symbol export duplication
emil.l.velikov at gmail.com
Tue Aug 30 17:24:18 UTC 2016
For a while I've noticed that on mesa side we have few providers of the
wl_drm_interface symbol and literally all our 'wayland binaries' are
linked against both the client and server wayland libs.
After having a look, it seems that:
- the server exposes the interface symbols for 'inheritance' purposes,
thus other servers can build upon these primitives while designing their
own protocols (interfaces ?).
- at the same time the client needs to have a reference to the
interface symbol in order to register an instance of said interface.
This means that if the "wrong" symbol gets picked at runtime and the
client does not correctly manage older versions in its
.registry_handle_global function (yes we have a case or two of those in
the wild) things will end up horribly wrong.
I think that a better option would have been to distinguish the two
(call one instance or the other singleton) and let the scanner attribute
for the name difference. Regardless of that is that it's too late to
change things since this would lead to breaking the ABI.
One way around it to update the scanner to provide newer symbols and
annotate the old ones as deprecated. This way when/if we break the ABI
we can untangle things. One day...
Does the above sound about right - can anyone let me know if I'm loosing
the plot ?
That said, I've went ahead and removed duplication where possible - by
folding the util symbols into libwayland-util. Please check with patch 3/4
how compatibility with existing and new users is be preserved.
More information about the wayland-devel