Skip to content

Conversation

@multiplemonomials
Copy link
Collaborator

Summary of changes

🚨 Huge quality of life improvement!🚨

One of my biggest gripes with Mbed's build system in my last few years as a developer is the need to manually trigger Python configuration (by deleting mbed_config.cmake or doing a full reconfigure) after editing certain json files, such as targets.json5 or any mbed_lib.json files in the source tree.

This MR fixes that huge annoyance properly by having the Python scripts output a full list of all JSON files used in the build, then setting a CMake configure dependency on those files. Changing them will cause CMake to get rerun, and when the build script notices that the timestamp has changed on any of the files, it will automatically rerun the Python configuration. Bam! No more manually tracking what we have edited and whether it requires a full reconfigure.

Impact of changes

  • Build system now tracks all dependencies on JSON files and will do a full reconfigure if any of them change
  • Cleanup: remove Mbed Tools build command (no longer works with Mbed CE build system)
  • Cleanup: simplify path handling inside Mbed Tools python package

Migration actions required

Documentation

None


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[X] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Tested locally and it is able to track dependencies!

@multiplemonomials multiplemonomials merged commit 722c2f1 into master Dec 30, 2024
52 checks passed
@multiplemonomials multiplemonomials deleted the dev/cmake-depend-on-json-files branch December 30, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants