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 707717 - Support "Deprecated: X.Y"
Support "Deprecated: X.Y"
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.20
Other All
: Normal normal
: 1.20
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-08 12:24 UTC by Sébastien Wilmet
Modified: 2014-02-07 07:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix "Deprecated: X.Y" without additional message (1.51 KB, patch)
2013-09-24 14:38 UTC, Sébastien Wilmet
none Details | Review
Test "Deprecated: X.Y" without additional message (2.39 KB, patch)
2013-09-24 14:38 UTC, Sébastien Wilmet
reviewed Details | Review
Fix "Deprecated: X.Y" without additional message (1.50 KB, patch)
2014-02-06 17:23 UTC, Sébastien Wilmet
committed Details | Review
GtkdocObject.html (32.05 KB, text/html)
2014-02-06 20:21 UTC, Sébastien Wilmet
  Details
Test "Deprecated: X.Y" without additional message (2.48 KB, patch)
2014-02-06 20:27 UTC, Sébastien Wilmet
committed Details | Review
Fix deprecation version without message (2.03 KB, patch)
2014-02-07 00:05 UTC, William Jon McCann
committed Details | Review
Fix deprecation version without message (2.04 KB, patch)
2014-02-07 07:08 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review
Test "Deprecated: X.Y" without additional message (2.49 KB, patch)
2014-02-07 07:08 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review
Fix "Deprecated: X.Y" without additional message (1.51 KB, patch)
2014-02-07 07:08 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Sébastien Wilmet 2013-09-08 12:24:11 UTC
When using:

> Deprecated: X.Y: Use blah() instead.

The result is:

> foo has been deprecated since version X.Y and should not be used in
> newly-written code. Use blah() instead.

But when using:

> Deprecated: X.Y

The result is:

> foo is deprecated and should not be used in newly-written code. X.Y

Instead, it should be:

> foo has been deprecated since version X.Y and should not be used in
> newly-written code.
Comment 1 Sébastien Wilmet 2013-09-24 14:38:51 UTC
Created attachment 255633 [details] [review]
Fix "Deprecated: X.Y" without additional message

When we want to deprecate a symbol without adding an additional message,
like "Use blah() instead". It can be useful when there is no
replacement, or when we are lazy.
Comment 2 Sébastien Wilmet 2013-09-24 14:38:55 UTC
Created attachment 255634 [details] [review]
Test "Deprecated: X.Y" without additional message
Comment 3 Sébastien Wilmet 2013-12-07 23:45:00 UTC
Someone for reviewing the above simple patches? It would be much appreciated. This bug happens quite often in the GTK+ documentation.
Comment 4 Sébastien Wilmet 2014-02-06 17:23:26 UTC
Created attachment 268314 [details] [review]
Fix "Deprecated: X.Y" without additional message

When we want to deprecate a symbol without adding an additional message,
like "Use blah() instead". It can be useful when there is no
replacement, or when we are lazy.
Comment 5 Sébastien Wilmet 2014-02-06 17:25:46 UTC
I've updated the patch, but there is now another problem:

> gtkdoc_object_do_not_use has been deprecated since version 3.10 and should not be used in newly-written code.
>
> 3.10

I think the "3.10" on the separate line is a regression, it didn't happen before.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-06 20:13:42 UTC
Sorry for missing the patch. This looks good, but I don't understand your last comment?
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-06 20:20:34 UTC
Review of attachment 255634 [details] [review]:

::: tests/gobject/src/gobject.h
@@ +101,3 @@
 void gtkdoc_object_frobnicate (GObject *self, gint n);
 gboolean gtkdoc_object_fooify (GObject *self, ...);
+void gtkdoc_object_do_not_use (GObject *self);

../../../tests/gobject/src/gobject.c:239: warning: gtkdoc_object_do_not_use is deprecated in the inline comments, but no deprecation guards were found around the declaration. (See the --deprecated-guards option for gtkdoc-scan.)

Please add deprecation guards:
#ifndef GTKDOC_DEPRECATED
void gtkdoc_object_do_not_use (GObject *self);
#endif
Comment 8 Sébastien Wilmet 2014-02-06 20:21:17 UTC
Created attachment 268337 [details]
GtkdocObject.html

See the warning in gtkdoc_object_do_not_use(). There is the "3.10" number alone on a separate line.
Comment 9 Sébastien Wilmet 2014-02-06 20:27:42 UTC
Created attachment 268339 [details] [review]
Test "Deprecated: X.Y" without additional message
Comment 10 Sébastien Wilmet 2014-02-06 20:30:17 UTC
(In reply to comment #8)
> See the warning in gtkdoc_object_do_not_use(). There is the "3.10" number alone
> on a separate line.

The generated html code:

<div class="warning">
<h3 class="title">Warning</h3>
<p><code class="literal">gtkdoc_object_do_not_use</code> has been deprecated since version 3.10 and should not be used in newly-written code. </p>
<p> 3.10</p>
</div>
Comment 11 William Jon McCann 2014-02-07 00:05:57 UTC
Created attachment 268365 [details] [review]
Fix deprecation version without message
Comment 12 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-07 07:06:00 UTC
Review of attachment 268365 [details] [review]:

::: gtkdoc-mkdb.in
@@ +3079,1 @@
+        $desc .= "<warning><para><literal>$symbol</literal>";

misses a trainling spece in the message. will add this and push. thanks!
Comment 13 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-07 07:08:09 UTC
The following fixes have been pushed:
4530527 Fix deprecation version without message
24d5ca3 Test "Deprecated: X.Y" without additional message
fb4b420 Fix "Deprecated: X.Y" without additional message
Comment 14 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-07 07:08:22 UTC
Created attachment 268373 [details] [review]
Fix deprecation version without message
Comment 15 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-07 07:08:26 UTC
Created attachment 268374 [details] [review]
Test "Deprecated: X.Y" without additional message
Comment 16 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-07 07:08:30 UTC
Created attachment 268375 [details] [review]
Fix "Deprecated: X.Y" without additional message

When we want to deprecate a symbol without adding an additional message,
like "Use blah() instead". It can be useful when there is no
replacement, or when we are lazy.