GNOME Bugzilla – Bug 707717
Support "Deprecated: X.Y"
Last modified: 2014-02-07 07:08:30 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.
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.
Created attachment 255634 [details] [review] Test "Deprecated: X.Y" without additional message
Someone for reviewing the above simple patches? It would be much appreciated. This bug happens quite often in the GTK+ documentation.
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.
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.
Sorry for missing the patch. This looks good, but I don't understand your last comment?
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
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.
Created attachment 268339 [details] [review] Test "Deprecated: X.Y" without additional message
(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>
Created attachment 268365 [details] [review] Fix deprecation version without message
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!
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
Created attachment 268373 [details] [review] Fix deprecation version without message
Created attachment 268374 [details] [review] Test "Deprecated: X.Y" without additional message
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.