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 744534 - Support CamelCase symbols
Support CamelCase symbols
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: g-ir-scanner
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-02-14 19:47 UTC by Garrett Regier
Modified: 2015-04-20 20:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
scanner: Add --symbol-filter-cmd (9.99 KB, patch)
2015-02-14 19:49 UTC, Garrett Regier
committed Details | Review

Description Garrett Regier 2015-02-14 19:47:28 UTC
In CoreFoundation, etc, we don't use lowercase underscore-separated names, but use names like CFStringCreateByCombiningStrings().  Because of it, g-i cannot associate methods for those types back to the type.

Any way you can add --symbol-filter-cmd in the same spirit as --identifier-filter-cmd?
Comment 1 Garrett Regier 2015-02-14 19:49:22 UTC
Created attachment 296843 [details] [review]
scanner: Add --symbol-filter-cmd

Add the command line flag --symbol-filter-cmd to g-ir-scanner
which allows running symbol names through a filtering shell
command. The symbol is sent as stdin to the filter command
and expects a filtered result written to stdout.
Comment 2 Garrett Regier 2015-04-10 21:49:50 UTC
This is blocking GObject-Introspection's use by third-parties.
Comment 3 Colin Walters 2015-04-11 14:06:07 UTC
Review of attachment 296843 [details] [review]:

Since identifier-filter-command was already added, this does seem logical.  I didn't review the earlier patch, but I would have preferred to avoid `shell=True`.  Oh well.

Otherwise looks quite straightforward.  Just one minor comment.

::: tests/scanner/symbolfilter.py
@@ +35,3 @@
+
+if __name__ == '__main__':
+    text = ensure_snake_case(sys.stdin.read())

This isn't very efficient, is there a reason not to do this line by line?
Comment 4 Garrett Regier 2015-04-11 15:49:37 UTC
(In reply to Colin Walters from comment #3)
> Review of attachment 296843 [details] [review] [review]:
> 
> Since identifier-filter-command was already added, this does seem logical. 
> I didn't review the earlier patch, but I would have preferred to avoid
> `shell=True`.  Oh well.
> 
> Otherwise looks quite straightforward.  Just one minor comment.
> 
> ::: tests/scanner/symbolfilter.py
> @@ +35,3 @@
> +
> +if __name__ == '__main__':
> +    text = ensure_snake_case(sys.stdin.read())
> 
> This isn't very efficient, is there a reason not to do this line by line?

This is copied from identfilter.py:
https://git.gnome.org/browse/gobject-introspection/tree/tests/scanner/identfilter.py#n48
Comment 5 Garrett Regier 2015-04-20 16:34:34 UTC
Ping?
Comment 6 Colin Walters 2015-04-20 20:48:02 UTC
Attachment 296843 [details] pushed as 7e5a553 - scanner: Add --symbol-filter-cmd
Comment 7 Colin Walters 2015-04-20 20:48:56 UTC
Sorry for the delay, pushed, thanks for the patch!

(BTW, what CoreFoundation project are you using this for?)