-
Notifications
You must be signed in to change notification settings - Fork 167
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
refactor: use absolute include paths #1509
refactor: use absolute include paths #1509
Conversation
/milestone 0.15.0 |
This is amazing @therealbobo . +1 on my end, this is quite a big leap towards making the libs true maintainable libraries. |
562499a
to
2b51b45
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.
Hey folks! Unfortunately I'm on leave and don't have the time to do a full review of the PR. Skimming through it, it looks good, just have a couple questions on a few changes that seem unnecessary from my perspective that could also make it harder on adopters to customize things.
0690aca
to
ecc7052
Compare
9a8360c
to
52bf80f
Compare
52bf80f
to
0b88b93
Compare
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
0b88b93
to
3da9af9
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.
/approve
LGTM label has been added. Git tree hash: 552dba48d4c37be9e3ba9999b4d2febae86fa3da
|
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, incertum, therealbobo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
/kind design
/kind feature
Any specific area of the project related to this PR?
/area libscap
/area libpman
/area libsinsp
/area tests
Does this PR require a change in the driver versions?
What this PR does / why we need it:
This PR proposes to enhance the maintainability of the
libs
components by updating the include paths forlibsinsp
,libscap
, anddriver
. The motivation behind this proposal is to improve readability of the code and provide a more explicit and organized structure for including header files.The proposed patch brings:
Clarity of Ownership:
Using a more verbose include path ensures clear identification of the owner of each header file. This helps in understanding the origin and purpose of included headers at a glance avoids any possible ambiguity (e.g.
utils.h
from libsinsp orutils.h
from libscap)Streamlined CMake Configuration:
The proposed include paths will align with a more streamlined CMake configuration. Only a minimal set of directory will be included: the LIBS_DIR (
/userspace
), the driver directory (/driver
), and some dynamically generated directories (such as${PROJECT_BINARY_DIRECTORY}/driver/src/
where the generateddriver_config.h
is placed). This minimizes the risk of including unnecessary or conflicting headers. Furthermore, given that the proposed change will touch the cmake setup, probably could be worth adopt a more modern approach replacing the globalinclude_directories
with the more granulartarget_include_directories
approach.Specifically, I propose transitioning from the current convention:
to a more explicit format:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
I understand this can be disruptive for some of the adopters of the Falco libs, so this PR acts as a POC and is totally open to feedback and opinions. Overall, the drive for this is to make the libs a more long-sustainable and high-quality codebase.
To illustrate the viability and benefits of the proposed change, I have implemented a patch in my branch of falco. Please find the link to the branch below:
Does this PR introduce a user-facing change?: