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 711598 - gtkdoc-scan doesn't ignore decorators containing parentheses
gtkdoc-scan doesn't ignore decorators containing parentheses
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.20
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-07 11:03 UTC by Carlos Garcia Campos
Modified: 2014-02-09 11:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkdoc-scan: Ignore decorators containing parentheses (9.98 KB, patch)
2013-11-07 11:10 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2013-11-07 11:03:50 UTC
Even if you pass the right regular expression in --ignore-decorator the global regexp never maches because it has a \b right after the decorator block. For example, libsoup is using --ignore-decorators='SOUP_DEPRECATED\w*\s*\([^)]*\)|SOUP_DEPRECATED\w*|SOUP_AVAILABLE\w*'. We have found the same problem in WebKit after introducing WEBKIT_DEPREACTER_FOR(), in our case it's even worse because we use the type in the previous line, and since the regexp fails, the whole function not detected and not included in the docs.
Comment 1 Carlos Garcia Campos 2013-11-07 11:10:46 UTC
Created attachment 259171 [details] [review]
gtkdoc-scan: Ignore decorators containing parentheses

This fixes the problem and all tests keep passing.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-15 14:31:42 UTC
Review of attachment 259171 [details] [review]:

::: gtkdoc-scan.in
@@ +458,3 @@
             # FUNCTION POINTER VARIABLES
             #                                                                       $1                                $3            $4             $5
+            } elsif (m/^\s*(?:\b(?:extern|G_INLINE_FUNC|${IGNORE_DECORATORS})\s*)*((const\s+|G_CONST_RETURN\s+)?\w+)(\s+const)?\s*(\**)\s*\(\*\s*(\w+)\)\s*\(/o) {

please ajust the ${1,...} as well
Comment 3 Carlos Garcia Campos 2014-01-15 17:45:10 UTC
Comment on attachment 259171 [details] [review]
gtkdoc-scan: Ignore decorators containing parentheses

Pushed with the comments updated.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-22 22:13:12 UTC
Actually this breaks the tests:
$ make check
Running suite(s): gtk-doc-tester
./tester-undeclared.txt:1:E: 1 undeclared symbols
75.0%: Checks 4, Failures: 1
FAIL: bugs.sh

$ cat tests/bugs/docs/tester-undeclared.txt
bug_711598


commit 21a0c5ea974dd5dfc2701e00853d4308be0d51ce
Author: Stefan Sauer <ensonic@users.sf.net>
Date:   Wed Jan 22 23:12:16 2014 +0100

    tests: fix the tests
    
    The void probably did ended up on the wrong line by mistake.
Comment 5 Carlos Garcia Campos 2014-01-23 19:19:00 UTC
This is weird, because it passes for me, see:

============================================================================
Testsuite summary for gtk-doc 1.19.1
============================================================================
# TOTAL: 7
# PASS:  7
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

The void was in that place on purpose, because it's the style used by webkit, which is what I was trying to fix.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-23 20:54:44 UTC
This looks different here:

100 %: Checks 17, Failures: 0
PASS: tools.sh
Running suite(s): gtk-doc-tester
100.0%: Checks 4, Failures: 0
PASS: gobject.sh
Running suite(s): gtk-doc-tester
100.0%: Checks 4, Failures: 0
PASS: bugs.sh
Running suite(s): gtk-doc-tester
100.0%: Checks 4, Failures: 0
PASS: annotations.sh
Running suite(s): gtk-doc-fail
100 %: Checks 4, Failures: 0
PASS: fail.sh
Running suite(s): gtk-doc-tester
100.0%: Checks 4, Failures: 0
PASS: empty.sh
Running suite(s): gtk-doc-sanity
100 %: Checks 4, Failures: 0
PASS: sanity.sh
==================
All 7 tests passed
==================