Skip to content

[CI] Check that a second build has nothing to do - #23056

Draft
guitargeek wants to merge 3 commits into
root-project:masterfrom
guitargeek:ci-null-build-check
Draft

[CI] Check that a second build has nothing to do#23056
guitargeek wants to merge 3 commits into
root-project:masterfrom
guitargeek:ci-null-build-check

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

Building an already built tree twice in a row must be a no-op, apart from etc/gitinfo.txt which the gitinfotxt target rewrites on every build by design. When that is not the case, every incremental build pays for the targets that are needlessly redone plus everything depending on them.

Add a null build check that runs on all platforms right after the build: it fingerprints every file in the build tree, builds again, and reports what was written. Doing it this way rather than parsing build tool output keeps it working across Ninja, Makefiles and MSBuild alike.

The verdict is only acted on at the very end, after ctest, so that a spurious rebuild does not cost us the test results.

🤖 Done with the help of AI

@github-actions

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 21h 48m 5s ⏱️
 3 854 tests  3 849 ✅ 0 💤 5 ❌
78 522 runs  78 517 ✅ 0 💤 5 ❌

For more details on these failures, see this check.

Results for commit 3691cf4.

Building an already built tree twice in a row must be a no-op, apart from
etc/gitinfo.txt which the gitinfotxt target rewrites on every build by
design. When that is not the case, every incremental build pays for the
targets that are needlessly redone plus everything depending on them.

Add a null build check that runs on all platforms right after the build:
it fingerprints every file in the build tree, builds again, and reports
what was written. Doing it this way rather than parsing build tool output
keeps it working across Ninja, Makefiles and MSBuild alike.

The verdict is only acted on at the very end, after ctest, so that a
spurious rebuild does not cost us the test results.

🤖 Done with the help of AI
GetPartiallyDesugaredTypeImpl removes the elaborated type keyword
('typename', 'struct', ...) of its input type: the keyword is pure
syntax and must never end up in a normalized type name. Since the
LLVM 22 migration removed ElaboratedType, the keyword lives on the
type node itself, and desugaring can expose a *new* one that nothing
strips. With

    template <typename T> struct Container {
       typedef typename std::vector<T*> seq_type;
       seq_type m_sequential;
    };

the keyword sits on the TemplateSpecializationType that seq_type
resolves to, so the normalized name of m_sequential came out as
'typename std::vector<Track*>'. TStreamerInfo::BuildOld then fails to
match it against the 'vector<Track*>' stored in the file, sets the new
type to -2 and skips the element, i.e. the member is silently not read.

The leak became visible with 081af22, which attaches the
reconstructed prefix to the TemplateSpecializationType; TypePrinter
prints the keyword whenever it is not None.

Only TemplateSpecializationType is affected; struct/enum elaborated
typedefs already normalize correctly.

Fixes root-project#23055

🤖 Done with the help of AI
ROOT_STANDARD_LIBRARY_PACKAGE(... NO_SOURCES) provided the dummy source file
that add_library() needs as the output of a custom command that touches it.
All the packages of one directory share that output, and listing one custom
command output in several independent targets that build in parallel is not
supported; core/clingutils alone has 15 of them.

Ninja and Make happen to get away with it, but with MSBuild the touch runs
again on every build, so 14 of the 15 STL dictionaries were recompiled and
relinked every time, along with everything depending on them.

Write the file at configure time instead. Nothing touches it at build time
anymore, so it cannot go stale under the targets that compile it.

🤖 Done with the help of AI
@guitargeek
guitargeek force-pushed the ci-null-build-check branch from 3691cf4 to 8315dc9 Compare August 10, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant