Skip to content
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

iox-#1032 replace 'IOX_EXPECTS'/'IOX_ENSURES' with 'IOX_ENFORCE' #2181

Conversation

elBoberido
Copy link
Member

@elBoberido elBoberido commented Feb 4, 2024

Pre-Review Checklist for the PR Author

  1. Add a second reviewer for complex new features or larger refactorings
  2. Code follows the coding style of CONTRIBUTING.md
  3. Tests follow the best practice for testing
  4. [ ] Changelog updated in the unreleased section including API breaking changes
  5. Branch follows the naming format (iox-123-this-is-a-branch)
  6. Commits messages are according to this guideline
  7. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  8. Relevant issues are linked
  9. Add sensible notes for the reviewer
  10. All checks have passed (except task-list-completed)
  11. All touched (C/C++) source code files from iceoryx_hoofs are added to ./clang-tidy-diff-scans.txt
  12. Assign PR to reviewer

Notes for Reviewer

This PR replaces the legacy error handler macros ('IOX_ENFORCE' and 'IOX_EXPECTS') with the new IOX_ENFORCE macro and adjusts the tests. Additionally, the error output is improved.

The changelog will be updated with the next PR which also removes all the TODOs and updates the error handling md files.

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • Unit tests have been written for new behavior
  • Public API changes are documented via doxygen
  • Copyright owner are updated in the changed files
  • All touched (C/C++) source code files from iceoryx_hoofs have been added to ./clang-tidy-diff-scans.txt
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

@elBoberido elBoberido force-pushed the iox-1032-replace-iox-expects-with-iox-enforce branch from 49eb12d to 00cebf6 Compare February 4, 2024 15:19
Copy link

codecov bot commented Feb 4, 2024

Codecov Report

Attention: 86 lines in your changes are missing coverage. Please review.

Comparison is base (80bbdf9) 80.06% compared to head (5866693) 79.97%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2181      +/-   ##
==========================================
- Coverage   80.06%   79.97%   -0.10%     
==========================================
  Files         421      420       -1     
  Lines       16361    16362       +1     
  Branches     2270     2275       +5     
==========================================
- Hits        13099    13085      -14     
- Misses       2419     2439      +20     
+ Partials      843      838       -5     
Flag Coverage Δ
unittests 79.76% <79.02%> (-0.10%) ⬇️
unittests_timing 15.45% <19.75%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
iceoryx_binding_c/source/c_chunk.cpp 100.00% <100.00%> (ø)
iceoryx_binding_c/source/c_client.cpp 97.91% <100.00%> (ø)
iceoryx_binding_c/source/c_node.cpp 100.00% <100.00%> (ø)
iceoryx_binding_c/source/c_notification_info.cpp 100.00% <100.00%> (ø)
iceoryx_binding_c/source/c_publisher.cpp 92.50% <100.00%> (ø)
iceoryx_binding_c/source/c_request_header.cpp 100.00% <100.00%> (ø)
iceoryx_binding_c/source/c_response_header.cpp 100.00% <100.00%> (ø)
iceoryx_binding_c/source/c_runtime.cpp 80.00% <100.00%> (ø)
iceoryx_binding_c/source/c_server.cpp 96.11% <100.00%> (ø)
iceoryx_binding_c/source/c_service_discovery.cpp 98.38% <100.00%> (ø)
... and 50 more

... and 1 file with indirect coverage changes

@elBoberido elBoberido marked this pull request as ready for review February 4, 2024 16:38
@elBoberido elBoberido self-assigned this Feb 4, 2024
@elBoberido elBoberido added refactoring Refactor code without adding features technical debt unclean code and design flaws labels Feb 4, 2024
@elBoberido
Copy link
Member Author

@FerdinandSpitzschnueffler @mossmaurice @dkroenke @MatthiasKillat @budrus @elfenpiff feel free to add yourself as reviewer

@elBoberido elBoberido force-pushed the iox-1032-replace-iox-expects-with-iox-enforce branch from 00cebf6 to 12bd135 Compare February 5, 2024 00:02
elBoberido and others added 6 commits February 5, 2024 01:08
… iox::string in MessageQueue"

This reverts commit 890848f.
By default, the MessageQueue class relies on std::string objects
to send and receive data, as defined by its interface. However, this
approach can potentially lead to dynamic memory allocation when
handling larger data payloads that exceed the stack space
optimization (SSO) limit.

To address this issue, an alternative API has been introduced that
enables data transmission and reception using iox::string.
This approach allows for direct data manipulation within stack
memory, effectively eliminating the need for dynamic memory
allocation.

Signed-off-by: Luca Bartoli <[email protected]>
@elBoberido elBoberido force-pushed the iox-1032-replace-iox-expects-with-iox-enforce branch from 12bd135 to 6c945a3 Compare February 5, 2024 00:09
Copy link
Contributor

@FerdinandSpitzschnueffler FerdinandSpitzschnueffler left a comment

Choose a reason for hiding this comment

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

Some nitpicks...

iceoryx_hoofs/posix/ipc/include/iox/detail/named_pipe.inl Outdated Show resolved Hide resolved
iceoryx_hoofs/posix/utility/source/posix_scheduler.cpp Outdated Show resolved Hide resolved
iceoryx_hoofs/posix/utility/source/posix_scheduler.cpp Outdated Show resolved Hide resolved
iceoryx_posh/source/roudi/port_manager.cpp Outdated Show resolved Hide resolved
iceoryx_binding_c/test/moduletests/test_subscriber.cpp Outdated Show resolved Hide resolved
@elBoberido elBoberido merged commit 32bf3fa into eclipse-iceoryx:master Feb 6, 2024
26 checks passed
@elBoberido elBoberido deleted the iox-1032-replace-iox-expects-with-iox-enforce branch February 6, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactor code without adding features technical debt unclean code and design flaws
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ongoing Issue: CI Maintenance Tasks ErrorHandling concept with user defined actions
3 participants