GNOME Bugzilla – Bug 650874
codegen chokes on docs
Last modified: 2011-05-24 03:24:55 UTC
gdbus-codegen will choke on files such as this one: http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/datetime/gsd-datetime-mechanism.xml Traceback (most recent call last):
+ Trace 227226
sys.exit(codegen_main())
parsed_ifaces = parser.parse_dbus_xml(xml_data)
parser = DBusXMLParser(xml_data)
self._parser.Parse(xml_data)
raise RuntimeError('Cannot go from state "%s" to element with name "%s"'%(self.state, name))
Docs should just be ignored (or maybe added as gtk-doc?)
Yeah, we should definitely just ignore elements we don't know/care about. FWIW, I saw this last week but for some reason didn't fix it or file a bug.
Better error messages would be nice too. Especially in a format so e.g. emacs can parse them (e.g. <file>:<line>: <complaint>).
OK, fixed here including tests: http://git.gnome.org/browse/glib/commit/?id=263ce3042ccf596f5cd59b1defa546df2602597d