5 years, 7 months ago.

Program corrupted when "update all" used

My program consists of the MBED, mbed-rtos and c12832 libraries, plus one of my own libraries, plus .cpp and .h files. The program has worked before but today I recompiled it and got error messages (e.g "p5 undefined") that are not related to my source files. I did "update all" on the program. It deleted all of my .cpp and .h files except main.cpp and added the USBHost library. Can I recover the sources? What does "update all" do? I can't imagine it doing what it did.

1 Answer

5 years, 7 months ago.

Hi Alfred,

Unfortunately you won't be able to recover the source files unless you had committed the files or published them. You should have received the warning shown in the below attachment which shows that Update All will destroy uncommitted changes.

The intent of Update All is to first commit your files to your repo, and then use it to update all the libraries and the OS being utilized by the project.

We're sorry if you lost your work. If that's the case, we suggest you start using the version control system built into the Online Compiler. For reference:

Regards,

Ralph, Team Mbed

/media/uploads/RalphF/onlinecompiler-updateallmessage.png

Thanks for the explanation. On retrospect what happened to me is exactly what the message says would happen. I was "blinded" by the notion that it was an update of all libraries that were not up to date. I use committing and publishing. Great stuff!

posted by Alfred Hume 16 Oct 2018