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 643197 - g_application_id_is_valid docs imply no valid ids
g_application_id_is_valid docs imply no valid ids
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gapplication
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-02-24 14:44 UTC by Morten Welinder
Modified: 2011-02-25 16:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2011-02-24 14:44:32 UTC
The listed requirements for application ids mean that no such ids exist:

 *   <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-" and must not begin with a digit.</listitem>
 *   <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least two elements).</listitem>

The first says "no dots", the second says "at least one dot".

Further, the code disagrees with the docs.  For example, the code requires
a letter first, the docs are happy with a hyphen.  Also, the documented
requirement for a dot to be present is not seen in the code.

Finally, I am guessing that a terminal dot ("Foo.") should not be allowed,
but both code and docs allow it.
Comment 1 Matthias Clasen 2011-02-25 16:15:49 UTC
That the code doesn't check all the restrictions on the ids does not mean that the restrictions are wrong.

But i've tightened this up now, and added tests.