Skip to content

[io] read versioned class from file even if in-memory-class is unversioned#18660

Open
ferdymercury wants to merge 1 commit intoroot-project:masterfrom
ferdymercury:unvers
Open

[io] read versioned class from file even if in-memory-class is unversioned#18660
ferdymercury wants to merge 1 commit intoroot-project:masterfrom
ferdymercury:unvers

Conversation

@ferdymercury
Copy link
Collaborator

@ferdymercury ferdymercury commented May 8, 2025

This Pull request:

Changes or fixes:

Fixes https://its.cern.ch/jira/browse/ROOT-5306

Reproducer:

root
.L /tmp/MySubClass.cxx+
TFile f("/tmp/mysub.root", "RECREATE");
MySubClass msc;
msc.id = 33;
f.WriteObjectAny(&msc, "MySubClass", "msc");
f.Close();
.q
root
.L /tmp/MySubClassUnv.cxx+
auto file = TFile::Open("/tmp/mysub.root", "READ");
auto msc = file->Get<MySubClass>("msc")
(msc->id == 33)
.q

with MySubClass.cxx

class MySubClass { public: int id; ClassDef(MySubClass, 3) };

and MySubClassUnv.cxx

class MySubClass { public: int id; };

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

@ferdymercury ferdymercury marked this pull request as ready for review May 8, 2025 09:51
@ferdymercury ferdymercury requested a review from pcanal as a code owner May 8, 2025 09:51
@ferdymercury ferdymercury requested a review from bellenot as a code owner May 8, 2025 11:34
@github-actions
Copy link

github-actions bot commented May 8, 2025

Test Results

    22 files      22 suites   3d 7h 3m 26s ⏱️
 3 828 tests  3 824 ✅ 1 💤 3 ❌
76 613 runs  76 601 ✅ 9 💤 3 ❌

For more details on these failures, see this check.

Results for commit 336f18d.

♻️ This comment has been updated with latest results.

@ferdymercury ferdymercury requested a review from dpiparo as a code owner May 8, 2025 21:03
@ferdymercury ferdymercury requested a review from pcanal May 9, 2025 06:37
@ferdymercury ferdymercury added this to the 6.38.00 milestone May 15, 2025
@ferdymercury ferdymercury requested a review from jblomer August 28, 2025 15:54
@ferdymercury
Copy link
Collaborator Author

@pcanal
gentle reminder to 'squash on merge' (if you approve).

Copy link
Member

@dpiparo dpiparo left a comment

Choose a reason for hiding this comment

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

Thanks for these changes. They look good to me.
@pcanal do you think we can merge?

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!

@pcanal
Copy link
Member

pcanal commented Mar 4, 2026

Closing and Reopening to rebase the PR and retest.

@pcanal pcanal closed this Mar 4, 2026
@pcanal pcanal reopened this Mar 4, 2026
@dpiparo
Copy link
Member

dpiparo commented Mar 6, 2026

@pcanal this is to be considered all green: the 3 tests failing on alma9 march native are due to a glitch in the website infra.

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.

3 participants