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

Add .inc as a header file type. #9715

Merged
merged 1 commit into from Feb 15, 2019

Conversation

Projects
None yet
6 participants
@bridadan
Copy link
Contributor

bridadan commented Feb 14, 2019

Description

This was brought up by a thread on one of the TF-M prs. They are integrating an existing project into Mbed OS, and the existing project uses .inc files for some generated headers.

Currently, if you were to add a directory that only contained .inc files, this file would not be passed as an include path to the compiler. This ensures that .inc files are also considered header files.

Their build just so happens to work because the .inc files are generated in a directory that also contains a .h file. So the directory is marked as an include path.

I think this qualifies as a "fix" but let me know if I should change it.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@theotherjimmy

Add .inc as a header file type.
Currently, if you were to add a directory that only contained .inc
files, this file would not be passed as an include path to the compiler.
This ensures that .inc files are also considered header files.
@cmonr

This comment has been minimized.

Copy link
Contributor

cmonr commented Feb 14, 2019

It's a fix and it's fine, but do we want to support this as a valid header file type?

@cmonr

This comment has been minimized.

Copy link
Contributor

cmonr commented Feb 14, 2019

#9653 (comment)

Ah, that would be why. Poop.

@0xc0170
Copy link
Member

0xc0170 left a comment

I initially approved but rethink this

Do we want to support .inc , is this valid extension and not just "one project has it, we add it" ? When should I choose .h/hh/hpp or inc ? I find .inc to have special meaning , some projects do it that way.

If this approved, do we have this documented ? extensions supported and why inc is in there (what should be in the file, is it regular header file, is it special like only templates, or even some code file) .

TF-M actually generated these files according to their secure partitions manifests.

Probably this will be the description for having .inc supported.

@mikisch81

This comment has been minimized.

Copy link
Contributor

mikisch81 commented Feb 14, 2019

@0xc0170 than what do you suggest? patching an external imported code and replace all includes of .inc files to .h? Raising a bug to TF-M to replace their extension? How will you explain the reason for it?

From a short googling I can see that it is a valid extention for headers:
https://fileinfo.com/extension/inc.

@0xc0170

This comment has been minimized.

Copy link
Member

0xc0170 commented Feb 14, 2019

I just want to have this documented if we support it - "what extensions we support" that is it. Not repatching external code as .inc is valid extension.

@mikisch81

This comment has been minimized.

Copy link
Contributor

mikisch81 commented Feb 14, 2019

Where should it be documented?

@0xc0170

This comment has been minimized.

@bridadan

This comment has been minimized.

Copy link
Contributor Author

bridadan commented Feb 14, 2019

Hi @0xc0170, I wasn't aware of that doc, I'll add it to the list

@bridadan

This comment has been minimized.

Copy link
Contributor Author

bridadan commented Feb 14, 2019

Hi @0xc0170, I've read that .inc files are sometimes used to differentiate written .h files and generated .inc files. @mikisch81 can confirm but I believe these .inc files are generated in this case.

I've also added a corresponding doc update, thanks again for the prod: ARMmbed/mbed-os-5-docs#952

@cmonr

cmonr approved these changes Feb 14, 2019

@cmonr cmonr added needs: CI and removed needs: review labels Feb 14, 2019

@cmonr

This comment has been minimized.

Copy link
Contributor

cmonr commented Feb 14, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Feb 14, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@cmonr cmonr added ready for merge and removed needs: CI labels Feb 15, 2019

@cmonr cmonr merged commit 9e6c723 into ARMmbed:master Feb 15, 2019

27 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9067 cycles (-1217 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@cmonr cmonr removed the ready for merge label Feb 15, 2019

@0xc0170 0xc0170 referenced this pull request Feb 15, 2019

Merged

BLE API devirtualization #9727

0 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.