[eve7] Include json_fwd.hpp if available#11205
Conversation
|
Starting build on |
|
Problem is ROOT builds where |
falbrechtskirchinger
left a comment
There was a problem hiding this comment.
Some notes:
- Avoid v3.11.0 and v3.11.1 if possible, i.e., advise users to upgrade.
- We did not split the inline namespace in v3.11.2 (it's still just one).
json_fwd.hppis only available from v3.11.0 if built with-DJSON_MultipleHeaders=ON.- If not for the inline namespace, this would have broken once nlohmann/json#3110 is merged.
Version 3.11 of nlohmann/json introduced "versioned, ABI-tagged inline namespace"s, which breaks our forward declaration. Fortunately, we can assume the json_fwd.hpp header to be present starting from that same version because the JSON_MultipleHeaders option now defaults to ON and even if not, json_fwd.hpp is installed since patch version 3.11.2. For earlier versions, both methods work but json_fwd.hpp isn't guaranteed to be installed. Still use it if available. Fixes root-project#11130
Our forward declaration in REveElement.hxx breaks with the versioned namespaces in 3.11, so we require the json_fwd.hpp header.
|
Starting build on |
I know, but we have to do something, and as agreed on Wednesday, we actually want to ensure that users have the same version of |
linev
left a comment
There was a problem hiding this comment.
eve7 examples working - tested with opensuse and system-wide install json.hpp and json_fwd.hpp
One can merge it!
|
Does this merit a backport into 6.26 branch since it prevents compilation? Just wondering from a packager's point of view keeping an eye on build issues. |
Version 3.11 of
nlohmann/jsonintroduced "versioned, ABI-tagged inline namespace"s, which breaks our forward declaration. Fortunately, we can assume thejson_fwd.hppheader to be present starting from that same version because theJSON_MultipleHeadersoption now defaults toONand even if not,json_fwd.hppis installed since patch version 3.11.2. Forearlier versions, both methods work but
json_fwd.hppisn't guaranteed to be installed. Still use it if available.Fixes #11130