refactor(bt): Refactor BT Classic and BLE#12564
Conversation
👋 Hello lucasssvaz, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
169b47a to
37934c4
Compare
a5bdf45 to
84bbebe
Compare
Test Results 108 files 108 suites 42m 48s ⏱️ For more details on these failures, see this check. Results for commit 1b0545b. ♻️ This comment has been updated with latest results. |
3af5158 to
027a607
Compare
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
027a607 to
1b0545b
Compare
This is a potential problem, considering the size of this PR. @lucasssvaz - is it possible to break this PR into smaller changes and submit one at a time, in order to allow CoPilot to review and also make it better for us for reviewing? |
SuGlider
left a comment
There was a problem hiding this comment.
@lucasssvaz - Please consider splitting this PR into many smaller target-centric changes.
|
@SuGlider The BLE changes are all dependent on each other as it fully reworks the classes structures. The most I can do is to separate the BT Classic changes, tests and documentation but this won't put the number of lines under 20k. For this PR we won't be able to rely on copilot. |
Description of Change
This PR is a large-scale architectural overhaul of the BLE and BluetoothSerial libraries. The goal is to cleanly separate stack-specific implementation details behind a unified public API, remove legacy utility bloat, introduce fail-closed validation, and substantially expand test coverage.
The library internals have been reorganized under libraries/BLE/src/impl/ using the PIMPL pattern. Public headers are now stack-agnostic; all Bluedroid- and NimBLE-specific code lives under impl/bluedroid/ and impl/nimble/ respectively, dispatched via backend headers (BLEAdvertisingBackend.h, BLECharacteristicBackend.h, etc.).
Note
This PR does not represent the final version of the refactor. Many optimizations and changes are still pending. Feedback is appreciated.
To Do:
#9878
Test Scenarios
Tested locally. Both validation tests pass consistently.