Skip to content

[hist] v5 legacy headers: move to ROOT subfolder - #23406

Open
ferdymercury wants to merge 10 commits into
root-project:masterfrom
ferdymercury:bv5
Open

ferdymercury wants to merge 10 commits into
root-project:masterfrom
ferdymercury:bv5

Conversation

@ferdymercury

@ferdymercury ferdymercury commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

a cryptic "v5" folder is another of the issues for Debian when make-installing ROOT.

Move those legacy headers to ROOT subfolder and provide fallback until fully unsupporting the short-path.

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Test Results

    24 files      24 suites   3d 23h 41m 35s ⏱️
 3 870 tests  3 867 ✅ 0 💤 3 ❌
83 755 runs  83 751 ✅ 0 💤 4 ❌

For more details on these failures, see this check.

Results for commit 3d1a8b9.

♻️ This comment has been updated with latest results.

@ferdymercury
ferdymercury marked this pull request as ready for review September 18, 2026 07:42
@ferdymercury ferdymercury added this to the 6.42.00 milestone Sep 18, 2026
Comment thread hist/hist/inc/v5/TF1Data.h Outdated
Comment thread hist/hist/inc/v5/TFormula.h Outdated
Comment thread hist/hist/inc/v5/TFormulaPrimitive.h Outdated
@guitargeek

Copy link
Copy Markdown
Contributor

So far, all headers in the ROOT/ subfolder have the .hxx suffix. What would speak against doing this here too, since we're already moving the header?

@guitargeek

Copy link
Copy Markdown
Contributor

@ferdymercury LGTM in principle, but the CI is red...

@ferdymercury ferdymercury added the skip code analysis Skip the code analysis CI steps for this PR, including verifying clang-formatting and running Ruff. label Sep 29, 2026
Comment thread hist/hist/src/TFormula_v5.cxx
Comment thread hist/hist/src/TFormula.cxx Outdated
Comment thread hist/hist/src/TFormula.cxx
@ferdymercury

Copy link
Copy Markdown
Collaborator Author

but the CI is red...

Sorry, fixed now...

@pcanal

pcanal commented Sep 29, 2026

Copy link
Copy Markdown
Member

So far, all headers in the ROOT/ subfolder have the .hxx suffix. What would speak against doing this here too, since we're already moving the header?

On the other hand, those header files do not define 'modern' interfaces (literally the opposite :)), so we probably have to have a short discussion on what is the right path for all the old headers (including TObject.h etc.).

If/since a .hxx suffix is a requirement for going under ROOT/ and that it sort-of signal modern interfaces (or maybe it does not and the prefix T is enough of a counter-clue), it would seen to not belong in ROOT/.

One advantage of keeping the .h is the user would have the 'other' option of doing -I$ROOTSYS/include/ROOT -I$ROOTSYS/include to remove the warning.

@ferdymercury

Copy link
Copy Markdown
Collaborator Author

If/since a .hxx suffix is a requirement

In my opinion, hxx should be used for C++ headers and h for C headers, independently on the modernity level. So I would not see a problem of moving .h headers into ROOT.
It would align also with clang's policy, otherwise it emits
warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
when generating depfiles.

That being said, the main purpose of this PR was to move it, not to rename the extension, so I am happy to fix either way once there is consensus with @guitargeek and @pcanal :).

@hageboeck

hageboeck commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

If/since a .hxx suffix is a requirement for going under ROOT/ and that it sort-of signal modern interfaces (or maybe it does not and the prefix T is enough of a counter-clue), it would seen to not belong in ROOT/.

I have never seen/heard this being a requirement for being in ROOT/. I can also see your point of using -I<prefix>/ROOT, and the header would be found.
For me, this makes .h the preferable option, especially since these headers are already in v5, so they can have a v5 naming convention.

So far, all headers in the ROOT/ subfolder have the .hxx suffix. What would speak against doing this here too, since we're already moving the header?

Breaking code would speak against it. You could run the same code by adding -I<prefix>/ROOT to your build system.

@guitargeek @pcanal, vote?

@guitargeek

Copy link
Copy Markdown
Contributor

Actually I'm also for .h. I just didn't want to be the guy who approves a PR that sets a precedent for a new pattern, in this case ROOT/*.hxx. That's why I raised that comment. But I could also get behind .hxx.

Comment thread README/ReleaseNotes/v642/index.md Outdated
Comment thread hist/hist/CMakeLists.txt Outdated
Comment thread hist/hist/inc/ROOT/v5/TF1Data.hxx Outdated
Comment thread hist/hist/inc/v5/TF1Data.h Outdated
Comment thread hist/hist/inc/v5/TFormula.h Outdated
Comment thread hist/hist/src/TFormulaPrimitive_v5.cxx Outdated
Comment thread hist/hist/src/TFormula_v5.cxx Outdated
Comment thread hist/hist/src/TFormula_v5.cxx Outdated
Comment thread test/TFormulaTests.cxx Outdated
Comment thread tree/treeplayer/inc/TTreeFormula.h Outdated

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip code analysis Skip the code analysis CI steps for this PR, including verifying clang-formatting and running Ruff.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants