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 769995 - gdbus-codegen: Allow '@since: UNRELEASED' in documentation comments
gdbus-codegen: Allow '@since: UNRELEASED' in documentation comments
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-08-16 15:49 UTC by Philip Withnall
Modified: 2016-08-16 20:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdbus-codegen: Allow '@since: UNRELEASED' in documentation comments (1.62 KB, patch)
2016-08-16 15:49 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2016-08-16 15:49:01 UTC
Trivial patch attached.
Comment 1 Philip Withnall 2016-08-16 15:49:06 UTC
Created attachment 333430 [details] [review]
gdbus-codegen: Allow '@since: UNRELEASED' in documentation comments

Previously, this would not work, as it would result in comparing the
order of a string and an integer. Make it work, and make 'UNRELEASED'
compare higher than other versions so it's always treated as the latest
version.

'UNRELEASED' is commonly used by maintainers to highlight new API while
it's being prototyped, until they know which version it will actually
be released in. At the time of release, they replace all 'UNRELEASED'
strings in git with the new version number.
Comment 2 Colin Walters 2016-08-16 17:28:40 UTC
Review of attachment 333430 [details] [review]:

I haven't seen that, but I believe you that it's used.  Some sort
of real-world reference in the commit message would be useful, like:

For example, see: https://github.com/foobar/baz and https://git.gnome.org/gnome-somegame

::: gio/gdbus-2.0/codegen/utils.py
@@ +103,3 @@
+        v = '9999'
+    elif key[0]:
+        v = str(key[0])

Is there a reason you're sneaking in another call to `str` out of curiosity?
Comment 3 Philip Withnall 2016-08-16 20:42:18 UTC
Pushed with an example added, thanks. The sneaky extra `str()` was to ensure all the keys are always strings (since I don't think type conversion works when doing ordered comparisons, for good reason).

Attachment 333430 [details] pushed as 15b315b - gdbus-codegen: Allow '@since: UNRELEASED' in documentation comments