-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
Looking at build.py, the dev flag is described as "enable developer mode (does not use target-locked.json)":
Line 46 in 1a3d477
| parser.add_option('-d', '--dev', dest='dev', action="store_true", help='enable developer mode (does not use target-locked.json)', default=False) |
There is also another way to "enable developer mode" by setting the "target.dev": true key in codal.json. This mode is processed in the CMake files and it read target-locked.json instead of target.json from codal-microbit-v2:
microbit-v2-samples/CMakeLists.txt
Lines 67 to 73 in 1a3d477
| if("${codal.target.dev}" STRGREATER "") | |
| file(READ "./${LIB_DEST}/${codal.target.name}/target.json" device_json) | |
| message("${BoldMagenta}Using target.json (dev version) ${ColourReset}") | |
| else() | |
| file(READ "./${LIB_DEST}/${codal.target.name}/target-locked.json" device_json) | |
| message("${BoldMagenta}Using target-locked.json${ColourReset}") | |
| endif() |
The build.py --dev flag it's only used:
- When the
--updateflag is used to update (git pull) the libraries:- build.py#L61
- In this case a build.py does not invoke any CMake files, so it never uses target-locked.json or target.json
- So in this case, the build.py description of the
--devflag does not quite apply
- When the "target" command argument is used (e.g.
python build.py codal-microbit --dev)- build.py#L116
- In this case it completely overwrites the codal.json to include this flag, and incidentally loses all other configured options from the file
- Also, this needs an existing target to be specified in utils/targets.json, which right now does not contain an entry for codal-microbit-v2
- So this is either an obsolete option, or something that needs to be updated for micro:bit V2
With the normal python build.py invocation with the --dev flag does not do anything at all, which is also a bit confusing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels