better error message for not-found types (and other errors)
Submitted by Colin Walters
Link to original bug (#570818)
Description
We really need an at least slightly better developer experience than:
** WARNING **: Can't resolve type 'KeySym' for field Meta.KeyBinding.keysym
Aborting
I think for each symbol in the C AST we parse, we should keep track of file+line+column if we're not already. Then for each ast.py object, keep track of its source(s) in the C AST. Finally when we hit an error like this not found type (which should btw actually be caught in g-ir-scanner, not g-ir-compiler), we can output e.g.:
warning: foo.c:42: Unknown C symbol KeySym
Possibly add hyperlinks to live.gnome.org wiki for each error.
Edited by Christoph Reiter