-
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
usability enhancement: fail with a polite message when invoking in src
#369
Comments
Imo it isn't sufficient to check if the cwd is named I think what you want instead is the feature described in #139. Assuming that is the case I will go ahead and close this as a duplicate. |
#139 indeed would address this issue, but it's a superset of what is needed to solve this problem (and #366, and surely we're not the only two people to experience this first-hand and second-hand). #139 would "do the right thing" no matter where I agree checking if cwd is What if, instead, the tool checks to see that cwd has a subdirectory named |
That condition on its own is unfortunately also not sufficient to stop the invocation. While having a So I don't think #139 is imo the right way to handle this without compromising other use cases. For this case to be satisfied it isn't even necessary to implement the referenced ticket in full scope since it doesn't need to actually perform the invocation but only needs to detect the case and tell the user where to invoje the command instead. That subset should be much easier to implement since it mainly requires being able to identify a previously built workspace. |
Sometimes, due to rapid-fire directory navigation and having many unrelated items bouncing around in one's head, it's possible to invoke
colcon build
in thesrc
directory of a workspace, rather than in the "root" workspace directory. This will create a new set ofbuild
andinstall
directories as subdirectories ofsrc
but otherwise "seems to work" at least sometimes. This can lead to great confusion when other terminals have sourced the "original"install
directory.I can't quite think of a case where it's useful to run
colcon build
in a directory namedsrc
. I suggest thatcolcon
exits with a kind and polite message like "Because I love you, I won't do what you just asked me to do. Please go up a directory and try again. Have a nice day."I'm happy to create this PR, but wanted to ask first before proceeding.
The text was updated successfully, but these errors were encountered: