[Bug]: Obscure json deserialization errors are hard to track down
Checklist
- [X] I agree to follow the Code of Conduct that this project adheres to.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.
flatpak-builder version
1.2.2
Flatpak version
1.12.7
How to reproduce
- Add a manifest from, say, shared-modules in your manifest (either json or yml)
- Forget to add the shared-modules submodules.
Expected Behavior
It actually tells me "can't find manifest manifest.json at line XYZ
Actual Behavior
flatpak-builder will output an error:
(flatpak-builder:227308): Json-WARNING **: 18:30:09.738: Failed to deserialize "modules" property of type "gpointer" for an object of type "BuilderModule"
Which gives no indication whatsoever to what the error is and where it is.
Additional Information
Issue #318 isn't dissimilar to this, but it was crashing.
The obscure error message occurs for other structures errors in the manifest like misplaced sources or modules.
Also I wanted to add that ideally these error should also be fatal. Like compilation error.
Instead it tries to build stuff and inexplicably fails, and because the error message is buried in the log at the begining, it gets missed to not say ignore. It's a warning after all.
There are more minor things that actually are fatal errors.
Its fatal as of 6286d468b4cbdc83a261078d7a0d660241f33320 (unreleased)