-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Callback: Trivial default #12761
Callback: Trivial default #12761
Conversation
Turn off `callback.non-trivial` by default to save ROM space.
@kjbracey-arm, thank you for your changes. |
This change will break the filesystem example, from previous testing of #12036, so I've just created a PR there to deal with it: ARMmbed/mbed-os-example-filesystem#115 |
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.
Reading docs helped to understand this one.
The failure in filesystem suggests a point of documentation update - the That
in one go, and that's what filesystem example uses. The That uses RAM in the event queue to store the All of that is a bit heavy though. This is another approach:
That uses a lambda to do the work. Pros and cons: Event version:
Lambda version:
Ah, but we can also use
|
Ah, except you can't just pass a
The point about trivial copy of the Apparently the trivial-copyability of Not sure what the current state of our tools is. We could reinstate the local implementation of |
Alternative fix posted to filesystem: ARMmbed/mbed-os-example-filesystem#116 |
I run initial CI |
Test run: FAILEDSummary: 2 of 3 test jobs failed Failed test jobs:
|
Failure is the expected one until filesystem example is updated |
PR ARMmbed/mbed-os-example-filesystem#116 was merged, restarting CI |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
@ARMmbed/mbed-os-core @bulislaw Please review |
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.
LGTM
Hi
|
Well, that's potentially expected, depending on the app, and what you're doing. You may have to turn that option on for your app, as per description. Unless it's IAR-specific, and works in other toolchains? Or you're hitting it with something in-tree, and not using |
Seems there are 3 impacted tests: |
@jeromecoutant Can you create an issue , and we take it from there? Thanks |
Summary of changes
Turn off
callback.non-trivial
by default to save ROM space.Follow-up to #12036. Will need at least one example changed to turn the option back on.
Impact of changes
Callback
with a non-trivial functor, they will get a compilation error directing them to turn onplatform.callback-nontrivial
.Migration actions required
"platform.callback-nontrivial": true
to yourmbed_app.json
if a build error indicates that it is required - or change your code to only use trivial functors inCallback
.Documentation
ARMmbed/mbed-os-5-docs#1185
Pull request type
Test results
Reviewers