Skip to content

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

Merged
pcanal merged 1 commit intoroot-project:masterfrom
ferdymercury:unvers
Mar 6, 2026
Merged

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

Conversation

@ferdymercury
Copy link
Copy Markdown
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
Comment thread io/io/test/MySubClassUnv.cxx Outdated
Comment thread io/io/test/TFileTests.cxx Outdated
Comment thread io/io/test/TFileTests.cxx Outdated
Comment thread io/io/test/TFileTests.cxx Outdated
@ferdymercury ferdymercury requested a review from bellenot as a code owner May 8, 2025 11:34
Comment thread io/io/test/CMakeLists.txt Outdated
@github-actions
Copy link
Copy Markdown

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
Comment thread io/io/src/TBufferFile.cxx
Comment thread io/io/src/TBufferFile.cxx Outdated
Comment thread io/io/src/TBufferFile.cxx Outdated
Comment thread roottest/root/io/evolution/versions/execROOT5306.cxx Outdated
@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
Copy Markdown
Collaborator Author

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@pcanal pcanal merged commit 5d902d8 into root-project:master Mar 6, 2026
100 of 105 checks passed
@ferdymercury ferdymercury deleted the unvers branch March 6, 2026 21:04
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