flatpak-builder icon indicating copy to clipboard operation
flatpak-builder copied to clipboard

[Bug]: Obscure json deserialization errors are hard to track down

Open hfiguiere opened this issue 3 years ago • 2 comments

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

  1. Add a manifest from, say, shared-modules in your manifest (either json or yml)
  2. 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.

hfiguiere avatar Aug 04 '22 22:08 hfiguiere

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.

hfiguiere avatar Aug 05 '22 01:08 hfiguiere

Its fatal as of 6286d468b4cbdc83a261078d7a0d660241f33320 (unreleased)

TingPing avatar Aug 06 '22 17:08 TingPing