8000 Added dependency to python3-argcomplete to ros2cli by ymollard · Pull Request #564 · ros2/ros2cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

Added dependency to python3-argcomplete to ros2cli #564

Merged
merged 2 commits into from
Sep 17, 2020

Conversation

ymollard
Copy link
Contributor
@ymollard ymollard commented Sep 6, 2020

Following ros2/ros2_documentation#841 (comment) here's a proposal so that all ros2cli commands no longer require a manual install of python3-argcomplete

TODO: to be updated in https://github.com/ros2/ros2_documentation also

Signed-off-by: Yoan Mollard <ymollard@users.noreply.github.com>
Copy link
Member
@ivanpauno ivanpauno left a comment

Choose a reason for hiding this comment

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

Other packages that need the dependency:

I'm not sure if we need to all the dependency to all of them, as it's an optional dependency.
Most of the packages in the above list depend on ros2cli, so they will get the dependency transitively (except ament_ind 8000 ex_python).
@clalancette thoughts?

Note: we will probably need to modify the CI scripts before trying this, to make sure the pip installed version of argcomplete is not available.

@@ -13,6 +13,7 @@
<exec_depend>python3-netifaces</exec_depend>
<exec_depend>python3-packaging</exec_depend>
<exec_depend>python3-pkg-resources</exec_depend>
<exec_depend>python3-argcomplete</exec_depend>
Copy link
Member

Choose a reason for hiding this comment

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

nit: alpha order

Signed-off-by: Yoan Mollard <ymollard@users.noreply.github.com>
@clalancette
Copy link
Contributor

I'm not sure if we need to all the dependency to all of them, as it's an optional dependency.
Most of the packages in the above list depend on ros2cli, so they will get the dependency transitively (except ament_index_python).
@clalancette thoughts?

I'm usually in favor of 'include-what-you-use'; you never know if a downstream transitive dependency gets changed or removed. That means for this particular PR, I would add an exec_depend on python3-argcomplete to both the ros2cli and the ros2run packages, as they are the ones that directly depend on argcomplete. I'd also like to see the dependency added to the others in your list, but those would be separate PRs.

@dirk-thomas
Copy link
Member

Other packages that need the dependency:

Why should packages which only contribute extension points to ros2cli also declare the dependency? They explicitly only conditionally use argcomplete.

ros2cli determines if argcomplete is being used since it also provides the necessary environment hook.

@clalancette
Copy link
Contributor

Why should packages which only contribute extension points to ros2cli also declare the dependency? They explicitly only conditionally use argcomplete.

Sure, but generally anything that does an import of argcomplete should arguably have the dependency. For instance, the standalone script https://github.com/ament/ament_index/blob/c9778d8f97e95e8ea344b49442c20fad43d77cd7/ament_index_python/ament_index_python/cli.py#L36 imports it, so it should have the dependency. Other places that @ivanpauno pointed out are similar.

And while it is conditional (I think in all cases?), I think that most users want it installed by default. So it makes sense to optimize for those users. Is there a way to declare a dependency as "Recommends" in the Debian packages? That way it will get installed by default, but users who don't want it can uninstall it by hand.

@dirk-thomas
Copy link
Member
dirk-thomas commented Sep 10, 2020

the standalone script https://github.com/ament/ament_index/blob/c9778d8f97e95e8ea344b49442c20fad43d77cd7/ament_index_python/ament_index_python/cli.py#L36 imports it, so it should have the dependency.

Totally agreeing to this case. It is a separate executable and its own environment hook 👍

Other places that @ivanpauno pointed out are similar.

I disagree on that because they (e.g. ros2launch, ros2run) have neither their own executables nor environment hooks.

Copy link
Contributor
@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

Regardless of the other conversation going on here, I think we can go ahead with this change, so I'll approve. @dirk-thomas Do you agree?

@clalancette
Copy link
Contributor
  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor

@ros-pull-request-builder retest this please

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.

4 participants
0