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

feature: install only dependencies of a specific type #820

Closed
Aposhian opened this issue Jun 25, 2021 · 2 comments
Closed

feature: install only dependencies of a specific type #820

Aposhian opened this issue Jun 25, 2021 · 2 comments

Comments

@Aposhian
Copy link

Many package managers such as npm and cargo allow for selectively installing a specific class of dependencies, such as dependencies and devDependencies.

package.xml files conveniently provide multiple tags to classify what dependencies are needed for:

  • <build_depend>
  • <exec_depend>
  • <test_depend>

However, rosdep doesn't support a way to only install build_depend dependencies, or only exec_depend and test_depend dependencies. This is very frustrating for scenarios where you only want to build, or only want to execute.

For example, in CI, I want a build step to install all build dependencies and compile binaries. I transfer those binaries over to a test step where I want to install exec and test dependencies so I can run tests, and then I transfer the binaries over to a final binary deployment that only installs exec dependencies.

Yes, this is technically possible by manually specifying packages to install, or by using --skip-keys, but that defeats the purpose of having a package.xml file with these nice, self-documenting tags.

Here is what the usage could look like:

rosdep install --from-paths <src-dir> --build-depend

or

rosdep install --from-paths <src-dir> --exec-depend --test-depend

And the default behavior could be to install everything if none of these flags are specified. <depend> tags would also get installed no matter what. So adding these flags would not break backward compatibility.

I would love to work on a PR for this.

@christophebedard
Copy link
Member

There's an open PR for that: #789

@Aposhian
Copy link
Author

Thanks, didn't find that in my searching.

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

No branches or pull requests

2 participants