Skip to content

sys/phydat: Remove deprecated print function#20529

Merged
maribu merged 1 commit intoRIOT-OS:masterfrom
Teufelchen1:deprecate/phydat_str
Apr 4, 2024
Merged

sys/phydat: Remove deprecated print function#20529
maribu merged 1 commit intoRIOT-OS:masterfrom
Teufelchen1:deprecate/phydat_str

Conversation

@Teufelchen1
Copy link
Contributor

Contribution description

Hej 🫏

This removes the deprecated functions phydat_unit_to_str and phydat_unit_to_str_verbose.
In addition, I introduce a new unit test for the phydat_unit_write function.

Testing procedure

There are two tests here but I believe review & CI is enough.

  • make -C tests/sys/senml_phydat/ all-asan test
  • make -C tests/unittests/ all-asan tests-phydat test

Issues/PRs references

Missing unit tests were overlooked and deprecation introduced in #18148

@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: sys Area: System labels Apr 2, 2024
@miri64 miri64 requested review from maribu and mguetschow April 2, 2024 14:26
Copy link
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

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

Thanks for all your cleanup work, seems good to me from (only) looking at the changeset. I'll trust CI on that one, too.

@miri64 miri64 added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: deprecation Integration Process: The PR is deprecating a feature or API labels Apr 2, 2024
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

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

lgtm, but see inline

@riot-ci
Copy link

riot-ci commented Apr 2, 2024

Murdock results

✔️ PASSED

96e748d sys/phydat: Remove deprecated print function

Success Failures Total Runtime
10024 0 10026 10m:51s

Artifacts

Co-authored-by: Marian Buschsieweke <maribu@users.noreply.github.com>
@chrysn
Copy link
Member

chrysn commented Apr 3, 2024

Sorry I didn't spot this when it was deprecated: This deprecation severly impacts usability in Rust (see also RIOT-OS/rust-riot-wrappers#86).

While exploring possibilities, might we remove _verbose, but keep (undeprecate) phydat_unit_to_str as a function that is only available if not HAS_FLASH_UTILS_ARCH?

chrysn added a commit to RIOT-OS/rust-riot-wrappers that referenced this pull request Apr 3, 2024
…tions

An underlying API change[20529] made the functions impossible to
satisfy; as they are already fallible (and may have returned None if the
list were reduced), returning None is a compatible-by-the-letter way out.

[20529]: RIOT-OS/RIOT#20529

Co-Authored-By: Teufelchen1 <bennet.blischke@haw-hamburg.de>
Closes: #86
@chrysn chrysn added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Apr 4, 2024
@chrysn
Copy link
Member

chrysn commented Apr 4, 2024

For continuation of my question, see discussion in RIOT-OS/rust-riot-wrappers#86. Seems that going push-copy is the right thing to do here. Rust APIs are adjusted, and CI seems to be happy so far except for formalities (thanks to tests being only run on the merged commits -- something I'm not too happy with b/c it breaks bisection, but it is certainly convenient here).

@maribu maribu enabled auto-merge April 4, 2024 10:40
@maribu maribu added this pull request to the merge queue Apr 4, 2024
Merged via the queue into RIOT-OS:master with commit be0d276 Apr 4, 2024
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: deprecation Integration Process: The PR is deprecating a feature or API Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants