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

io: in UpdateFromRule properly handle case of std::string and alias without dictionary #17604

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

Conversation

pcanal
Copy link
Member

@pcanal pcanal commented Feb 4, 2025

This fixes the issue seen in cms-sw/cmsdist#9643 (comment)
and is the companion PR of root-project/roottest#1256

Copy link

github-actions bot commented Feb 4, 2025

Test Results

    18 files      18 suites   4d 9h 13m 37s ⏱️
 2 690 tests  2 688 ✅ 0 💤 2 ❌
46 722 runs  46 720 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit a2647e1.

♻️ This comment has been updated with latest results.

It can be read while being updated by another thread.
This fixes part (b) of the issue seen at:
   cms-sw/cmsdist#9643 (comment)

The issue was due to the source type name not being known at run-time
because the type name was an alias which has not dictionary request
and thus was not known at the execution the header files have not been loaded
(and this is indeed the intent as we strive to run I/O without
loading headers)
@pcanal pcanal changed the title io: in UpdateFromRule properly handle case of std::string io: in UpdateFromRule properly handle case of std::string and alias without dictionary Feb 5, 2025
@hahnjo
Copy link
Member

hahnjo commented Feb 6, 2025

Please note that roottest-root-io-evolution-make is red on all platforms:

Running test in ./evolution/rules
--- root/io/evolution/rules/execSourceTypes.ref	2025-02-05 07:14:49.266205227 +0000
+++ root/io/evolution/rules/execSourceTypes.clog	2025-02-05 07:39:31.303710009 +0000
@@ -4,10 +4,10 @@
    1.5  2.6  3.7  
 Error in <TStreamerInfo::InsertArtificialElements>: For class Old in StreamerInfo -1 a rule has conflicting type for the source "double fSingle",
    The TStreamerElement has memory type 5 (needed 8) :
-   type=read sourceClass="Old" targetClass="New" version="[1-]" source="double fSingle" target="fDouble" code="{ std::cout << "ERROR: the rule for fDouble should not be run
+   type=read sourceClass="Old" targetClass="New" version="[1-]" source="double fSingle; " target="fDouble" code="{ std::cout << "ERROR: the rule for fDouble should not be run
 "; fDouble = onfile.fSingle * 3; }" 
 Warning in <TStreamerInfo::InsertArtificialElements>: For class Old in StreamerInfo -1 is missing the source data member `fArrayNew` when trying to apply the rule:
-   type=read sourceClass="Old" targetClass="New" version="[1-]" source="A fArrayNew[3]" target="fArrayNew" code="{ examine_array<A,3>(onfile.fArrayNew); for(size_t i = 0; i < 3; ++i) fArrayNew[i].f = onfile.fArrayNew[i].f; }" 
+   type=read sourceClass="Old" targetClass="New" version="[1-]" source="A fArrayNew[3]; " target="fArrayNew" code="{ examine_array<A,3>(onfile.fArrayNew); for(size_t i = 0; i < 3; ++i) fArrayNew[i].f = onfile.fArrayNew[i].f; }" 
 The A value is: 1.2
 The B value is: 5.27183e-315
 The B value is: 1.3
rm execCheckRuleRegistration.clog execSourceTypes.clog execAddRemoveStreamerInfo.log
Tests in ./evolution/rules ......................................... FAIL
gmake[1]: Leaving directory '/github/home/ROOT-CI/roottest/root/io/evolution'

-- END TEST OUTPUT --
-- BEGIN TEST ERROR --
--- Using ROOT from /github/home/ROOT-CI/build
Info in <ACLiC>: unmodified script has already been compiled and loaded
gmake[2]: *** [/github/home/ROOT-CI/roottest//scripts/Rules.mk:759: execSourceTypes.success] Error 1
gmake[1]: *** [/github/home/ROOT-CI/roottest//scripts/Rules.mk:263: rules.test] Error 1
gmake: *** [/github/home/ROOT-CI/roottest//scripts/Rules.mk:299: cleantest] Error 2

-- END TEST ERROR --

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants