diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2016-07-22 14:51:50 +0100 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2016-08-02 13:52:09 +0300 |
commit | aa485921cfe1f45eaafb3bd8d0ad43a48738a2bb (patch) | |
tree | d6f393949d8dc84cd256ed5f7204324f3ec17274 /README | |
parent | 78a36373f6207984d62fa4fb77fa584ee00d1976 (diff) |
README: Document versioning scheme, forward compatibility
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'README')
-rw-r--r-- | README | 49 |
1 files changed, 49 insertions, 0 deletions
@@ -70,6 +70,55 @@ For more information about parallel installability, see http://ometer.com/parallel.html +Versioning scheme +----------------- + +In order to provide consistent, easy to use versioning, libweston +follows the rules in the Apache Portable Runtime Project +http://apr.apache.org/versioning.html. + +The document provides the full details, with the gist summed below: + - Major - backward incompatible changes. + - Minor - new backward compatible features. + - Patch - internal (implementation specific) fixes. + + +Forward compatibility +--------------------- + +Inspired by ATK, Qt and KDE programs/libraries, libjpeg-turbo, GDK, +NetworkManager, js17, lz4 and many others, libweston uses a macro to restrict +the API visible to the developer - REQUIRE_LIBWESTON_API_VERSION. + +Note that different projects focus on different aspects - upper and/or lower +version check, default to visible/hidden old/new symbols and so on. + +libweston aims to guard all newly introduced API, in order to prevent subtle +breaks that a simple recompile (against a newer version) might cause. + +The macro is of the format 0x$MAJOR$MINOR and does not include PATCH version. +As mentioned in the Versioning scheme section, the latter does not reflect any +user visible API changes, thus should be not considered part of the API version. + +All new symbols should be guarded by the macro like the example given below: + +#if REQUIRE_LIBWESTON_API_VERSION >= 0x0101 + +bool +weston_ham_sandwich(void); + +#endif + +In order to use the said symbol, the one will have a similar code in their +configure.ac: + +PKG_CHECK_MODULES(LIBWAYLAND, [libwayland-1 >= 1.1]) +AC_DEFINE(REQUIRE_LIBWESTON_API_VERSION, [0x0101]) + +If the user is _not_ interested in forward compatibility, they can use 0xffff +or similar high value. Yet doing so is not recommended. + + Libweston design goals ---------------------- |