[gtk/ebassi/4-0-abi-bump: 1/2] build: Tie interface age to the development cycle
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/4-0-abi-bump: 1/2] build: Tie interface age to the development cycle
- Date: Mon, 23 Nov 2020 18:03:51 +0000 (UTC)
commit 69f2592423e6d0904947f3dfee3ba97c998c3975
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Nov 23 17:58:43 2020 +0000
build: Tie interface age to the development cycle
We don't want to increase the interface age manually, because we're
going to end up forgetting about it.
Instead, we should tie it to the rest of the version:
- in stable (even minor) cycles, we don't add new API; the interface
age is the same as the micro version
- in unstable (odd minor) cycles, every new release might have new API,
or updates to newly added API; keep the interface age to 0
This removes one more manual thing to change during release, and keeps
us honest with our promise not to add symbols during stable cycles.
meson.build | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/meson.build b/meson.build
index 28760aeff2..1071974ef1 100644
--- a/meson.build
+++ b/meson.build
@@ -30,15 +30,26 @@ add_project_arguments('-DG_LOG_USE_STRUCTURED=1', language: 'c')
add_project_arguments('-DGLIB_DISABLE_DEPRECATION_WARNINGS', language: 'c')
# Making releases:
-# 1. gtk_micro_version += 1;
-# 2. gtk_interface_age += 1;
-# 3. if any functions have been added, set gtk_interface_age to 0.
-# 4. if backwards compatibility has been broken, we're in trouble
+# 1. new development cycle:
+# a. gtk_minor_version += 1
+# b. gtk_micro_version = 0
+# 2. new stable cycle:
+# a. gtk_minor_version += 1
+# b. gtk_micro_version = 0
+# 3. every new release:
+# a. gtk_micro_version += 1
gtk_version = meson.project_version()
gtk_major_version = gtk_version.split('.')[0].to_int()
gtk_minor_version = gtk_version.split('.')[1].to_int()
gtk_micro_version = gtk_version.split('.')[2].to_int()
-gtk_interface_age = 0
+
+# Interface age gets reset during development cycles, when
+# we add new API; new micro versions of the same minor
+# stable cycle will have the same interface age
+#
+# If new API is added during a stable cycle, reset to 0
+gtk_interface_age = gtk_minor_version.is_odd() ? 0 : gtk_micro_version
+
add_project_arguments('-DGTK_VERSION="@0@"'.format(meson.project_version()), language: 'c')
add_project_arguments('-D_GNU_SOURCE', language: 'c')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]