-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
optimise includes in math #123
Conversation
This is my first foray into this project, but there are a few instances of commenting out the includes instead of fully removing them. If they can in fact be safely removed regardless of the target platform, then the lines should be removed to avoid cluttering up the code base. |
@pseyfert, good work! Could you rebase and remove the redundant lines instead of commenting them out? |
Can one of the admins verify this patch? |
|
@phsft-bot: build. |
@phsft-bot: build! |
1 similar comment
@phsft-bot: build! |
@phsft-bot build! |
@pseyfert, do you think you can optimise the rest of the includes in ROOT in a similar manner in a new PR? |
need to check. i didn't get iwyu running with cmake and haven't used ./configure since quite a while. |
It seems that there are two ways to use it within cmake: http://stackoverflow.com/questions/30951492/how-to-use-the-tool-include-what-you-use-together-with-cmake-to-detect-unused-he
Vassil
Msg sent from my phone. Please excuse my brevity.
… On Mar 10, 2017, at 17:21, pseyfert ***@***.***> wrote:
need to check. i didn't get iwyu running with cmake and haven't used ./configure since quite a while.
i had tried it back then for roofit and realised it caused problems in my own "third party" code if a class A has a method to return a pointer to an instance of class B, but A.h doesn't include B.h.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Merged, thanks! I'd be happy to review a PR, running IWYU on the rest of the ROOT codebase! |
cool, will notify you once i came around running it. |
@vgvassilev I put the output of a first run /afs/cern.ch/work/p/pseyfert/public/iwyu.log It's quite big (and i didn't even build all components) and also involves parts I don't dare to touch (llvm). I'll clean up my changes to the cmake files and factorise the suggestions a bit. |
Good progress. I do not understand why it says we should remove the We should ignore the fixes in llvm at first. Then we should ask the iwyu to order the suggested includes by generality (i.e. stl, libc go last). |
changes to cmake now available here: https://github.com/pseyfert/root/tree/IWYU .
and once i saw the first iwyu output (realising i put the parts together correctly), I didn't do an
|
Ok, looks very good. Can we implement this as a travis check. I don't expect people to run it locally. |
cleaning up a few includes in math/mathmore and math/physics.
NB: