GNOME Bugzilla – Bug 618930
vapigen can't rename an object member when it conflicts with a signal name
Last modified: 2017-03-08 14:02:00 UTC
I ran into this as of this commit of my vala bindings branch of telepathy-glib: http://git.collabora.co.uk/?p=user/treitter/telepathy-glib.git;a=commit;h=e82e8621c13a391f241938e97c3629867a673015 In vala/telepathy-glib.metadata, if you change this line: TpProxy::invalidated name="invalidated_event" to TpProxy.invalidated name="invalidated_error" , then you get this error: telepathy-glib.gi:0.0-0.0: error: `Tp.Proxy' already contains a definition for `invalidated' telepathy-glib.gi:0.0-0.0: note: previous definition of `invalidated' was here Generation failed: 1 error(s), 0 warning(s) The core problem is that TpProxy contains both a member named "invalidated" and a signal named "invalidated". I can hide the member or rename the signal (in which case I can't connect to it), but I can't rename the member.
Same problem seem with .vapi generation for rhythmbox. Extract of relevant bits from rhythmbox's rhythmbox.gi file: <object name="RhythmDBImportJob" parent="GObject" type-name="RhythmDBImportJob" get-type="rhythmdb_import_job_get_type"> <method name="complete" symbol="rhythmdb_import_job_complete"> <return-type type="gboolean"/> <parameters> <parameter name="job" type="RhythmDBImportJob*"/> </parameters> </method> <signal name="complete" when="LAST"> <return-type type="void"/> <parameters> <parameter name="job" type="RhythmDBImportJob*"/> <parameter name="total" type="gint"/> </parameters> </signal> </object> Fails with: rhythmbox.gi:0.0-0.0: error: `RhythmDB.ImportJob' already contains a definition for `complete' rhythmbox.gi:0.0-0.0: note: previous definition of `complete' was here rhythmbox.gi:0.0-0.0: error: `RhythmDB.ImportJob' already contains a definition for `scan_complete' rhythmbox.gi:0.0-0.0: note: previous definition of `scan_complete' was here Generation failed: 2 error(s), 0 warning(s) For now I've taken to patching the .gi manually after vala-gen-introspect is run.
*** This bug has been marked as a duplicate of bug 731547 ***