Hi, * Gianfranco Costamagna <locutusofborg@debian.org> [2025-09-17 08:33]:
Hello, new idea, what if I upload 3.12 with abi stick to 3.11, such as not changing the namespace anymore?#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) json_abi ## a ## b ## c It might be a matter of patching out this string, to avoid putting that stuff inside the library. My proposal is: 1) Upload 3.12 with 3.11 hardcoded in library. 2) From 3.12+ try to make some sort of transition and make this ABI version disappear from library. Any comment on the above?
If the namespace name is the only relevant thing that changed, this will work and is (IMHO) a quite elegant solution to the current dilemma. However, if there is genuine ABI breakage, it will just paper over the issue and cause bugs downstream, so we need to check that first.
Also this might be interesting https://salsa.debian.org/debian/nlohmann-json3/-/blob/master/single_include/nlohmann/json.hpp?ref_type=heads#L103 #ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 #endif I tried to build xeus with export CFLAGS=-DNLOHMANN_JSON_NAMESPACE_NO_VERSION=1 export CXXFLAGS=-DNLOHMANN_JSON_NAMESPACE_NO_VERSION=1 so my proposal is to make that NAMESPACE_NO_VERSION default inside nlohmann-json3 code from next release, what do you think?
There is a spectrum with the current solution (each release is an implicit ABI bump) at the one end and this proposal (no ABI versioning at all) at the other.
Personally, I would prefer the middle ground with a namespace tag that has an independent ABI version that gets bumped like a SONAME, because you can never have two different versions of nlohmann-json interfering in the same binary (for example, because two libraries happen to use them internally and do not hide their private symbols properly).
In practise, it will most likely not be an issue unless the Release Team forgets to BinNMU a library that uses nlohmann-json as private dependency (becauses vendored copies in third party libraries will probably keep the default namespace versioning). So proper versioning for nlohmann-json is not the hill I'm going to die defending. ;)
Cheers Timo -- ⢀⣴⠾⠻⢶⣦⠀ ╭────────────────────────────────────────────────────╮ ⣾⠁⢠⠒⠀⣿⡁ │ Timo Röhling │ ⢿⡄⠘⠷⠚⠋⠀ │ 9B03 EBB9 8300 DF97 C2B1 23BF CC8C 6BDD 1403 F4CA │ ⠈⠳⣄⠀⠀⠀⠀ ╰────────────────────────────────────────────────────╯
Attachment:
signature.asc
Description: PGP signature