Skip to content

Conversation

@silverweed
Copy link
Contributor

This Pull request:

adds a new function to TGenericClassInfo to allow deferring the registration of a MemberStreamer during static initialization. Performs a similar function to TGenericClassInfo::AdoptStreamer et al. but for TMemberStreamers.

Reason

Currently it's impossible to register a MemberStreamer of a class during static initialization without invoking TClass::GetClass, which should never be done at library loading time, as it causes issues.

Specifically, ALICE was hit by this after adding a GetClass in a static initializer and as a result observed huge performance regressions due to Cling being initialized earlier than intended (which in turn causes modules to be registered too early).

cc @ktf

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

Test Results

    21 files      21 suites   3d 11h 8m 44s ⏱️
 3 781 tests  3 777 ✅ 0 💤 4 ❌
72 418 runs  72 414 ✅ 0 💤 4 ❌

For more details on these failures, see this check.

Results for commit 0ee83da.

♻️ This comment has been updated with latest results.

@silverweed silverweed force-pushed the genericclass_adoptmember branch from 8f74622 to c5e9f1d Compare December 17, 2025 07:35
@silverweed silverweed requested a review from pcanal December 17, 2025 07:35
Copy link
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Consider adding a test if practical.

@silverweed silverweed requested a review from bellenot as a code owner February 4, 2026 14:16
If the StreamerInfo is already compiled it will ignore a change in
member streamers, so we emit an error if one attempts to call
TClass::AdoptMemberStreamer in that situation.
This error propagates to TGenericClassInfo::AdoptMemberStreamer as well.
@silverweed silverweed force-pushed the genericclass_adoptmember branch from d48eec2 to 0ee83da Compare February 4, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants