ARMmbed / mbed-cli

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

Only rewrite config when there are changes #994

Open ghseb opened 3 years ago

ghseb commented 3 years ago

It seems that the command mbed toolchain GCC_ARM modifies (updates the change timestamp) the configuration file (.mbed) even if the value does not change. This can be a problem at least in mbed-os-5 because modifying the file .mbed forces a full recompilation.

Probably first reading the configuration and only updating the file when something actually changed would be a superior behaviour.

Related source: https://github.com/ARMmbed/mbed-cli/blob/76c92d07f77c8571e734e4ea122d51e93489893b/mbed/mbed.py#L3300