Skip to content

mbed compile does not fail when failing to parse mbed_app.json #481

@seppestas

Description

@seppestas

When there is invalid json in the mbed_app.json file, mbed compile will display an error message like e.g

Error parsing './mbed_app.json':
Expecting property name: line 14 column 1 (char 262)

However, it will not cause the command to fail, resulting in a binary that does not contain any of the configuration set in mbed_app.json and the error message to get lost in the output of the compilation. This is a problem that can be easily triggered by e.g improperly removing an entry in the target_overrides resulting in a trailing comma and thus invalid json.

Not failing on parsing the mbed_app.json file is also inconsistent with other errors related to the configuration like e.g overriding an undefined parameter, which causes mbed compile to fail with an error message like

[ERROR] Attempt to override undefined parameter 'target.fubar' in 'application[SOME_TARGET]'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions