Skip to content

[CI] Test installed headers for include errors - #19543

Draft
hageboeck wants to merge 8 commits into
root-project:masterfrom
hageboeck:postInstallHeaderTest
Draft

[CI] Test installed headers for include errors#19543
hageboeck wants to merge 8 commits into
root-project:masterfrom
hageboeck:postInstallHeaderTest

Conversation

@hageboeck

@hageboeck hageboeck commented Aug 5, 2025

Copy link
Copy Markdown
Member

Add a new step to the CI. In this step, every installed header is checked for syntax errors (except for TMVA, vdt, bvh, and a few headers that aren't supposed to be used standalone).
If the header doesn't include all headers it depends on, this will provoke a compiler error. This means that this header works by accident, because it's included in another TU that was already including the relevant dependencies.
This is less aggressive than IncludeWhatYouUse, but still validates that all headers can be included standalone.

@hageboeck hageboeck self-assigned this Aug 5, 2025
@github-actions

github-actions Bot commented Aug 5, 2025

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 19h 20m 28s ⏱️
 3 863 tests  3 861 ✅ 0 💤 2 ❌
79 591 runs  79 587 ✅ 1 💤 3 ❌

For more details on these failures, see this check.

Results for commit 670a4cc.

♻️ This comment has been updated with latest results.

@dpiparo dpiparo closed this Oct 8, 2025
@dpiparo dpiparo reopened this Oct 8, 2025
@hageboeck
hageboeck force-pushed the postInstallHeaderTest branch 5 times, most recently from 91b55e2 to f1ec055 Compare October 9, 2025 09:58
@hageboeck
hageboeck force-pushed the postInstallHeaderTest branch 3 times, most recently from 20c85af to d9afa80 Compare September 1, 2026 14:51
RTaskArena uses a message pointing to imt=Off, whereas TThreadExecutor
was pointing to the name of the ROOT-internal macro. Here, the same
error message is used.
Add a script that checks all installed headers for syntax errors.
This tests if they can be included standalone or if they rely on
parasitic includes.
Several subfolders or headers are skipped for now, since they either
cannot be used standalone or depend on externals which are not
necessarily installed.
@hageboeck
hageboeck force-pushed the postInstallHeaderTest branch from d9afa80 to 670a4cc Compare September 1, 2026 14:54
Instead of globbing in inc/ and unconditionally installing all headers,
provide a mode that explicitly lists all headers to be installed.
Previously, optional headers were passed to a variable that didn't get
used. Here, they are passed to ROOT's CMake macro, so they can be used
to conditionally install the headers in a subsequent commit.
When curl or daos are off, the corresponding headers are broken.
Therefore, they should not be installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants