-
Notifications
You must be signed in to change notification settings - Fork 3k
Correctly include EventQueue.h #9801
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
There are two EventQueue.h in mbed-os codebase: events/EventQueue.h features/FEATURE_BLE/ble/pal/EventQueue.h By accident, `mbed compile` generates includes.txt with the correct order of include search paths. This is not the case for the CMake exporter: targets with FEATURE_BLE enables fail to compile with errors: mbed-os/features/cellular/framework/AT/ATHandler.h:99:60: error: 'events' has not been declared Update all places to always include either "events/EventQueue.h" or "ble/pal/EventQueue.h": to always find the correct header.
To reproduce, export to cmake any target with
typical C++ error:
|
I think it would be less error prone to have a unique name for the header: PalEventQueue.h (same as we have PalGap.h, PalGattClient.h). This is not a user facing header so will not break anyone's application. |
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.
Looks good to me
@paul-szczepanek-arm Can you send PR fixing the name ? |
@paul-szczepanek-arm, @0xc0170:
Technically, there is no such thing as non-user-facing header, especially in mbed flow when ALL directories with headers are added to header search paths. I believe the correct solution for possible header name collisions is to consistently include everything as "module_name/header_name.h", and only add directories with modules to search paths. This is already done for most platform headers, but not currently enforced by the resource scanning rules. |
@paul-szczepanek-arm Yes we can provide coherent naming for these headers. We need to discuss if we remove the Pal prefix on the header with it or add it to the headers without it. the inclusion pattern should be @vmedcy A header is considered not public if it is not part of the public API documentation. Of course technically you can include private headers in your application but that is a limitation of the tool not a desired behaviour. |
I dont, but @deepikabhavnani might or we test it. |
@vmedcy @paul-szczepanek-arm @pan- @deepikabhavnani @0xc0170 Do we need to take a quick look at this and determine if it needs to go to 5.12? |
Will get in CI when able, latest to 5.12.1 |
Ci scheduled |
Test run: FAILEDSummary: 1 of 14 test jobs failed Failed test jobs:
|
Info: This PR is good to go.
|
Restarting CI (7 days ago the last run) |
Aborted the job, need CI now for rc2 job asap, will restart later |
Test run: FAILEDSummary: 7 of 9 test jobs failed Failed test jobs:
|
restarting CI as CI resources currently available |
Test run: FAILEDSummary: 1 of 13 test jobs failed Failed test jobs:
|
There's duplication in BLE , I dont think this relates to this PR, will restart to confirm and check how this happened |
Correctly include EventQueue.h
Description
There are two EventQueue.h in mbed-os codebase:
events/EventQueue.h
features/FEATURE_BLE/ble/pal/EventQueue.h
By accident,
mbed compile
generates includes.txt with the correctorder of include search paths. This is not the case for the CMake
exporter: targets with FEATURE_BLE enables fail to compile with errors:
Update all places to always include either "events/EventQueue.h"
or "ble/pal/EventQueue.h": to always find the correct header.
Pull request type
Reviewers
Release Notes