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

Improve header file encapsulation #16327

Open
vgvassilev opened this issue Aug 29, 2024 · 5 comments
Open

Improve header file encapsulation #16327

vgvassilev opened this issue Aug 29, 2024 · 5 comments
Assignees

Comments

@vgvassilev
Copy link
Member

vgvassilev commented Aug 29, 2024

Explain what you would like to see improved and how.

We should move all headers from $ROOTSYS/include to $ROOTSYS/ROOT/{component} and we should automatically generate wrapping headers that #include the relevant ROOT/ header with a deprecation warning.
Eg.

mv ROOTSYS/include/TLish.h ROOTSYS/include/ROOT/core/TLish.h
cat ROOTSYS/include/TLish.h
#warn "This forwarding header will go away in X please include \"ROOT/Base/TLish.h\" "
#include "ROOT/core/TLish.h"

The trampoline header file can be generated by our build system by adding a -DROOT_COMPATIBILITY switch that's on by default for few releases and then off.

ROOT version

master

Installation method

N/A

Operating system

N/A

Additional context

No response

@dpiparo
Copy link
Member

dpiparo commented Aug 29, 2024

Hi @vgvassilev could you please perhaps share a bit of the motivation you see behind this proposal, in other words the benefits for the project?

@vgvassilev
Copy link
Member Author

Pretty much the same motivation of having new headers in ROOTSYS/include/ROOT. The upshot is that the third party codebase will become clearer of that TList.h is a ROOT thing; and more importantly we will define away a class of problems we have when installing ROOT. Right now on some systems we install everything in /usr/include, which is not a good practice unless one is libc.

@vgvassilev
Copy link
Member Author

I remember @linev has made some progress in the past with this but then we were blocked by something wrt to modules that I do not remember...

@linev
Copy link
Member

linev commented Sep 12, 2024

Some time ago we adjust cmake files so that when building ROOT libraries we using headers from source directories and not headers from $ROOTSYS/include. This makes dependencies between ROOT components more clear.

I just checked $ROOTSYS/include - there are 1476 files. And going this way we will double number of files.

@vgvassilev
Copy link
Member Author

Yes, that is correct but only doubling them in count and during the deprecation phase.

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

No branches or pull requests

3 participants