Skip to content

[ntuple] improve type name renormalization #19323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jblomer
Copy link
Contributor

@jblomer jblomer commented Jul 9, 2025

Add different code path for renormalizing a demangled typeid name. Such type names come from RField<T>::TypeName(). In this case, the compiler has done already most of the normalization work and we don't need to go through ROOT meta. More importantly, the result does not depend on the state of ROOT Meta, e.g. the set of loaded libraries.

There are some parts ROOT meta does that we need to repeat for this case, e.g. dropping optional template arguments of stdlib containers.

Secondly, this PR clarifies and fixes normalization of C style fixed-size arrays.

Together, this makes the new patch version 1.0.0.2 of the spec and the anchor.

This PR fixes #19116

@jblomer jblomer requested review from hahnjo and vepadulano July 9, 2025 20:50
@jblomer jblomer self-assigned this Jul 9, 2025
@jblomer jblomer force-pushed the ntuple-type-normalization branch from e3747e0 to 3153961 Compare July 9, 2025 20:53
@jblomer jblomer requested review from pcanal, silverweed and enirolf July 9, 2025 21:20
Copy link

github-actions bot commented Jul 9, 2025

Test Results

    21 files      21 suites   3d 11h 37m 56s ⏱️
 3 203 tests  3 192 ✅ 0 💤 11 ❌
65 588 runs  65 554 ✅ 0 💤 34 ❌

For more details on these failures, see this check.

Results for commit 26d39e5.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@silverweed silverweed left a comment

Choose a reason for hiding this comment

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

Small comment + a warning from the compiler

Copy link
Member

@hahnjo hahnjo left a comment

Choose a reason for hiding this comment

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

The approach looks good to me. We need to add handling of the __1 inline namespace of libc++, and find a solution for the ATLAS DataVector with suppressed template arguments.

@ferdymercury
Copy link
Collaborator

Maybe related: https://its.cern.ch/jira/browse/ROOT-5862

@jblomer jblomer force-pushed the ntuple-type-normalization branch from 3153961 to b4d5353 Compare July 14, 2025 09:25
@jblomer jblomer requested a review from dpiparo as a code owner July 14, 2025 09:25
@jblomer jblomer force-pushed the ntuple-type-normalization branch 3 times, most recently from c6e2dfa to 3c71f5e Compare July 14, 2025 14:45
jblomer added 7 commits July 15, 2025 11:43
Add clarifications on type name normalization wrt.
- type name resolution of stdlib types
- treatment of C style fixed-size arrays.

Both points follow implicitly from the specification of the supported
C++ types but it is useful to add them explicitly to the type name
normalization rules. Since in the process also bugs were discovered
related to fixed-size arrays, we give this specification a bump in the
patch version number.
Add different code path for renormalizing a demangled typeid name. Such
type names come from RField<T>::TypeName(). In this case, the compiler
has done already most of the normalization work and we don't need to go
through ROOT meta. There are some parts ROOT meta does that we need to
repeat for this case, e.g. dropping optional template arguments of
stdlib containers.
@jblomer jblomer force-pushed the ntuple-type-normalization branch from 29e2966 to 26d39e5 Compare July 15, 2025 09:43
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.

Re-evaluate the implementation of RField<T>::TypeName
4 participants