Repository navigation
Conversation
Test Results 22 files 22 suites 3d 9h 50m 21s ⏱️ For more details on these failures, see this check. Results for commit 0db00f6. ♻️ This comment has been updated with latest results. |
When checking the installed headers if they work standalone, a circular header inclusion lead to syntax errors. To solve this: - Minimise inclusions in xRooFit.h - Move them into the .cxx where necessary. - Add required includes to XRooFit.h
It wasn't there before, but this seems to make it complete.
c3e8a03 to
0db00f6
Compare
|
@will-cern could you have a look? |
|
I'll need to test these changes in the main xRooFit repo @ https://gitlab.cern.ch/will/xroofit, as that is where xRooFit should ultimately be copied from for the version that ships with root. |
|
Ok I've had a look at this now. On first impression I am struggling to understand how the circular dependency emerges, as there are include guards in place. As far as I can tell, the first include of The intended "global" header that should be the only one someone needs to include, would be the Can you give me a way to reproduce the "standalone" case? Sorry for all this, its just xRooFit's header guards are quite complicated so that we can support all the ways it gets used (from ROOT's build, built on top of ROOT, linked against in compiled code, in cling macros, etc...) |
|
Hello @will-cern, thanks for having a look!
Maybe my attempt at explaining it most likely wasn't fully correct / complete. There is a new attempt below. 🙂
Interesting, I didn't know that
Of course! The failure in the CI is produced as follows:
This results in: You see that the declaration of |
Thanks for the reproducer! I finally had time this morning to give it a try and can confirm that the issue is indeed if someone tried to do just |
|
Succeeded by #23809. Thanks @hageboeck and @will-cern ! |
Note: Contains commits from #23387. It was simply more convenient to leave them here, because rebasing on master would create a merge conflict once #23387 gets merged. Only the last three need to be reviewed.Now to what happened in xRooFit:
When checking the installed headers if they work standalone, a circular
header inclusion lead to syntax errors. It's because after a few inclusions, xRooFit.h gets included again in xRooHypoSpace which wants to include xRooFit again.
To solve this:
LLM disclosure: Asked an LLM to propose the required includes. Commits and tests done the classic way.
Up for discussion
When making XRooFit.h a "complete" umbrella header, one could also include
xRooBrowser.h. It's not really required, but it would include all headers at once. That's why there is the last commit that performs this inclusion, but we can remove it if it's considered unnecessary.