Skip to content

Remove redundant header files in STM port #7024

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

Merged
merged 2 commits into from
Oct 12, 2022

Conversation

flom84
Copy link

@flom84 flom84 commented Oct 9, 2022

Hi everyone,

Working with the SMT32 ports, I have found a few header files being included that don't seem to have any role in the build. I made this change to remove them, and tested it on all the stm builds.

If you confirm that these includes are redundant, the change could be made for the other ports as well.

jepler
jepler previously approved these changes Oct 9, 2022
Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine if it comes up green on CI, it has a very low probability of creating any regressions. However, I do have one note for the future.

@dhalbert
Copy link
Collaborator

@tannewt has talked about https://include-what-you-use.org/, which automatically determines the proper header files to include. It's based on clang, not sure how/if we could use it.

@flom84
Copy link
Author

flom84 commented Oct 11, 2022

@dhalbert thanks for the tool suggestion. I was not aware of it. In my case I have used https://github.com/rizsotto/Bear for generating the compilation database for clang tooling. Ex: bear --append -- make BOARD=circuitplayground_express V=2 -j4
And then Gvim Editor + https://github.com/ycm-core/YouCompleteMe (clang tool support)....and with this I can see what headers can be removed...indeed it's manual work.

Copy link
Collaborator

@microdev1 microdev1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! @flom84, LGTM.

@microdev1 microdev1 merged commit ab22d5a into adafruit:main Oct 12, 2022
@flom84 flom84 deleted the stm-include-headers-fixes branch October 26, 2022 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants