Bug 56218

Summary: [Patch] Building Poppler-0.18.gir should not give warnings
Product: poppler Reporter: Hib Eris <hib>
Component: glib frontendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: hib
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: 0001-Show-all-suppressed-introspection-scanner-warnings.patch
0002-Include-Gio-2.0-for-introspection.patch
0003-Exclude-poppler-input-stream.h-from-introspection-fi.patch
Patch to fix yet another warnings

Description Hib Eris 2012-10-20 08:28:56 UTC
Building Poppler-0.18.gir gives a warning:

g-ir-scanner: Poppler: warning: 5 warnings suppressed (use --warn-all to see them)

I will post some patches to show and try to fix the warnings.
Comment 1 Hib Eris 2012-10-20 08:29:34 UTC
Created attachment 68830 [details] [review]
0001-Show-all-suppressed-introspection-scanner-warnings.patch
Comment 2 Hib Eris 2012-10-20 08:31:15 UTC
Created attachment 68831 [details] [review]
0002-Include-Gio-2.0-for-introspection.patch

I am not sure this is the right thing to do, I do not have much understanding of introspection.
Comment 3 Hib Eris 2012-10-20 08:33:19 UTC
Created attachment 68833 [details] [review]
0003-Exclude-poppler-input-stream.h-from-introspection-fi.patch

poppler-input-stream.h seems to be a private header file. Therefor, as far as I understand it, it should not be included in introspection_files.
Comment 4 Albert Astals Cid 2012-11-19 21:22:11 UTC
Carlos or anyone with glib experience, could you guys have a look at this one?
Comment 5 Jose Aliste 2012-11-19 22:32:37 UTC
Comment on attachment 68831 [details] [review]
0002-Include-Gio-2.0-for-introspection.patch

Review of attachment 68831 [details] [review]:
-----------------------------------------------------------------

This look goods to me. Not only resolves the warnings, but also makes poppler_document_new_from_stream" and poppler_document_new_from_gfile introspectable.
Comment 6 Jose Aliste 2012-11-19 22:34:32 UTC
Comment on attachment 68833 [details] [review]
0003-Exclude-poppler-input-stream.h-from-introspection-fi.patch

Review of attachment 68833 [details] [review]:
-----------------------------------------------------------------

This does not hurt, as poppler-input-stream is private... but the fact that this warning appears might be a bug in the gir-scanner as the inputStreamBufSize is inside a #ifndef __GI_SCANNER__
Comment 7 Jose Aliste 2012-11-19 22:53:51 UTC
Created attachment 70288 [details] [review]
Patch to fix yet another warnings

while reviewing/testing hib's patches, I discover some small typos in the documentation of some functions they were mising the : at the end. This patches fixes that and supress the warnings that I get with the gir-scanner in my machine. The gir file does not change with this patch
Comment 8 Jose Aliste 2012-11-19 22:54:58 UTC
Comment on attachment 68830 [details] [review]
0001-Show-all-suppressed-introspection-scanner-warnings.patch

Review of attachment 68830 [details] [review]:
-----------------------------------------------------------------

With other Hib patches and my last patch, we should not get any warnings anymore, so enabling the warnings to keep the sanity seems a good idea to me.
Comment 9 Albert Astals Cid 2012-11-19 23:22:34 UTC
Carlos? Commit?
Comment 10 Hib Eris 2012-11-20 06:08:59 UTC
(In reply to comment #5)
> Comment on attachment 68831 [details] [review] [review]
> 0002-Include-Gio-2.0-for-introspection.patch
> 
> Review of attachment 68831 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> This look goods to me. Not only resolves the warnings, but also makes
> poppler_document_new_from_stream" and poppler_document_new_from_gfile
> introspectable.

Right, now I am thinking, shouldn't we also change the version number in the gir file? I am not sure what the 0.18 in Poppler-0.18.gir is supposed to reflect.
Comment 11 Carlos Garcia Campos 2012-11-25 11:37:52 UTC
Hey guys, I'm sorry, I had this bug lost in my inbox and I had forgotten it. I've just pushed all the patches. Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.