From a9d7154fe1b68bb634dba8872e47b96eaef7af62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Fri, 12 Dec 2025 12:00:31 +0100 Subject: [PATCH] nm-version: set API_VERSION with MICRO+1 (temporary) In the past, stable branches used odd micro numbers as development micro version. Because of that, NM_API_VERSION was defined with MICRO+1 so we don't get warnings during development. As we stopped using odd micro=devel it is wrong to set MICRO+1 on odd releases. Final users of 1.52.3 has NM_API_VERSION 1.52.4. However, during development we need to have MICRO+1. For example, if we are working on top of 1.52.3 towards the next 1.52.4, we define new symbols with NM_AVAILABLE_IN_1_52_4. Because of that, we get compilation failures until we finally bump to 1.52.4, just before the release. The CI remains red until then, potentially missing many bugs. For now, just set MICRO+1 all the time. It is wrong, but it was wrong half of the time anyway, and at least we'll have a green CI until we implement a definitive solution. (cherry picked from commit 13bfa44cebf504e88e2ac00ab85145119263d8fe) --- src/libnm-core-public/nm-version-macros.h.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libnm-core-public/nm-version-macros.h.in b/src/libnm-core-public/nm-version-macros.h.in index 49f283f6ea..9384917c3b 100644 --- a/src/libnm-core-public/nm-version-macros.h.in +++ b/src/libnm-core-public/nm-version-macros.h.in @@ -87,10 +87,10 @@ * version, you are already using the future API, even if * it is not yet released. Hence, the currently used API * version is the future one. */ -#define NM_API_VERSION \ - (((NM_MINOR_VERSION % 2) == 1) \ - ? NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION + 1, 0 ) \ - : NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION , ((NM_MICRO_VERSION + 1) / 2) * 2)) +#define NM_API_VERSION \ + (((NM_MINOR_VERSION % 2) == 1) \ + ? NM_ENCODE_VERSION(NM_MAJOR_VERSION, NM_MINOR_VERSION + 1, 0) \ + : NM_ENCODE_VERSION(NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION + 1)) /* deprecated. */ #define NM_VERSION_CUR_STABLE NM_API_VERSION