Closed 0xc0170 closed 7 years ago
Looking into it now. Thanks for the bug report @0xc0170 !
Reproduced. Kills everything, not just the git repo.
The problem is that we are cleaning in two places, one within project.py
and the other within project_api.py
. Given that the export_path
may be the same as the project path, and that the tools.paths.EXPORT_DIR
is never equal to the project path, we should probably be 'cleaning' the latter. Further, I'm not sure what a user would expect the clean flag to do.
I just tried switching out all of the cleaning for git clean -fe mbed-os, and I have to say it's pretty nice.
eg:
Removing Makefile
Removing mbed-os-example-blinky.uvopt
Removing mbed-os-example-blinky.uvproj
Removing mbed_config.h
Build Options: debug-info
Scan: .
Scan: FEATURE_COMMON_PAL
Scan: FEATURE_UVISOR
Scan: FEATURE_BLE
Scan: FEATURE_CLIENT
Scan: FEATURE_IPV6
Scan: FEATURE_IPV4
Scan: FEATURE_STORAGE
It tells you what it's removing!
I'll put up a PR, and we can discuss alternate implementations there.
Thanks @theotherjimmy for looking at this, I'll have a look at that PR
I'm thinking that doing a clean before exporting will be an mbed-cli issue in the future. I might just re-open that PR with the first commit in the series.
@theotherjimmy What's the status ? I noticed that PR was closed.
I'm thinking that doing a clean before exporting will be an mbed-cli issue in the future. I might just re-open that PR with the first commit in the series.
ARM Internal Ref: IOTMORF-481
Description
Bug
Target Any
Toolchain: Any
Toolchain version:
mbed-cli version: 0.9.1 (I tried 0.9.5, the same result)
meed-os sha: dd5649d92b2d292cd94e0a784cb0f2b65b3f2e84
Steps to reproduce
Export a simple project like blinky, or don't probably need to even export. Run
mbed export -c -i uvision
, and your .git folder disappears and you get errors that your example is not git repository anymore.@theotherjimmy @sarahmarshy