Skip to content
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

rootcling --genreflex ignores <field... transient="true"/> in selection XML #13543

Closed
1 task done
greenc-FNAL opened this issue Aug 25, 2023 · 6 comments
Closed
1 task done

Comments

@greenc-FNAL
Copy link
Collaborator

Check duplicate issues.

  • Checked for duplicates

Description

After following advice to transition from genreflex to rootcling --genreflex, we discovered that IO dictionaries generated for classes with transient (non-persistent) data members actually included stream information for those data members, in contrast both with the behavior of genreflex and our desire.

Reproducer

  1. Download, unpack and cd into the top level directory of rootcling-genreflex-transient-bug.tgz
  2. ./makeit good
  3. ./makeit

The output of the final ROOT -b command should be the same down to the checksum reported if the problem were not present.

ROOT version

ROOT 6.28/04@30598a8430

Installation method

UPS

Operating system

SL7

Additional context

Compiled with GCC 13.1.0/C++20.

May be related to the (insufficiently detailed) #13361.

@greenc-FNAL
Copy link
Collaborator Author

Bug is reproduced on 4f0450b.

@pcanal
Copy link
Member

pcanal commented Aug 28, 2023

The problem is solved by passing the option --reflex to rootcling.

@pcanal
Copy link
Member

pcanal commented Aug 28, 2023

@vgvassilev It is a bit surprising that rootlcing --reflex ... selection.xml works but rootcling ... selection.xml partially works but silently fails. The current code will parse and use the selection.xml but a few internal part (of the selection.xml handling) are disabled without the --reflex. See rootcling_impl.cxx:406 for example.

@vgvassilev
Copy link
Member

@vgvassilev It is a bit surprising that rootlcing --reflex ... selection.xml works but rootcling ... selection.xml partially works but silently fails. The current code will parse and use the selection.xml but a few internal part (of the selection.xml handling) are disabled without the --reflex. See rootcling_impl.cxx:406 for example.

Ah, yes, that makes sense. We have seen that on several occasions actually and that’s why we added this flag. Do you want to turn that logic on when we see selection.xml file? Is there a use case where we would want rootcling only behavior and still pass a selection.xml file?

@pcanal
Copy link
Member

pcanal commented Aug 30, 2023

Is there a use case where we would want rootcling only behavior and still pass a selection.xml file?

So far I don't see it. Worst the behavior as-is is very surprising because part of the selection.xml is used (the part selection classes) and the other is ignored. (I suppose that if this behavior is useful it should be opt-in (eg --ignore-xml-attibutres-but-keep-the-selection rather than the default).

@greenc-FNAL
Copy link
Collaborator Author

I can confirm that replacing --genreflex with --reflex resolves my immediate issue. I would be in favor of removing the option in favor of activating the same behavior upon the presence of selection XML, however.

dpiparo added a commit to dpiparo/root that referenced this issue Oct 19, 2023
These changes allow the user to generate a dictionary with rootcling
and selecting classes with a selection XML file, the selection file
format of genreflex, instead of a traditional LinkDef file.

Fixes root-project#13543
dpiparo added a commit to dpiparo/root that referenced this issue Oct 20, 2023
These changes allow the user to generate a dictionary with rootcling
and selecting classes with a selection XML file, the selection file
format of genreflex, instead of a traditional LinkDef file.

Fixes root-project#13543
Axel-Naumann pushed a commit that referenced this issue Oct 28, 2023
These changes allow the user to generate a dictionary with rootcling
and selecting classes with a selection XML file, the selection file
format of genreflex, instead of a traditional LinkDef file.

Fixes #13543
@Axel-Naumann Axel-Naumann added this to Issues in Fixed in 6.30/00 via automation Oct 28, 2023
maksgraczyk pushed a commit to maksgraczyk/root that referenced this issue Jan 12, 2024
These changes allow the user to generate a dictionary with rootcling
and selecting classes with a selection XML file, the selection file
format of genreflex, instead of a traditional LinkDef file.

Fixes root-project#13543
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

4 participants