-
Notifications
You must be signed in to change notification settings - Fork 37.7k
refactor: add kernel/cs_main.h #26251
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
Conversation
Looks like this is just adding a bunch of bloat that should later-on be removed anyway. How is a one-line include different/better than a simple one-line |
It's probably neither much different or better, just one way of acheiving the same thing. The point is to remove unecessary/heavy includes, which aside from improving compilation time / # of units to rebuilt due to source changes, also enables cleanup like #26087. If we'd rather use
If it's going to be removed later on, having a single file/include to delete is at least somewhat convenient. Although similarly so to removing a number of |
7e2a682
to
a8eea0a
Compare
I don't see how this pull achieves any of that or would help there. You are adding the cs_main.h include to 40 files, all of which either have validation already included or had their |
a8eea0a
to
9e2e62f
Compare
Agree with the goal of cleaning up includes, and also agree neither |
Concept ACK. For files that need it, I think it makes sense to be able to include just And giving it a home in its own compilation unit means that we no longer have to pull in the arbitrary object where it resides just to get it linked. So I think this is a nice cleanup. |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
An |
IWYU can't even produce the correct includes for a single line of code like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
I was assuming silencing IWYU complaints was the only reason for adding for adding cs_main.h where validation.h was already included. |
9e2e62f
to
1d097f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK -- I think it's better to #include
things than re-declare them, and since we use cs_main
in places where we don't need all of validation, it makes sense to pull that out into a separate module.
@fanquake did you check if any EDIT: irrelevant after #26251 (comment) |
9776682
to
e0bdefa
Compare
e0bdefa
to
09a778e
Compare
09a778e
to
e0ca6e3
Compare
Co-authored-by: Anthony Towns <aj@erisian.com.au>
e0ca6e3
to
282019c
Compare
ACK 282019c |
One place to find / include
cs_main
.No more:
Ultimately, no more need to include
validation.h
(which also includes (heavy/boost filled)txmempool.h
) everywhere forcs_main
. See #26087 for another example of why that is useful.