ros-industrial / ros_qtc_plugin

ROS Qt Creator Plug-in (https://ros-qtc-plugin.readthedocs.io)
396 stars 213 forks source link

Colcon args `-event-handlers status+` is no longer valid #481

Closed caioviel closed 1 year ago

caioviel commented 1 year ago

I am trying to build a project using qt-creator ros. I am setting the following Colcon Arguments --parallel-workers 3 --base-paths src --event-handlers console_direct+ --packages-up-to rtr_rp_create

However, I got his error message:

colcon build: error: argument --event-handlers: invalid choice: 'status+' (choose from 'compile_commands-', 'console_cohesion+', 'console_direct+', 'console_package_list+', 'console_start_end-', 'console_stderr-', 'event_log-', 'log-', 'log_command-', 'store_result-', 'summary-', 'compile_commands+', 'console_cohesion-', 'console_direct-', 'console_package_list-', 'console_start_end+', 'console_stderr+', 'event_log+', 'log+', 'log_command+', 'store_result+', 'summary+')

It appears that the plugin is hard-coding some extra elements to the code Colcon args list.

christian-rauch commented 1 year ago

I added --event-handlers status+ console_start_end+ to the colcon arguments to parse the progress for the progress bar (4a58f0b035dc5ea3479cc0ed8c4396f36cdae778).

It is probably complaining because status+ is now added twice. You should be fine if you remove status+ from the manually provided event handlers.

caioviel commented 1 year ago

Actually status+ is not supported by version of colcon I am using. It fails even when I call direct on the terminal passing --event-handlers status+

christian-rauch commented 1 year ago

Does this mean you get the same error, even without the arguments that you provide?

Can you provide more details about your system (Ubuntu, colcon versions, etc.)? What does colcon build -h list under --event-handlers?

caioviel commented 1 year ago

I figured out the problem. status is not a default colcon event-handler, I need to install it.

pip install colcon-common-extensions

Now it is working, thank you!

christian-rauch commented 1 year ago

The status event handler is part of colcon-notification, which is a dependency of colcon-common-extensions.

Figuring out the available event handlers would be some effort. For now, I will assume that users have the default colcon packages (i.e. python3-colcon-common-extensions) installed.