-
Notifications
You must be signed in to change notification settings - Fork 49
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 invocation in subfolders of the workspace #139
Comments
|
I would appreciate this too. I often accidentally run |
The logic is a little bit more complicated since this will affect other arguments which are currently specified as paths relative to the current directory. E.g. if you specify a custom
The same complexity for interpreting default values / relative paths exists here. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
An alternative is to have a version of colcon that is workspace-aware. |
Please see my previous comment about the complexity around command line arguments representing relative paths. So just |
It would be great to have such a feature, because the need to cd to the top-level folder significantly interrupts the development workflow. |
I don't see how the configuration mechanisms are related to this?
Obviously the root of the workspace needs to be marked somehow on the first invocation. That part should be trivial. Then subsequent invocations have to check if they are called from a recursive subdirectory of any marked workspace root. And if that is the case the execution should happen as if the command was called in the workspace root - except that any explicitly provided arguments from the CLI which contain relative path must be updated accordingly if e.g. the cwd is changed to achieve the behavior to run from the root. The challenge here will be to know what arguments are coming from the CLI and which ones are coming from configuration files and/or default values since they need to be treated differently. |
I think adding a configuration mechanism that relies on cached information stored in the workspace root (á la catkin tools) would be a nice addition to colcon. Don't you agree? |
I do agree that profiles would be a nice feature. But they are orthogonal to the feature described in this ticket and tracked in a separate one: see #168. |
Agreed. For me, the features are (loosely) related, as the profiles would mark the workspace root. |
It depends on the implementation choice for profiles. Maybe they are stored in a user config directory instead. |
After 6 years this is still impossible/low level priority ticket? |
There are several plugins provided by the community to address this issue, for example: |
Tnx a lot @rhaschke. I guess we can also close this ticket. |
I think this is based on the official one: But the official one seems pretty wip. |
Yes, my version was inspired by the "official" one. However it is a full rewrite. |
I would like to keep this issue open until the official package has merged my PR. |
Is there any movement on this issue? This looks to be pretty useful |
If I run
colcon build
in~/ros2_ws/src
it will create the output folders in the~/ros2_ws/src
folder, i.e.:~/ros2_ws/src/build
~/ros2_ws/src/log
~/ros2_ws/src/install
Instead, you would expect them to end up in the top level directory, like
catkin_tools
does (so in~/ros2_ws
instead of~/ros2_ws/src
). Catkin tools marks the top level directory using the.catkin_tools
folder (likegit
does it by "going up" until it finds a.git
folder). I see that colcon doesn't have such a folder yet, so it doesn't have a way to determine the workspace top-level. Sooner or later I guess such a folder (e.g.~/ros2_ws/.colcon
) should be added anyway, to store things like profiles/configs (like catkin tools does).Maybe a good feature to add?
The text was updated successfully, but these errors were encountered: