You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
code generator currently relies on the python traceback to provide insight on failure of compiling the schema.
It would be good to at least see the offending schema line to be able to more easily correct issues.
CFGDB app-config.cfgdb app-data.cfgdb defs.cfgdb
Parsing app-config ...
Parsing app-data ...
Parsing defs ...
Traceback (most recent call last):
File "/home/pjakobs/devel/esp_rgbww_firmware/Components/ConfigDB/tools/dbgen.py", line 1406, in <module>
main()
File "/home/pjakobs/devel/esp_rgbww_firmware/Components/ConfigDB/tools/dbgen.py", line 1395, in main
parse_database(db)
File "/home/pjakobs/devel/esp_rgbww_firmware/Components/ConfigDB/tools/dbgen.py", line 679, in parse_database
parse_properties(root, database.schema['properties'])
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'properties'
make: *** [/home/pjakobs/devel/esp_rgbww_firmware/Components/ConfigDB/component.mk:25: /home/pjakobs/devel/esp_rgbww_firmware/out/ConfigDB/app-config.h] Fehler 1
The text was updated successfully, but these errors were encountered:
Agree this would be helpful. I note that JSON formatting errors already do this, but that's a feature of the python JSON decoder.
It would be nice if errors like the one above could be caught by the schema validator, since properties isn't optional here. The code generator runs the schema through though a Draft7Validator but don't think its ever actually caught anything! Maybe some kind of custom schema to validate the .cfgdb schema would help.
I can't see any direct way to associate line numbers with decoded JSON, but it would be fairly straightforward to track and print the parsing location as a JSON pointer (e.g. basic_config/properties/channels/items/properties/pin/default)
code generator currently relies on the python traceback to provide insight on failure of compiling the schema.
It would be good to at least see the offending schema line to be able to more easily correct issues.
The text was updated successfully, but these errors were encountered: