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

Remove boilerplate visibility macros #1972

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bmagyar
Copy link
Member

@bmagyar bmagyar commented Dec 23, 2024

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Aren't these parts in the CMakeLists.txt now outdated as well?

# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(controller_interface PRIVATE "CONTROLLER_INTERFACE_BUILDING_DLL")

see ros-controls/ros2_control_demos#539

@bmagyar
Copy link
Member Author

bmagyar commented Dec 23, 2024

Excellent point! On to removing more stuff!!

@bmagyar
Copy link
Member Author

bmagyar commented Dec 23, 2024

I've also removed the cmake macro for controller interface which may break controllers... but I'll put up a PR for that too

Comment on lines -39 to -46
macro(controller_interface_configure_controller_library library_target)
if(WIN32)
# Causes the visibility macros to use dllexport rather than dllimport
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(${library_target}
PRIVATE "CONTROLLER_INTERFACE_BUILDING_DLL")
endif()
endmacro()
Copy link
Member

@saikishor saikishor Dec 23, 2024

Choose a reason for hiding this comment

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

LOL. I didn't know that this macro exist

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

The changes itself look good to me, but this might be API breaking as we are removing the headers.

For ros2_controllers it is not a problem as no one derives from them, but for ros2_control it might be.

What do you guys think? @ros-controls/ros2-maintainers ?

@bmagyar
Copy link
Member Author

bmagyar commented Dec 23, 2024

That's why we have the downstream CI jobs. I think we can work with the UR driver maintainers ;)

@saikishor
Copy link
Member

That's why we have the downstream CI jobs. I think we can work with the UR driver maintainers ;)

Ok, we will check with the UR drivers. I'm just worried about user's code that is not released but in their local workspace. If this is not a problem at all, then perfect 😜

Copy link
Contributor

Choose a reason for hiding this comment

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

should we first deprecate this for one release cycle?

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.

3 participants