After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 618930 - vapigen can't rename an object member when it conflicts with a signal name
vapigen can't rename an object member when it conflicts with a signal name
Status: RESOLVED DUPLICATE of bug 731547
Product: vala
Classification: Core
Component: Code Generator
0.8.x
Other Linux
: Normal minor
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-17 20:55 UTC by Travis Reitter
Modified: 2017-03-08 14:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Travis Reitter 2010-05-17 20:55:49 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.
Comment 1 Daniel Hams 2010-07-08 14:46:40 UTC
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.
Comment 2 Rico Tzschichholz 2017-03-08 14:02:00 UTC

*** This bug has been marked as a duplicate of bug 731547 ***