You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When creating a package with both Python and C++ executables using Turtle Nest, the package's CMakeLists.txt file includes an automated rename argument for Python executables. This argument omits the .py suffix from the Python script names.
While this setup works for building the package, I encountered an issue when using colcon build --symlink-install. Typically, with --symlink-install, any changes made to Python scripts should not require rebuilding the entire package. However, due to the automated renaming in CMakeLists.txt, I’m finding that I have to rebuild the package every time I make any modifications to the Python scripts.
Steps to Reproduce
Create a package using Turtle Nest with both Python and C++ executables.
Observe the automated renaming of Python executables without the .py suffix in CMakeLists.txt.
Build the package with colcon build --symlink-install.
Make a change to any Python script in the package.
Attempt to run the modified Python script without rebuilding.
Expected Behavior
With --symlink-install, changes to Python scripts should take effect immediately without requiring a full rebuild.
Actual Behavior
A full rebuild is required after every change to a Python script, counteracting the benefits of --symlink-install.
Environment
ROS distribution: ROS2 Humble
The text was updated successfully, but these errors were encountered:
Thank you for reporting this! I can reproduce this and it is indeed an issue.
The original reason for the node renaming was just to unify the node names to avoid any confusion of having the extra .py extension in combined Cpp + Python packages, compared to not having it in pure Python packages.
I think the fact that the node is not correctly symlinked is a problem in the ament_cmake_python package. I'll report this there and link this issue to it.
Since symlink is such a huge feature, I think it is now safer on Turtle Nest side to just remove that renaming of the node to make symlinking work correctly.
Description
When creating a package with both Python and C++ executables using Turtle Nest, the package's
CMakeLists.txt
file includes an automated rename argument for Python executables. This argument omits the.py
suffix from the Python script names.While this setup works for building the package, I encountered an issue when using
colcon build --symlink-install
. Typically, with--symlink-install
, any changes made to Python scripts should not require rebuilding the entire package. However, due to the automated renaming inCMakeLists.txt
, I’m finding that I have to rebuild the package every time I make any modifications to the Python scripts.Steps to Reproduce
.py
suffix inCMakeLists.txt
.colcon build --symlink-install
.Expected Behavior
With
--symlink-install
, changes to Python scripts should take effect immediately without requiring a full rebuild.Actual Behavior
A full rebuild is required after every change to a Python script, counteracting the benefits of --symlink-install.
Environment
ROS distribution: ROS2 Humble
The text was updated successfully, but these errors were encountered: