<div dir="ltr">David,<div><br></div><div>This looks like a convenient tool! How does it know when to add a dependency for you based on your source code? Does that work with Python or C++ or both (or other languages)?</div><div><br></div><div>It seems like some of these features would be good additions to catkin_lint, and some of the convenience could be captured with a `catkin_lint <package_name> --apply` or something like that.</div><div><br></div><div>You also mentioned checking launch files and adding missing dependencies based on that. Does that overlap with the cmake macro roslaunch provides?:</div><div><br></div><div><a href="http://wiki.ros.org/roslaunch#Catkin">http://wiki.ros.org/roslaunch#Catkin</a><br></div><div><br></div><div>Maybe they could share logic, where the test (which is used for regression testing) and the tool use common logic to detect the problem, but the tool can additionally fix the issue (--apply/--fix semantic)?</div><div><br></div><div>I can sympathize with the parsing of CMake, I helped one of my coworkers at Willow with the parsing when we were writing the first version of the catkinize script (I don't think it is using this library anymore though):</div><div><br></div><div><a href="https://github.com/wjwwood/parse_cmake">https://github.com/wjwwood/parse_cmake</a><br></div><div><br></div><div>I eventually had to fork it (I didn't have access to the pypi login and couldn't reach the previous maintainer), but maybe that library could help you with the parsing.</div><div><br></div><div>Also we've used this cmake-lint library which parses CMake as part of the linting, maybe it could also be an inspiration:</div><div><br></div><div><a href="https://github.com/richq/cmake-lint">https://github.com/richq/cmake-lint</a><br></div><div><br></div><div>Thanks for sharing!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 24, 2015 at 8:28 AM, David Lu!! via ros-users <span dir="ltr"><<a href="mailto:ros-users@lists.ros.org" target="_blank">ros-users@lists.ros.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Right now it only adds dependencies. Ticketed removal:<br>
<a href="https://github.com/DLu/roscompile/issues/6" rel="noreferrer" target="_blank">https://github.com/DLu/roscompile/issues/6</a><br>
<br>
roslint is primarily for identifying errors, as I understand it. I<br>
wasn't aware of catkin_lint. I wish I had been because CMake parsing<br>
is hard.<br>
<br>
I could imagine integrating with catkin_lint, but don't have the<br>
cycles to undertake that at the moment.<br>
<span class=""><br>
On Fri, Jul 24, 2015 at 10:54 AM, kruset <<a href="mailto:kruset@mail.in.tum.de">kruset@mail.in.tum.de</a>> wrote:<br>
> Does this only add dependencies or also remove obsolete ones (where no usage<br>
> could be detected)?<br>
> Could this be rather added to roslint or catkin_lint?<br>
><br>
><br>
> On 2015-07-24 15:39, David Lu!! via ros-users wrote:<br>
>><br>
>> I have a confession to make. I'm not very good at Catkin. One reason<br>
>> is because there is a lot more metadata to maintain. Unlike Ye Olde<br>
>> Rosbuild, where you could add a dependency by adding a single tag in<br>
>> the manifest, Catkin requires you add the build and run dependencies<br>
>> to the package.xml, as well as add the dependencies in the<br>
>> CMakeLists.txt in a couple places.<br>
>><br>
>> That's why I've developed a tool called roscompile, which I've found<br>
>> invaluable for cleaning up my packages for release. It attempts to do<br>
>> the hard work for you by 'compiling' the information that already<br>
>> exists in the package.<br>
>><br>
>>  * Did you just add a dependency on a new package in your source code?<br>
>> roscompile will read the source and add the appropriate tags to your<br>
>> package.xml and CMakeLists.txt.<br>
>><br>
>>  * Create a new launch file that uses map_server? roscompile reads<br>
>> launch files to add run_depends.<br>
>><br>
>>  * Add a new msg/srv/action/dynamic_reconfiguration/plugin? roscompile<br>
>> generates the metadata for that too.<br>
>><br>
>> Check it out here: <a href="https://github.com/DLu/roscompile" rel="noreferrer" target="_blank">https://github.com/DLu/roscompile</a><br>
</span><span class="">>> (contains a full list of features and issues page)<br>
>><br>
>> Of course, the tool is far from perfect. It should not be used to<br>
>> blindly make changes to critical repos. I welcome collaboration to<br>
>> help cover people's use cases other than my own.<br>
>><br>
>> Happy Catkining,<br>
>> David!!<br>
>> _______________________________________________<br>
>> ros-users mailing list<br>
</span>>> <a href="mailto:ros-users@lists.ros.org">ros-users@lists.ros.org</a><br>
<span class="">>> <a href="http://lists.ros.org/mailman/listinfo/ros-users" rel="noreferrer" target="_blank">http://lists.ros.org/mailman/listinfo/ros-users</a><br>
_______________________________________________<br>
ros-users mailing list<br>
</span><a href="mailto:ros-users@lists.ros.org">ros-users@lists.ros.org</a><br>
<a href="http://lists.ros.org/mailman/listinfo/ros-users" rel="noreferrer" target="_blank">http://lists.ros.org/mailman/listinfo/ros-users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">William Woodall<div>ROS Development Team</div><div><a href="mailto:william@osrfoundation.org" target="_blank">william@osrfoundation.org</a></div><div><a href="http://wjwwood.io/" target="_blank">http://wjwwood.io/</a></div></div></div>
</div>