Bug 24638

Summary: Should infer type from tp:type if possible
Product: Telepathy Reporter: Sjoerd Simons <sjoerd>
Component: tp-specAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED WONTFIX QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Sjoerd Simons 2009-10-20 03:58:30 UTC
When writing a new API it's quite annoying that one needs to specify both the type and the tp:type on all methods/properties/signals, especially for slightly more complex type that are used a lot. I just changed one type and then had to fix it in 5 other places :(

The spec parser already has this information as it validates the type you specify manually..
Comment 1 Simon McVittie 2010-03-02 05:53:44 UTC
I'm not sure that this is a good idea; it would mean that the Telepathy spec format was no longer a superset of D-Bus introspection. Would consistency checking (Bug #24085) be enough?
Comment 2 Simon McVittie 2010-05-06 07:45:36 UTC
I don't think this is worth the cost (which is that our spec format is no longer a superset of D-Bus introspection). If we were going to make a more streamlined source format for telepathy-spec that dropped the superset-of-introspection property, it probably wouldn't be XML.

In Bug #24085 I added proper cross-checking of type against tp:type; when that's merged, you'll still need to change it in all n places, but at least you'll be told if you missed one.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.