Skip to content

Fix visibility attribute on Windows for export_properties function - #761

Merged
rhaschke merged 1 commit into
moveit:ros2from
sea-bass:fix-visibility-windows
Sep 10, 2026
Merged

rhaschke merged 1 commit into
moveit:ros2from
sea-bass:fix-visibility-windows

Conversation

@sea-bass

@sea-bass sea-bass commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Found this while building version 0.2.0 for RoboStack on Windows.

If you look at the source code here: https://github.com/pybind/pybind11/blob/d87cf0b873e42f0e541a4be9b29ea4b2681148ed/include/pybind11/detail/common.h#L140-L146

You will notice that the PYBIND11_EXPORT macro keeps its current behavior on non-Windows system but also fixes on Windows.

... granted, there are several other parts of the code that won't compile on Windows, but this particular patch seems like a less intrusive one than some of the others.

Summary by CodeRabbit

  • Refactor
    • Improved portability of the Python bindings’ exported symbols without changing user-visible functionality.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: f1e1f96d-ee4c-4f6e-8cd2-c8a99c8aea30

📥 Commits

Reviewing files that changed from the base of the PR and between c7dc861 and 900ce88.

📒 Files selected for processing (1)
  • core/python/bindings/src/properties.cpp

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The export_properties declaration now uses the portable PYBIND11_EXPORT macro instead of a GCC-specific visibility attribute. No behavior changes are introduced.

Changes

Property export visibility

Layer / File(s) Summary
Portable visibility declaration
core/python/bindings/src/properties.cpp
The export_properties declaration uses PYBIND11_EXPORT instead of __attribute__((visibility("default"))).

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 900ce

This makes the property binding export portable for Windows while preserving the existing shared-library visibility intent. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: fixing the visibility attribute for the export_properties function on Windows.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sea-bass sea-bass changed the title Fix visibility attribute for export_properties function Fix visibility attribute on Windows for export_properties function Sep 10, 2026
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.86%. Comparing base (c7dc861) to head (900ce88).

Additional details and impacted files
@@           Coverage Diff           @@
##             ros2     #761   +/-   ##
=======================================
  Coverage   47.86%   47.86%           
=======================================
  Files         142      142           
  Lines       10446    10446           
  Branches     1149     1149           
=======================================
  Hits         4999     4999           
  Misses       5183     5183           
  Partials      264      264           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@rhaschke
rhaschke merged commit f527048 into moveit:ros2 Sep 10, 2026
7 checks passed
@sea-bass
sea-bass deleted the fix-visibility-windows branch September 11, 2026 17:56
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.

2 participants