-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[ntuple] Fix RClassField not resolving context-dependent typedefs #17783
base: master
Are you sure you want to change the base?
[ntuple] Fix RClassField not resolving context-dependent typedefs #17783
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Test Results 18 files 18 suites 4d 8h 24m 49s ⏱️ Results for commit a246042. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Philippe, we should verify that the fields (including class member fields) have the expected type names and aliases. Maybe this should go to tree/ntuple/v7/test/ntuple_type_name.cxx
though and we keep ntuple_types.cxx
about being able to write and read the data.
a9a95c1
to
8c72814
Compare
We are currently using GetFullTypeName (aka the unresolved type of the field) and relying on later type renormalization, but this will fail to lookup the proper type in RFieldBase::Create() when the type is a context-dependent type, like a templated typedef contained inside a class. With this commit, we instead use the already-resolved type (TDataMember::GetTrueTypeName()) to create the field and then assign the type alias manually to the FullTypeName
8c72814
to
a246042
Compare
This Pull request:
With #17637 we started using
TDataMember::GetFullTypeName()
for the type name of RClassField's subfields, relying on later type renormalization. However, this approach fails when the type in question cannot be looked up by TClass::GetClass because it's context dependent (e.g. a templated typedef inside a class).This PR goes back to use
TDataMember::GetTrueTypeName()
instead, and assigns the FullTypeName to the type alias of the created subfield. This allows handling cases of context-dependent typedefs, as we use the already-resolved type when creating the subfield.Checklist:
This PR fixes #17774