Package: libnlohmann-json-schema-validator-dev
Version: 2.4.0-2
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,

I believe this package is missing a dependency on the nlohmann-json3-dev
package since the json validator headers include and depend on it.

In addition I think this dependency should be very strict on the expected
nlohmann-json3-dev version since the exact version, to the patch level, is
embedded in the ABI namespace of the dependency symbols.
Such a mismatch can lead to linker errors.
For example, having the validator at 2.4.0-2 (built against nlohmann-json
3.11.3) and nlohmann-json at 3.12.0.really.3.12.0.really.3.12.0-2 (from
experimental since I really wanted 3.12) leads to:

undefined reference to
`nlohmann::json_schema::json_validator::validate(nlohmann::json_abi_v3_12_0::basic_json<std::map,
std::vector, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char,
std::allocator<unsigned char> >, void> const&,
nlohmann::json_schema::error_handler&, nlohmann::json_uri const&) const'
(and others)

FYI, I think there are other usages of nlohmann-json that would break in
combination with the validator but without a clear solution on the packaging
side.
For example, one can enable more detailed diagnostics using the compile time
define JSON_DIAGNOSTICS with the side effect of encoding this information in
the ABI namespace.
Unless the validator library is itself made fully header-only I don't think
this can be solved here, but the version mismatch with the default
configuration should be.

Sylvain


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (990, 'testing'), (800, 'stable-updates'), (800, 'stable'), (700, 
'unstable'), (90, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 7.0.9+deb14-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libnlohmann-json-schema-validator-dev depends on:
ii  libnlohmann-json-schema-validator2  2.4.0-2

libnlohmann-json-schema-validator-dev recommends no packages.

libnlohmann-json-schema-validator-dev suggests no packages.

-- no debconf information

Reply via email to