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

Allow passing additional arguments to colcon build #1

Open
Butakus opened this issue Feb 16, 2024 · 0 comments
Open

Allow passing additional arguments to colcon build #1

Butakus opened this issue Feb 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Butakus
Copy link
Owner

Butakus commented Feb 16, 2024

Currently, the cb command allows passing custom options to colcon build through the environment variable $CB_EXTRA_ARGS. It would be nice to be able to just append the desired build options directly after the cb command.

This can be done by shifting the workspace argument and passing the reminder "$@" to the colcon build command.
This feature should also be combined with the environment variable $CB_EXTRA_ARGS, so we can have this variable to set the default options (e.g. --symlink-install), and the extra feature to include other options as we please.

Problem: The cb command can be used with and without a workspace name as a first argument. If used without arguments, it will build the workspace that is currently activated. This requires to include aditional logic to detect if the first argument is the workspace name or a build option, in order to shift the arguments accordingly.

Possible solutions:

  • All colcon build options start with "--". This could be a way to detect if the first argument is meant to be a workspace name or an option.
  • Check if the first argument is in the list of workspaces. If not, use the active workspace and append the remainder arguments as build options. The problem here is if we want to use a workspace name but the name is wrong or it does not exist. Then it will be passed as an option without detecting the mistake.
  • Combine the previous two?
@Butakus Butakus added the enhancement New feature or request label Feb 16, 2024
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

1 participant