ARMmbed / mbed-cli

Arm Mbed Command Line Interface
https://os.mbed.com
Apache License 2.0
333 stars 175 forks source link

Should have a clean command #102

Closed adbridge closed 8 years ago

adbridge commented 8 years ago

There should be an easy way to clean up the build environment e.g.

mbed clean

It is possible to currently run

mbed compile --clean but this is intended to build straight after cleaning which may not be desired.

screamerbg commented 8 years ago

PR #221 introduces mbed update --clean --clean-files which also cleans the build directory.

Perhaps this is not exactly what you're looking for, yet I can't think of a faster way to clean the build directory than rm -fr .build.

Closing for now, but feel free to reopen if you think this is a requirement.

geky commented 8 years ago

Some thoughts:

  1. When on an unfamiliar OS, cleaning a build is unnecessarily difficult. For example del .build on windows fails quietly if the folder is open, and navigating to the appropriate location just to find out why is disruptive.
  2. Correct me if I'm wrong, but mbed update --clean --clean-files destroys uncomitted changes. This is bad. IMO --clean should not be used a normal workflow.
  3. mbed compile --clean is the best solution right now, but is very annoying to use if you have the habit of using arrow keys/C-r to repeat previous commands. Doing a clean is sometimes necessary, and everytime I find myself wasting minutes when I accidentally clean the second time on a build.