Skip to content

Remove deprecated Callback methods #11880

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

Merged
merged 1 commit into from
Dec 3, 2019

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented Nov 18, 2019

Description (required)

Deprecated methods in Callback removed.

Summary of change (What the change is for and why)

Removing obsolete forms that were deprecated in Mbed OS 5.1 and 5.4. Reduce code size, speed up compilation slightly.

Documentation (Details of any document updates required)

None.


Pull request type (required)

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[X] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results (required)

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Release Notes (required for feature/major PRs)

Summary of changes

Deprecated methods in Callback removed.

Impact of changes

Some code that was generating deprecation warnings will no longer compile at all.

Migration actions required
  • Replace construction using Callback(arg, func) with the reversed Callback(func, arg)
  • Replace use of attach with simple assignment, such as callback = func; or callback = { func, arg };

@ciarmcom ciarmcom requested review from a team November 18, 2019 12:00
@ciarmcom
Copy link
Member

@kjbracey-arm, thank you for your changes.
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

@evedon
Copy link
Contributor

evedon commented Nov 18, 2019

The removal of deprecated API is planned for Mbed 6. Are we already taking PRs for that release?

Copy link
Contributor

@evedon evedon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Less code: great !

@0xc0170 0xc0170 added the release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0 label Nov 19, 2019
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 19, 2019

The removal of deprecated API is planned for Mbed 6. Are we already taking PRs for that release?

Soon, once we have 5.15rc1.

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we change the:

Migration actions required
Replace removed calls with equivalents shown in previous deprecation warnings since Mbed OS 5.4.

to point user to the right calls with links to up to date docs?

@kjbracey
Copy link
Contributor Author

Updated - missed one deprecated freestanding Callback-maker function.

@kjbracey
Copy link
Contributor Author

point user to the right calls

Done - not sure about the docs link though.

This highlighted that one of the 5.4 deprecations was actually bogus at the time: you couldn't replace attach(func, arg) with = before C++11; it only worked to replace attach(func). But since C++11, you can do cb = { func, arg };.

@kjbracey
Copy link
Contributor Author

kjbracey commented Nov 20, 2019

I'll be doing a callback docs review alongside the next PR, which makes more significant changes, including the "trivial mode".

I'm just feeding this one through first cos it's easy and quick to review.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 21, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Nov 21, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-IAR
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 21, 2019

Failures are related, please review

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 21, 2019

CI restarted

@mbed-ci
Copy link

mbed-ci commented Nov 21, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 22, 2019

Failures might be related, please review (I restarted the test to make sure they are there).

@kjbracey
Copy link
Contributor Author

kjbracey commented Dec 2, 2019

Don't see anything related in the CI, I think some platform may have been having a glitch on the master I was on. Rebased.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 2, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 2, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 3
Build artifacts

@0xc0170 0xc0170 removed the needs: CI label Dec 3, 2019
@0xc0170 0xc0170 merged commit 25ca5d2 into ARMmbed:master Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING-CHANGE release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants