Closed youtalk closed 4 years ago
Did you manage to implement the said colcon
extension? Where?
Not yet... Are you interested in it?
Yes, because I'm using YouCompleteMe and the setup would be very easy with a single compile_commands.json
that I would symlink into my workspace directory. Without this extension, I'd have to symlink each compile_commands.json
into the source directory of each package.
Is there any documentation how to develop an extension for colcon
, so that I could maybe help you.
I think there is no documentation yet but: https://colcon.readthedocs.io/en/released/developer/contribution.html#new-packages-extensions
Colcon simply uses Python enter points to register extensions (and even extension points).
The most common extension points are described in https://colcon.readthedocs.io/en/released/developer/extension-point.html. If you install colcon-devtools
you can use the verbs extension-points
and extensions
to get complete lists.
The overall program flow of the relevant build
command is visualized in https://colcon.readthedocs.io/en/released/developer/program-flow.html and might help to show the big picture.
Other than that there is always the code to browse or you can ask questions here.
@dirk-thomas: thanks for offering help! My first question would be: how do I register an extension so that colcon finds it? Without installing anyting, I ran colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --cmake-concat-compile-commands
to see where Python was looking for extra modules but it looks that every unknown argument is treated as the name of a source directory.
My first question would be: how do I register an extension so that colcon finds it?
My previous comment described exactly that.
I would suggest to take a look at the sources of colcon-core
to see an example how it contributes commands line arguments.
Resolved #61
This PR is a draft PR to resolve #61 issue. You can try it by the following command.
It is very useful for me but I know it has no test and the process is not efficient. After making this PR, I've noticed that I need to implement a new
colcon
extension/package instead of modifying thecolcon-cmake
package.