Mir

Code review comment for lp:~robertcarr/mir/dev-package-depends-on-boost

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> This MP is about runtime dependencies - we already use libboost-all-dev at build time

Actually this MP is about build time dependencies of other code building against the Mir libraries. We are providing headers in our -dev packages that reference various external headers but don't require (through package dependency mechanisms) those external headers to be present.

>> $ dpkg --search /usr/include/boost/asio.hpp
>> libboost1.53-dev: /usr/include/boost/asio.hpp
>
> header only library => not needed by runtime.
>
>> $ dpkg --search /usr/include/boost/throw_exception.hpp
>> libboost1.53-dev: /usr/include/boost/throw_exception.hpp

> header only library => not needed by runtime.

...but currently needed by other code when build against Mir (e.g., if they include asio_main_loop.h).

The throw_exception dependency can easily be removed. The asio dependency can also be removed, e.g., by using Cheshire Cat.

Note that we have even more external header dependencies that are not dealt with at the moment:

$ grep -R '#include <.*h\(pp\)*>' include/shared include/server include/client

... and after some manual filtering:

include/server/mir/compositor/buffer_swapper_spin.h:#include <boost/throw_exception.hpp>
include/server/mir/options/program_option.h:#include <boost/program_options/variables_map.hpp>
include/server/mir/options/program_option.h:#include <boost/program_options/options_description.hpp>
include/server/mir/asio_main_loop.h:#include <boost/asio.hpp>
include/server/mir/graphics/drm_authenticator.h:#include <xf86drm.h>
include/server/mir/graphics/gl_renderer.h:#include <GLES2/gl2.h>
include/server/mir/graphics/internal_client.h:#include <EGL/egl.h>
include/server/mir/graphics/display_report.h:#include <EGL/egl.h>
include/shared/mir/graphics/android/android_driver_interpreter.h:#include <system/window.h>
include/shared/mir/graphics/android/mir_native_window.h:#include <system/window.h>
include/shared/mir/input/xkb_mapper.h:#include <xkbcommon/xkbcommon.h>

Our header dependencies are either headers that the users of mir libraries will need to interact with the library, or just header "leaks".

My proposal is to decide which is which, remove/hide the "leaked" header dependencies, and depend only on the -dev packages of real header dependencies.

> Do we also need to add libboost-system-dev?

It doesn't seem so. libboost-system doesn't provide any headers.

The improvements described above can be done in another MP, or this MP, I don't have a preference. This MP is fine as it is, so approving.

review: Approve

« Back to merge proposal