Skip to content

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

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

[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.
Some headers which are installed are exempt, for example from TMVA, vdt, bvh, and single instances such as headers that aren't supposed to be used standalone. Minimising the suppressions and fixing the corresponding headers will be moved into a separate issue.

The test works as follows: the compiler is invoked to only run the syntax checks. If the header doesn't include all headers it depends on, this will provoke errors. 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 on their own.

Note, some commits were split off to other PRs:

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

github-actions Bot commented Aug 5, 2025

Copy link
Copy Markdown

Test Results

    21 files      21 suites   3d 7h 10m 53s ⏱️
 3 864 tests  3 863 ✅ 0 💤 1 ❌
71 501 runs  71 499 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit 7d19648.

♻️ 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 4 times, most recently from d9afa80 to 670a4cc Compare September 1, 2026 14:54
@hageboeck
hageboeck force-pushed the postInstallHeaderTest branch 2 times, most recently from b30fb35 to 7d19648 Compare September 3, 2026 09:36
@hageboeck hageboeck added the clean build Ask CI to do non-incremental build on PR label Sep 3, 2026
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.
Instead of globbing in inc/ and unconditionally installing all headers,
provide a mode where all headers which are supposed to be installed have
to be listed explicitly.
In this way, headers that correspond to disabled features can be left
out of modules and install set.

In the long run, these sets can be converted to CMake file sets, which will
simplify associating them to targets.
By explicitly listing the headers to be installed instead of globbing
for them, disabled features can be removed from the install set.
When curl or daos are off, the corresponding headers are broken.
Therefore, they should not be installed.
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 7d19648 to b768923 Compare September 4, 2026 07:06
@hageboeck
hageboeck force-pushed the postInstallHeaderTest branch from b768923 to 5faca22 Compare September 4, 2026 07:14
@hageboeck
hageboeck marked this pull request as ready for review September 4, 2026 07:19
@hageboeck
hageboeck requested a review from bellenot as a code owner September 4, 2026 07:19
After installing, check all headers for syntax errors. This detects
headers whose includes can't be resolved.
@hageboeck
hageboeck force-pushed the postInstallHeaderTest branch from 0e0d5f2 to f1c4435 Compare September 4, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants