Conversation
|
Should the patch keep the copyright notice? |
|
around the codebase I've seen "generated files don't have a copyright notice" in place of licenses; please advise |
|
I can't find an example now so you might not know what it is I'm referring to. It was probably a specific case. I'll revert 57ffcb8 |
In the case of templates which are expanded with user provided information (e.g. message code) we commonly don't include a copyright notice. For other files I don't think we are specifically strict abour it and often don't cover the expanded files with the linters (which would complain if a file doesn't have any copyright line). |
This reverts commit 57ffcb8.
|
OK, thanks for the explanation. What I've understood is that since this isn't being templated with any user-provide info then it should be treated as usual: 8e0e75b |
| @@ -15,3 +15,4 @@ | |||
| # copied from ament_cmake_ros/ament_cmake_ros-extras.cmake | |||
There was a problem hiding this comment.
This line should still say "generated from ... .cmake.in".
There was a problem hiding this comment.
sorry @dirk-thomas, I should have caught that myself. da58e48
| # generated from ament_cmake_ros/ament_cmake_ros-extras.cmake.in | ||
|
|
||
| include("${ament_cmake_ros_DIR}/build_shared_libs.cmake") | ||
| add_definitions(-DROS_PACKAGE_NAME=\"${PROJECT_NAME}\") |
There was a problem hiding this comment.
Out of curiosity: why do the quotes need to be escaped when the overall argument is not wrapped in quotes?
There was a problem hiding this comment.
Should this be PROJECT_NAME or the name extracted from the package.xml? Does ament assert that they are the same? In either case might the package xml name make more sense?
There was a problem hiding this comment.
I don't see the reason myself; I was copying ros/ros_comm@a6a6f71, but maybe it was just to not assume anything about what is or isn't in the project name..?
| # generated from ament_cmake_ros/ament_cmake_ros-extras.cmake.in | ||
|
|
||
| include("${ament_cmake_ros_DIR}/build_shared_libs.cmake") | ||
| add_definitions(-DROS_PACKAGE_NAME=\"${PROJECT_NAME}\") |
There was a problem hiding this comment.
Should this be PROJECT_NAME or the name extracted from the package.xml? Does ament assert that they are the same? In either case might the package xml name make more sense?
|
ament_cmake already ensures that the package name equals the project name. Therefore I would avoid the extra code here and just use |
|
Since there's been discussion before about whether that was a reasonable thing for ament_cmake to enforce, and given @wjwwood 's point about the name in package.xml better representing what we consider the package name, I think using |
This reverts commit 244cfc1.
|
this isn't required for ros2/rclcpp#389 anymore: do we think it's better to merge it so users can have access to |
|
If we don't use it anywhere I would lean towards not merging it. But maybe we should keep the PR open for a bit since it looks like the gtests results would benefit from grouping them by the project name. So maybe we have a use case for this soon. |
|
OK, sounds good to me! |
Should we move this out of review then ? |
|
detached from ros2/rclcpp#389 and removed review label |
|
I used a different approach to group the gtest results (see ament/ament_cmake#117). Therefore we can close this. (I will do so, please feel free to reopen if you think we should keep this.) |
|
We won't necessarily be using this for rclcpp's logging. However, currently logging calls lower in the stack e.g. in If we are going to add more logging e.g. for debugging, it seems useful for core packages that are using |
|
I would say it depends on how many packages would use the feature. If it e.g. is only |
|
Yeah, I appreciate the point about considering the documentation effort when features aren't strictly necessary (in general).. I think in this particular case the documentation won't bring much work (especially since it's more of an internal feature as opposed to something people will use everyday). Debug logging will be added to not just Unless I've overlooked something in the reasoning on these points I'll go ahead and reopen this PR tomorrow |
This is needed for using a package's name as the default logger/logger prefix for ROS_INFO etc.no longer needed for ros2/rclcpp#389Putting it in this package as opposed to rclcpp (where the logging macros would make use the package name) means that packages below rclcpp e.g. rmw can also use this in their logging calls to rcutils directly.
However, it will require all packages e.g. demos to use ament_cmake_ros where they currently use ament_cmake, but I understand that we should be encouraging that anyway, correct?