-
Notifications
You must be signed in to change notification settings - Fork 3k
Deprecate string-based APIs in IPCore #11914
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
Deprecate string-based APIs in IPCore #11914
Conversation
@0xc0170 , This PR and #11653 depend on each other, because they both need the wiced binaries rebuilt. Whichever of them gets merged second will have to rebuild the binaries again on top of the other (unless we have a binary merge tool?). I submitted this PR anyway and would be grateful if you can run CI after review, because I might have missed some required modifications. I tried building all |
@AnttiKauppila , @SeppoTakalo , initially I modified the type of internal addresses in |
639b58f
to
573c58e
Compare
@michalpasztamobica, thank you for your changes. |
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.
Overview looks good, someone needs to do a proper review.
CI started |
Test run: FAILEDSummary: 1 of 4 test jobs failed Failed test jobs:
|
573c58e
to
74aecec
Compare
Just pushed a fix to the CI's failure. The problem was that I did not always return value in a non-void function, but it only threw an error in a particular configuration, which I haven't tested. |
74aecec
to
ef9dba5
Compare
I now forced-pushed another tiny overlooked bug: in |
Test run: FAILEDSummary: 1 of 12 test jobs failed Failed test jobs:
|
MBED_DEPRECATE macros is added to string-based APIs. New, non-string-based APIs are added in their place. Wiced binaries rebuilt Any existing stubs or mocks are adjusted to compile and run with the newly added non-string based functions.
ef9dba5
to
fd5b4b9
Compare
CI restarted |
This time Jenkins found an issue in Nanostack interface. We don't have unittests for LWIP and Nanostack Interface wrapper classes (perhaps we should?) . When adding a new API I also switched the wrapper class to make use of it. When doing this I forgot, that we now return NSAPI_ERROR_OK, which evaluates to 0, so this should fix it:
Thanks for restarting CI, @0xc0170 . |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
String-based APIs were marked deprecated and replaced by `SocketAddress`-based APIs in ARMmbed/mbed-os#11914. This PR switches the example to the new API and removes the deprecated one. It will only compile with the PR mentioned above or simply with `mbed-os-5.15` or later (when the new `SocketAddress`-based API is available).
Description (required)
MBED_DEPRECATED
macros are added to string-based APIs.New, non-string-based APIs are added in their place.
Wiced binaries rebuilt.
Any existing stubs or mocks are adjusted to compile and run with the newly added non-string based functions.
Summary of change (What the change is for and why)
Quoting @SeppoTakalo :
The problem is being addressed by marking all string-based API functions with
MBED_DEPRECATED
macro and adding a new API, that usesSocketAddress
instead. This is NOT a breaking change. This PR is to give everyone using deprecated APIs time to adjust. The breaking change will come withmbed-os-6
.Documentation (Details of any document updates required)
The documentation for all the modified functions has been adjusted.
Pull request type (required)
Test results (required)
Reviewers (optional)
@SeppoTakalo
@AnttiKauppila
Release Notes (required for feature/major PRs)
This is NOT a breaking changes, but it is worth notifying all API users, that the string-based APIs are going to be removed soon.
Summary of changes
The following API functions are being deprecated and will be removed in
mbed-os-6
:Impact of changes
Code gives
deprecated
warnings whenever old API is used.Migration actions required
Switch to the new
SocketAddress
based API.