do not fail if other package.xml provides package required#730
do not fail if other package.xml provides package required#730dirk-thomas merged 1 commit intoros:indigo-develfrom
Conversation
|
Can you clarify which cases this is covering? It sounds like your're allowing launch files with transitive dependencies. If the files are referenced locally I would consider that correct behavior, since if the transitive dependency gets removed then the launch file will break. If you're transitively using the launch files through other launch files it should be ok. |
|
to reproduce this
it is true that |
| file_deps = {} | ||
| for pkg, miss in missing.items(): | ||
| if miss: | ||
| print("Missing package dependencies: %s/package.xml: %s"%(pkg, ', '.join(miss))) |
There was a problem hiding this comment.
Why should this message be still printed? I thought the point was that this is not actually a problem?
There was a problem hiding this comment.
I think missing package dependencies should be fixed, the point is upstream package dependencies can not be fixed by downstream maintainers, so test should not be fail. But printing this is useful for downstream maintainers to notify upstream maintainers.
There was a problem hiding this comment.
print("Missing package dependencies: %s/package.xml: %s (notify upstream maintainer)"%(pkg, ', '.join(miss)))
added message.
|
The CI build for this PR reports numerous failing tests. Please look into them and resolve them. |
cc50a0a to
f9fb7d6
Compare
|
OK fixed the patch and now test passed, please review. |
|
I don't think this patch achieve the goal at all. From my point of view that check for one launch file should ensure that the containing package contains the necessary dependencies to everything which is being directly using within this launch file. Recursively included launch files should not be checked since they should be covered by the dependencies of the package containing that launch file. Currently |
|
Current implementation fails if upstream launch file did not contains the This mean if we want to add roslaunch_add_file_check to our CMakeLists.txt, with this PR, ◉ Kei Okada On Wed, Mar 9, 2016 at 4:28 AM, Dirk Thomas notifications@github.com
|
|
So your test would pass but it wouldn't actually work? I am not sure if that is a useful test. |
|
No
In current implementation, 1 passes the test, but 2 and 3 fails ◉ Kei Okada 2016/03/09 10:04、Dirk Thomas notifications@github.com のメッセージ:
|
| all_pkgs.extend(rospack.get_depends(file_pkg,implicit=False)) | ||
| miss_all = list(set(miss) - set(all_pkgs)) | ||
| except Exception as e: | ||
| print(e) |
There was a problem hiding this comment.
Since this is an error message please print it to stderr using:
print(e, file=sys.stderr)
|
Without a clear example to reproduce and follow what you are running it is really difficult to understand current and new expected behavior. I just had a very hard time following this. Anyway I have tried the cases you mentioned and the behavior with this patch is for sure better then without. I have only small comment left regarding `print. If you could address that one and squash I am happy to merge this contribution. |
roslaunch-check fails for heqtor_quadrotor_gazebo ``` $ rosrun roslaunch roslaunch-check /opt/ros/indigo/share/hector_quadrotor_gazebo/launch/quadrotor_empty_world.launch checking /opt/ros/indigo/share/hector_quadrotor_gazebo/launch/quadrotor_empty_world.launch ...writing test results to /home/k-okada/.ros/test_results/hector_quadrotor_gazebo/rosunit-roslaunch_check_quadrotor_empty_world_launch.xml FAILURE: [/opt/ros/indigo/share/hector_quadrotor_gazebo/launch/quadrotor_empty_world.launch]: Missing package dependencies: hector_quadrotor_gazebo/package.xml: gazebo_ros, hector_quadrotor_controller Missing package dependencies: hector_quadrotor_controller/package.xml: controller_manager ``` but it has dependency like ``` $ rospack depends-why --target gazebo_ros hector_quadrotor_gazebo Dependency chains from hector_quadrotor_gazebo to gazebo_ros: * hector_quadrotor_gazebo -> gazebo_plugins -> gazebo_ros * hector_quadrotor_gazebo -> hector_gazebo_plugins -> gazebo_ros * hector_quadrotor_gazebo -> hector_sensors_gazebo -> gazebo_plugins -> gazebo_ros * hector_quadrotor_gazebo -> hector_sensors_gazebo -> hector_gazebo_plugins -> gazebo_ros * hector_quadrotor_gazebo -> hector_quadrotor_gazebo_plugins -> gazebo_ros * hector_quadrotor_gazebo -> hector_quadrotor_gazebo_plugins -> hector_gazebo_plugins -> gazebo_ros * hector_quadrotor_gazebo -> hector_quadrotor_controller_gazebo -> gazebo_ros_control -> gazebo_ros ```
|
ok fixed the patch and squashed, and added example https://github.com/k-okada/roslaunch_730, which is basically follow the instructions in -> #730 (comment) |
|
Thank you for the patch and iterating on it. |
do not fail if other package.xml provides package required
do not fail if other package.xml provides package required
roslaunch-check fails for heqtor_quadrotor_gazebo
but it has dependency like