Skip to content

Conversation

@orecham
Copy link
Contributor

@orecham orecham commented Dec 1, 2025

Notes for Reviewer

A proposal for including a custom POSIX abstraction without using feature flags. Putting this option forward for discussion, if not agreed upon, we can choose not to merge it.

Instead of the feature flag, this PR defines a custom cfg option, platform_override, when the environment variable IOX2_CUSTOM_PAL_POSIX_PATH is set.

My understanding is that feature flags should be additive and enable optional functionality. The custom POSIX abstraction doesn't really fall into this category.
Using a cfg flag instead to swap the platform seems more fitting to me for such build-time configurations. This approach also nicely maintains separation between the responsibility of feature selection (developer) and platform integration (integrator).

If we are in agreement on this approach, we could do the same for the platform configuration.

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 #1176

@orecham
Copy link
Contributor Author

orecham commented Dec 1, 2025

@dkroenke Interested in your opinion.

Also, does this work with the setup you used to test your PR? I copied the existing linux platform to another location and the build seemed to work for me when pointing the environment variable to it, but maybe I missed some detail.

@orecham orecham force-pushed the iox2-1176-custom-pal-without-feature-flag branch from 71b4a82 to f739dff Compare December 1, 2025 21:19
@orecham orecham self-assigned this Dec 1, 2025
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.39%. Comparing base (e0a0541) to head (f739dff).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1212   +/-   ##
=======================================
  Coverage   78.39%   78.39%           
=======================================
  Files         411      411           
  Lines       41008    41008           
  Branches     1095     1095           
=======================================
+ Hits        32149    32150    +1     
+ Misses       8026     8025    -1     
  Partials      833      833           
Flag Coverage Δ
CPP 72.80% <ø> (ø)
Rust 78.21% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 3 files with indirect coverage changes

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

@dkroenke dkroenke self-requested a review December 2, 2025 08:35
@dkroenke
Copy link
Member

dkroenke commented Dec 2, 2025

@orecham Thanks for the PR I will take a look on it as soon as possible. It looks reasonable to remove the feature flag and makes life easier for all. Did not catch this in my last PR since I'm not yet familiar enough with cargo.

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.

Customize Platform Abstraction Layer

2 participants