Bug 34529 - dbus-specification should reserve the extra characters used in GVariant signatures
Summary: dbus-specification should reserve the extra characters used in GVariant signa...
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.5
Hardware: Other All
: medium enhancement
Assignee: Simon McVittie
QA Contact: Rob Taylor
URL:
Whiteboard: review+
Keywords: patch
Depends on:
Blocks: dbus-1.5
  Show dependency treegraph
 
Reported: 2011-02-21 04:32 UTC by Simon McVittie
Modified: 2014-09-25 14:19 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Reserve 'm', '*', '?', '@', '&' and '^' for their uses in GVariant (2.36 KB, patch)
2011-04-26 09:20 UTC, Simon McVittie
Details | Splinter Review
Clarify that 'r' and 'e' cannot appear in signatures (1.84 KB, patch)
2011-04-26 09:22 UTC, Simon McVittie
Details | Splinter Review

Description Simon McVittie 2011-02-21 04:32:25 UTC
GVariant uses D-Bus signatures plus extensions, without adding those extensions to dbus-specification. If we use those characters for anything in D-Bus, we'll become incompatible.

We should have something like:

    'm'    reserved for a 'maybe' type compatible with GVariant (Bug #27857),
           must not appear in signatures used on D-Bus until specified here

    '*'    reserved for bindings/implementations to represent any single
           complete type, must not appear in signatures used on D-Bus

    '?'    reserved for bindings/implementations to represent any basic type,
           must not appear in signatures used on D-Bus

    '@'    reserved for internal use in bindings/implementations,
           must not appear in signatures used on D-Bus

    '&'    reserved for internal use in bindings/implementations,
           must not appear in signatures used on D-Bus

    '^'    reserved for internal use in bindings/implementations,
           must not appear in signatures used on D-Bus

We could also consider something like this:

* reserve [a-zA-Z] for future type mnemonics
* reserve <>, [], "", '' for future bracket-like constructs
* reserve all other punctuation for internal use in bindings/implementations
Comment 1 Simon McVittie 2011-04-26 09:20:48 UTC
Created attachment 46092 [details] [review]
Reserve 'm', '*', '?', '@', '&' and '^' for their uses in GVariant
Comment 2 Simon McVittie 2011-04-26 09:22:44 UTC
Created attachment 46093 [details] [review]
Clarify that 'r' and 'e' cannot appear in signatures
Comment 3 Colin Walters 2011-04-26 11:40:42 UTC
In practice really everything not specified should be thought of as reserved; the bus daemon at least will just reject anything that it doesn't know about.

It's definitely useful to cross-link to GVariant, so these seem fine to me, but I don't think spelling out the rest of ASCII is necessary.
Comment 4 Simon McVittie 2011-04-27 10:05:59 UTC
Fixed in git for spec 0.17 (dbus 1.5.2)


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.