Closed ijnek closed 2 years ago
The expected behavior should be as you describe. The only caveat being the log file generated by colcon clean verb will repopulate the emptied log folder. E.g:
That being said, could you report back on the contents of that log file? Perhaps there was some warning or error in deleting those workspace directories, like any permission errors?
Sure, here's the log:
ijnek@ijnek-MS-7924:~/tmp_workspaces/ipm_ws$ cat log/latest_clean/logger_all.log
[0.373s] DEBUG:colcon:Command line arguments: ['/usr/bin/colcon', 'clean', 'workspace']
[0.373s] DEBUG:colcon:Parsed command line arguments: Namespace(log_base='log', log_level=None, verb_name='clean', subverb_name='workspace', verb_parser=<colcon_mixin.mixin.mixin_argument.MixinArgumentDecorator object at 0x7fbecf8977f0>, verb_extension=<colcon_clean.subverb.workspace.WorkspaceCleanSubverb object at 0x7fbed0231090>, main=<bound method WorkspaceCleanSubverb.main of <colcon_clean.subverb.workspace.WorkspaceCleanSubverb object at 0x7fbed0231090>>, yes=False, clean_match=None, clean_ignore=None, clean_no_linked_dirs=True, clean_no_linked_files=True, base_select=['build', 'install', 'log', 'test_result'], base_ignore=[], build_base='build', install_base='install', test_result_base='build', event_handlers=None, mixin_files=None, mixin=None, mixin_verb=('clean', 'workspace'))
ijnek@ijnek-MS-7924:~/tmp_workspaces/ipm_ws$
@ijnek , thanks for reporting this issue! Please check out https://github.com/colcon/colcon-clean/pull/28 .
I can confirm the changes fixed the problem, thanks @ruffsl
I've been wanting to try this out since the last Infrastructure office hours meeting, and finally got around to it today! With the package not available on PyPI yet (I believe it isn't?), I just installed it with
pip3 install .
, hoping that's the right way.I was expecting
colcon clean workspace
to do something similar torm -rf build/ install/ log/
orrm -rf build/* install/* log/*
, but files in the directories seem to remain. What is the expected behaviour?This is the behaviour I'm seeing:
On Ubuntu22.04.