On 04/07/2013 22:20, Kristian Høgsberg wrote:
On Thu, Jul 4, 2013 at 12:35 PM,  <sardemff7+wayl...@sardemff7.net>
wrote:
And they must link directly! That is the proper way to do that.
Providing API using these libraries does not mean forcing anyone to
use that. And using a library does require linking to it. Hiding
this dependency inside "libweston" is error-prone. I was going to
speak conditionally, but now it is the case so check that: A plugin
is using libxkbcommon for a feature, but provides several more.
Weston is build with libxkbcommon support. All is fine. Now, the
same plugin is build against a non-libxkbcommon Weston (this is
the now-possible case): it will break badly. Explicit usage is the
way. Period.

And that's exactly why I want it to be plain Requires.  pixman isn't
an implentation detail of weston, the pixman API is part of the
weston plugin API.  When a module links to weston, it doesn't need
to additionally use pkg-config to discover pixman libs and cflags,
that should come from the weston.pc requirements.

And still, a plugin not using pixman will be forced to link to it, and
then break on soname bump. This is just wrong.
Also, if a plugin uses pixman it *must* link to it. But since *the plugin* uses it, it should definitely *not* be linked by some automagic flag provided by weston.


As for the libxkbcommon case, direct linking wont help you if weston
isn't compile with support for libxkbcommon, you need the
functionality to be available in weston and weston to link
libxkbcommon for any libxkbcommon use to make sense in a module.

My point is to provide rightly linked stuff. Making sense is not the linker’s job. If my plugin uses *only* weston libxkbcommon features, it will simply do nothing, but will not break. If it uses both libxkbcommon features and non-libxkbcommon ones, it will provide a subset of its features, but at least it will not entirely break.

--

Quentin “Sardem FF7” Glidic
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to