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

Support other ways of selecting packages #809

Closed
audrow opened this issue Mar 29, 2023 · 2 comments
Closed

Support other ways of selecting packages #809

audrow opened this issue Mar 29, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@audrow
Copy link

audrow commented Mar 29, 2023

Description

It'd be great to give more granular access to building and testing options within Colcon. For example, --packages-above-with-dependencies and --packages-above. These options would be useful in testing something like the ament packages, which you may want to build and test all of the packages above it to see if something broke.

Related Issues

If #808 is implemented, this could make it easier to specify the packages you want to build and test, especially when you're building from source.

Completion Criteria

The ability to specify different ways of building and testing ROS packages. This would probably mirror the options available in Colcon.

Implementation Notes / Suggestions

Here is how package selection is currently done. I think this is a sensible default, but it'd be nice to extend to other options.

const buildPackageSelection = packageNames
? ["--packages-up-to", ...packageNames]
: [];
const testPackageSelection = packageNames
? ["--packages-select", ...packageNames]
: [];

@audrow audrow added the enhancement New feature or request label Mar 29, 2023
@christophebedard
Copy link
Member

You can remove the package-name: input and specify package-selection options through the colcon-defaults input. You can also specify any other colcon option through that, as long as the action doesn't override the value when it runs colcon build/test .... This is why we added this input. Example:

      colcon-defaults: |
        {
          "build": {
            "cmake-args": [
                "-DMY_CUSTOM_OPTION=ON"
            ],
            "packages-up-to": [
              "pkg_a",
              "pkg_b"
          },
          "test": {
            "packages-select": [
              "pkg_a"
            ]
          }
        }

@audrow
Copy link
Author

audrow commented Mar 29, 2023

Oh, that's awesome - thanks for pointing this out!

@audrow audrow closed this as completed Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants