-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[eve7] Include json_fwd.hpp if available #11205
Conversation
Starting build on |
Problem is ROOT builds where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.hpp
is 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/json
introduced "versioned, ABI-tagged inline namespace"s, which breaks our forward declaration. Fortunately, we can assume thejson_fwd.hpp
header to be present starting from that same version because theJSON_MultipleHeaders
option now defaults toON
and even if not,json_fwd.hpp
is installed since patch version 3.11.2. Forearlier versions, both methods work but
json_fwd.hpp
isn't guaranteed to be installed. Still use it if available.Fixes #11130