On Sat, Dec 14, 2013 at 5:41 AM, Massimo Callegari
<
massimocal...@gmail.com> wrote:
> Hello Simon,
> breaking binary compatibility is no good news for the QLC+ project.
> It already happened between 0.8.28 and 0.8.30. In this way you force users
> using softwares linking OLA libraries to update to the latest version.
> So if someone likes version x.y of QLC+ on OSX but a new OLA version is
> available on macports, the QLC+ OLA plugin will get broken. Same thing on
> Linux whenever they install a new OLA distribution. This is valid also the
> other way round (when they prefer a particular OLA version)
> I cannot maintain different OLA plugins depending on different OLA versions.
> Especially on OSX where the OLA plugin is bundled inside a DMG.
> Now a user submitted a patch on Github and I don't really know what to do
> with it:
>
https://github.com/lynxis/qlcplus/commit/771ce426e83b7d456ff19abc762ce5440507775c#commitcomment-4862580
Don't merge that. You'll break anyone who isn't using the git version
of OLA. I appreciate the problems with library versioning and am
treating it seriously. The API introduced in 0.9.0 has been designed
to avoid future breaking changes. I'm expecting this to be the API
used for 1.0 (modulo bug fixes) which will be supported long term.
ola::OlaClient was the original C++ client, it's been deprecated since
Feb 2013 and will be removed in 0.9.0 (in git now)
ola::OlaCallbackClient was the replacement for ola::OlaClient . It has
been replaced by ola::client::OlaClient in 0.9.0 and will be removed
in 1.0.0
To reduce disruption, I suggest QLC use ola::OlaCallbackClient to
remain compatible with the 0.8.0 series and then switch to
ola::client::OlaClient once 0.9.0 has been out for 6 - 12 months.
I'll make a changeset that does this.
>
> As for building, I found no way to detect the OLA version, thus
> enabling/disabling different part of the code. So if a user likes version
> x.y of OLA, they will find that they cannot build QLC+ on it, cause at the
> moment QLC+ can compile to a single OLA version (usually the latest), thus
> getting stuck to it.
> A lot of projects exposing shared libraries have a #define in the code for
> this reason. I suggest you to start doing it as well (even though I suppose
> it's too late now)
I've added include/ola/client/Version.h which provides both compile
time and run time version info:
https://code.google.com/p/open-lighting/source/browse/include/ola/client/Version.h
You can also do build time detection with pkg-config:
pkg-config --atleast-version 0.8.28 libola
Simon
> Something like "#define OLA_VERSION 000833" somewhere in your .h files.
> Otherwise, please let me know if there is a way to detect the OLA version at
> build time. (maybe via pkg-config?)
>
> Thanks,
> Massimo