-
Notifications
You must be signed in to change notification settings - Fork 28
Use Pydantic schemas to validate Mbed's JSON files (part 1) #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 9 commits
29b3d64
4ead881
6b03241
15fa326
69773b8
37eb1c8
7956f2c
bac95f0
8aab639
753d2d3
6061fba
1a59256
3d2dcc2
342edb2
e6bff90
54ce011
23e9c7d
bfcc22d
04b7bd8
c1a8ee1
4709771
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| { | ||
| "name": "rtos", | ||
| "config": { | ||
| "present": 1, | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing these legacy config defines everywhere. |
||
| "main-thread-stack-size": { | ||
| "help": "The size of the main thread's stack", | ||
| "value": 4096 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| { | ||
| "name": "ble", | ||
| "requires": ["ble-api-implementation"], | ||
| "config": { | ||
| "present": 1, | ||
| "ble-role-observer": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| { | ||
| "name": "cordio-stm32wb", | ||
| "requires": ["cordio", "ble"] | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am removing all remaining vestiges of this "requires" system in this PR. This dates back from Mbed CLI 1 and could be used to specify dependencies between libraries. Now, library dependencies should be, and are, specified via CMake, and this system was serving only to exclude non-required libraries' mbed_lib.json5 files from processing if the user added "requires" to their mbed_app.json5 file. This does mean that users no longer have the option to speed up JSON processing / reduce the number of MBED_CONF_xxx defines via using |
||
| "name": "cordio-stm32wb" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| { | ||
| "name": "lwip", | ||
| "config": { | ||
| "present": 1, | ||
| "ipv4-enabled": { | ||
| "help": "Enable IPv4", | ||
| "value": true | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| { | ||
| "name": "nanostack-interface", | ||
| "requires": ["nanostack"] | ||
| "name": "nanostack-interface" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "name": "cy_psoc6csp_rtos", | ||
| "config": { | ||
| "present": 1 | ||
| } | ||
| "name": "cy_psoc6csp_rtos" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,3 @@ | ||
| { | ||
| "name": "psa-services", | ||
| "requires": [ | ||
| "drivers", | ||
| "platform", | ||
| "mbedtls", | ||
| "storage", | ||
| "flashiap-block-device", | ||
| "kv-global-api", | ||
| "storage_tdb_internal" | ||
| ] | ||
| "name": "psa-services" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| { | ||
| "name": "bare-metal", | ||
| "requires": ["platform", "drivers", "rtos-api", "mbed-trace", "blockdevice"] | ||
| "name": "bare-metal" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ | |
| }, | ||
| "color-theme": { | ||
| "help": "Set color theme. 0 for readable, 1 for unobtrusive.", | ||
| "options": [0, 1], | ||
| "accepted_values": [0, 1], | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As far as I could tell, there was no accepted way to specify the range of legal values for an option until now. So, people added stuff like this as "wishful thinking" / for documentation only (remember this was json so you couldn't have comments). This PR turns this wish into a reality with the new |
||
| "macro_name": "MBED_TRACE_COLOR_THEME", | ||
| "value": 0 | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "name": "rtos-api", | ||
| "config": { | ||
| "present": 1 | ||
| } | ||
| "name": "rtos-api" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "name": "filesystem", | ||
| "config": { | ||
| "present": 1 | ||
| } | ||
| "name": "filesystem" | ||
| } |
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no idea what this file was for as it's in an empty folder, I removed it. |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| { | ||
| "name": "kv-global-api", | ||
| "requires": ["kvstore"] | ||
| "name": "kv-global-api" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my reverse engineering of the code, using overrides and target_overrides at the same time used to be unsafe (though this should be fixed now)