ARMmbed / ARMmbed/mbed-cli

Only rewrite config when there are changes

Open
#994 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
339
Forks
187
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at mbed/mbed.py around line 3300 and inspect how `mbed toolchain GCC_ARM` reads and writes `.mbed`. Verify the behavior when the selected value is already present. Done means unchanged configuration does not update the file timestamp, while an actual toolchain change still updates `.mbed`.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.