Skip to content

Conversation

@elfenpiff
Copy link
Contributor

@elfenpiff elfenpiff commented Oct 21, 2025

Notes for Reviewer

Pre-Review Checklist for the PR Author

  • Add sensible notes for the reviewer
  • PR title is short, expressive and meaningful
  • Consider switching the PR to a draft (Convert to draft)
    • as draft PR, the CI will be skipped for pushes
  • Relevant issues are linked in the References section
  • Every source code file has a copyright header with SPDX-License-Identifier: Apache-2.0 OR MIT
  • Branch follows the naming format (iox2-123-introduce-posix-ipc-example)
  • Commits messages are according to this guideline
  • Tests follow the best practice for testing
  • Changelog updated in the unreleased section including API breaking changes
  • Assign PR to reviewer
  • All checks have passed (except task-list-completed)

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Unit tests have been written for new behavior
  • Public API is documented
  • PR title describes the changes

Post-review Checklist for the PR Author

  • All open points are addressed and tracked via issues

References

Closes #1144

@elfenpiff elfenpiff self-assigned this Oct 21, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for deriving ZeroCopySend on union types. Previously, the derive macro only supported structs and enums, and would generate a compile error for unions. Now unions are handled by generating compile-time checks that ensure all fields implement ZeroCopySend.

Key changes:

  • Modified the ZeroCopySend derive macro to handle Data::Union types
  • Added field-by-field validation for union types similar to struct handling

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
iceoryx2-bb/derive-macros/src/lib.rs Replaces the default case that returned a compile error with explicit union handling that validates all fields implement ZeroCopySend
doc/release-notes/iceoryx2-unreleased.md Documents the new union support feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 61.90476% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.89%. Comparing base (2a452c2) to head (65d4d5d).
⚠️ Report is 62 commits behind head on main.

Files with missing lines Patch % Lines
iceoryx2-bb/derive-macros/src/lib.rs 0.00% 16 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1145      +/-   ##
==========================================
- Coverage   77.90%   77.89%   -0.01%     
==========================================
  Files         360      360              
  Lines       38788    38807      +19     
  Branches      807      807              
==========================================
+ Hits        30216    30230      +14     
- Misses       7933     7938       +5     
  Partials      639      639              
Flag Coverage Δ
CPP 65.91% <ø> (ø)
Rust 77.85% <61.90%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
iceoryx2-bb/elementary/src/bump_allocator.rs 100.00% <100.00%> (ø)
iceoryx2-bb/memory/src/bump_allocator.rs 80.30% <100.00%> (ø)
iceoryx2-bb/memory/src/one_chunk_allocator.rs 84.40% <100.00%> (+0.14%) ⬆️
iceoryx2-bb/memory/src/pool_allocator.rs 94.87% <100.00%> (ø)
iceoryx2-bb/posix/src/memory.rs 89.81% <100.00%> (+0.09%) ⬆️
iceoryx2/src/active_request.rs 92.17% <100.00%> (ø)
iceoryx2/src/pending_response.rs 89.08% <100.00%> (ø)
iceoryx2/src/port/client.rs 92.85% <100.00%> (ø)
iceoryx2/src/port/publisher.rs 93.37% <100.00%> (ø)
iceoryx2/src/port/server.rs 93.56% <100.00%> (ø)
... and 2 more

... and 107 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@elfenpiff elfenpiff force-pushed the iox2-1144-zero-copy-send-unions branch from fce4050 to 7bbcbf7 Compare October 24, 2025 05:51
@elfenpiff elfenpiff force-pushed the iox2-1144-zero-copy-send-unions branch from 7bbcbf7 to 4807614 Compare November 1, 2025 09:29
@elfenpiff elfenpiff merged commit 9373a76 into eclipse-iceoryx:main Nov 2, 2025
59 checks passed
@elfenpiff elfenpiff deleted the iox2-1144-zero-copy-send-unions branch November 2, 2025 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZeroCopySend implementation for Unions

3 participants