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

[RF] Avoid using transient std::unique_ptr #15733

Merged

Conversation

guitargeek
Copy link
Contributor

Harmless change to circumvent errors like these when building RooFit standalone:

Error in <TProtoClass::FindDataMember>: data member with index 0 is not found in class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> >
Error in <CreateRealData>: Cannot find data member # 0 of class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> > for parent RooAddPdf!
Error in <TProtoClass::FindDataMember>: data member with index 1 is not found in class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> >
Error in <CreateRealData>: Cannot find data member # 1 of class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> > for parent RooAddPdf!
Error in <TProtoClass::FindDataMember>: data member with index 0 is not found in class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> >
Error in <CreateRealData>: Cannot find data member # 0 of class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> > for parent RooPolynomial!

@guitargeek guitargeek self-assigned this Jun 4, 2024
@guitargeek guitargeek requested a review from lmoneta as a code owner June 4, 2024 09:34
Copy link

github-actions bot commented Jun 4, 2024

Test Results

    13 files      13 suites   3d 5h 2m 16s ⏱️
 3 030 tests  3 030 ✅ 0 💤 0 ❌
33 869 runs  33 869 ✅ 0 💤 0 ❌

Results for commit ed22e9b.

♻️ This comment has been updated with latest results.

@vepadulano
Copy link
Member

Wait, this should have been fixed by #13900. If that's not the case, we need to understand why. FYI @pcanal .

@guitargeek
Copy link
Contributor Author

guitargeek commented Jun 4, 2024

From a practical point of view for RooFit, the fact that the problem is not understood should not block this PR to enter the next patch release, unless the underlying problem is fixed in the meantime.

I'll try to create an easy reproducer and open a GitHub issue!

@vepadulano
Copy link
Member

The original issue (which was "fixed" by also removing the transient unique_ptr because it was blocking the transition to C++17) is at #13361

I couldn't create a standalone reproducer back then, also we should probably reintroduce the transient unique_ptr in the RBrowserData class and see what happens.

All of this to say, I agree with you, it's outside of scope for this PR

@pcanal
Copy link
Member

pcanal commented Jun 4, 2024

Harmless change to circumvent errors like these when building RooFit standalone:

Can you remind me how to reproduce this (as you saw it, no need to reduce)?

@guitargeek
Copy link
Contributor Author

guitargeek commented Jun 4, 2024

You need to compile this code with the 3rd commit in the history reverted and run the tests (just like the CI does):
https://github.com/guitargeek/roofit/commits/main/

But you need a ROOT build without RooFit for that (roofit=OFF)

@pcanal
Copy link
Member

pcanal commented Jun 5, 2024

Thanks. I am able reproduce that error. I am investigating.

@guitargeek
Copy link
Contributor Author

guitargeek commented Jun 27, 2024

@vepadulano, @pcanal, this PR has already missed the 6.32.02 patch release. Can we merge it so at least this fix is sure to be in the next patch release? The investigation of the problem is independent of this PR I think.

@pcanal
Copy link
Member

pcanal commented Jun 27, 2024

This PR is a 'downgrade' is code simplicity that should not be necessary. However the underlying fix is not ready (and won't until August), so we could temporarily merge this if need be.

@guitargeek
Copy link
Contributor Author

Ok, thanks for the comment! Let's see when the next patch release will be scheduled

@guitargeek guitargeek added this to the 6.32.04 milestone Jul 20, 2024
Harmless change to circumvent errors like these when building RooFit
standalone:

```
Error in <TProtoClass::FindDataMember>: data member with index 0 is not found in class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> >
Error in <CreateRealData>: Cannot find data member # 0 of class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> > for parent RooAddPdf!
Error in <TProtoClass::FindDataMember>: data member with index 1 is not found in class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> >
Error in <CreateRealData>: Cannot find data member # 1 of class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> > for parent RooAddPdf!
Error in <TProtoClass::FindDataMember>: data member with index 0 is not found in class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> >
Error in <CreateRealData>: Cannot find data member # 0 of class tuple<TreeReadBuffer*,default_delete<TreeReadBuffer> > for parent RooPolynomial!
```
@guitargeek guitargeek force-pushed the transient_std_unique_ptr branch from 763d706 to ed22e9b Compare July 29, 2024 13:32
@guitargeek
Copy link
Contributor Author

The 6.32.04 release is planned in about 10 days, according to @dpiparo.

@pcanal, will there be a fix for the underlying issue by then, or should be just merge this PR?

@pcanal
Copy link
Member

pcanal commented Aug 2, 2024

Checking ...

@pcanal
Copy link
Member

pcanal commented Aug 7, 2024

@guitargeek Potential good news. I am currently unable to reproduce the problem with the master nor with the tip of v6-32-00-patches. Can you please verify? Thanks.

@pcanal
Copy link
Member

pcanal commented Aug 7, 2024

@guitargeek Nevermind. I just realized that I can still see the problem when running some of the test :(

pcanal added a commit to pcanal/root that referenced this pull request Aug 8, 2024
Do not complain about missing information about data members that directly or indirectly within
a transient members of the top level class in GetRealData.

This solves the underlying problem from root-project#15733
pcanal added a commit to pcanal/root that referenced this pull request Aug 8, 2024
Do not complain about missing information about data members that directly or indirectly within
a transient members of the top level class in GetRealData.

This solves the underlying problem from root-project#15733
@pcanal
Copy link
Member

pcanal commented Aug 8, 2024

#16202 should fix this problem. Can you please check?

@guitargeek
Copy link
Contributor Author

I see the CI in that PR is still red. Should I wait for the PR to be updated such that it's green before I test? Or does it make sense to test already now?

Thanks a lot already for fixing it 👍

@pcanal
Copy link
Member

pcanal commented Aug 9, 2024

It makes sense to test it now to know at the very least if my independent tests are sufficient or not.

@guitargeek
Copy link
Contributor Author

Perfect! It works!

pcanal added a commit to pcanal/root that referenced this pull request Aug 11, 2024
Do not complain about missing information about data members that directly or indirectly within
a transient members of the top level class in GetRealData.

This solves the underlying problem from root-project#15733
@guitargeek
Copy link
Contributor Author

Superseded by a PR that fixes the underlying problem:

@guitargeek guitargeek closed this Aug 12, 2024
@guitargeek guitargeek deleted the transient_std_unique_ptr branch August 12, 2024 11:53
pcanal added a commit to pcanal/root that referenced this pull request Aug 21, 2024
Do not complain about missing information about data members that directly or indirectly within
a transient members of the top level class in GetRealData.

This solves the underlying problem from root-project#15733
@guitargeek guitargeek restored the transient_std_unique_ptr branch September 14, 2024 15:48
@guitargeek guitargeek reopened this Sep 14, 2024
@guitargeek guitargeek modified the milestones: 6.32.04, 6.34.00 Sep 14, 2024
@guitargeek
Copy link
Contributor Author

Re-opening, because this should be merged in case #16202 doesn't get ready for the 6.34 release.

@dpiparo dpiparo self-requested a review October 1, 2024 19:33
@guitargeek guitargeek merged commit 8e76f2e into root-project:master Oct 1, 2024
28 of 35 checks passed
@guitargeek guitargeek deleted the transient_std_unique_ptr branch October 1, 2024 22:44
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.

4 participants