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 751238 - scanner: disable cache when --reparse-validate is specified
scanner: disable cache when --reparse-validate is specified
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: g-ir-scanner
unspecified
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-06-19 21:04 UTC by Dieter Verfaillie
Modified: 2015-06-24 18:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
scanner: disable cache when --reparse-validate is specified (4.67 KB, patch)
2015-06-19 21:04 UTC, Dieter Verfaillie
none Details | Review
scanner: disable cache in reparse validate mode (1.23 KB, patch)
2015-06-20 12:55 UTC, Dieter Verfaillie
none Details | Review
scanner: disable cache in reparse validate mode (1.23 KB, patch)
2015-06-24 18:58 UTC, Dieter Verfaillie
none Details | Review

Description Dieter Verfaillie 2015-06-19 21:04:44 UTC
Otherwise, we go ahead and cache incomplete information which
leads to extremely hard to debug issues like the following
'make distcheck' failure on source trees configured
with --enable-doctool:

8< 8< 8<

$ make distcheck
...
FAIL: Regress-1.0-Gjs
  GEN      Regress-1.0-sections.txt
...
============================================================================
Testsuite summary for gobject-introspection 1.45.2
============================================================================
============================================================================
See tests/scanner/test-suite.log
Please report to http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection
============================================================================
Makefile:1169: recipe for target 'test-suite.log' failed
make[8]: *** [test-suite.log] Error 1
make[8]: Leaving directory '/home/dieterv/gnome.org/checkout/gobject-introspection/gobject-introspection-1.45.2/_build/sub/tests/scanner'
...

$ cat gobject-introspection-1.45.2/_build/sub/tests/scanner/test-suite.log
================================================================
   gobject-introspection 1.45.2: tests/scanner/test-suite.log
================================================================


.. contents:: :depth: 2

FAIL: Regress-1.0-Gjs
=====================

diff -r -u -w -B -U 10 ../../../../tests/scanner/Regress-1.0-Gjs-expected/Regress.FooUtilityStruct-bar.page ./Regress-1.0-Gjs/Regress.FooUtilityStruct-bar.page
--- ../../../../tests/scanner/Regress-1.0-Gjs-expected/Regress.FooUtilityStruct-bar.page	2015-02-16 20:41:05.000000000 +0100
+++ ./Regress-1.0-Gjs/Regress.FooUtilityStruct-bar.page	2015-06-16 23:39:06.919298089 +0200
@@ -4,15 +4,15 @@
       style="field"
       xmlns="http://projectmallard.org/1.0/"
       xmlns:api="http://projectmallard.org/experimental/api/"
       xmlns:ui="http://projectmallard.org/1.0/ui/">
   <info>
     <link xref="Regress.FooUtilityStruct" group="field" type="guide"/>
     <title type="link" role="topic">bar</title>
   </info>
   <title>Regress.FooUtilityStruct.bar</title>
   <synopsis><code mime="text/x-gjs">
-FooUtilityStruct.bar: <link href="../Utility-1.0/Utility.Struct.html">Utility.Struct</link> (Read / Write)
+FooUtilityStruct.bar: <link href="../Utility-1.0/Utility.Struct.html">Utility.Struct</link> (Read)
   </code></synopsis>


 </page>
diff -r -u -w -B -U 10 ../../../../tests/scanner/Regress-1.0-Gjs-expected/Regress.FooUtilityStruct.page ./Regress-1.0-Gjs/Regress.FooUtilityStruct.page
--- ../../../../tests/scanner/Regress-1.0-Gjs-expected/Regress.FooUtilityStruct.page	2015-02-16 20:41:05.000000000 +0100
+++ ./Regress-1.0-Gjs/Regress.FooUtilityStruct.page	2015-06-16 23:39:06.919298089 +0200
@@ -5,23 +5,21 @@
       xmlns="http://projectmallard.org/1.0/"
       xmlns:api="http://projectmallard.org/experimental/api/"
       xmlns:ui="http://projectmallard.org/1.0/ui/">
   <info>
     <link xref="index" group="class" type="guide"/>
   </info>
   <title>Regress.FooUtilityStruct</title>
   <synopsis><code>
 const Regress = imports.gi.Regress;

-let fooUtilityStruct = new Regress.FooUtilityStruct({
-    <link xref='Regress.FooUtilityStruct-bar'>bar</link>: value
-});
+let fooUtilityStruct = new Regress.FooUtilityStruct();
   </code></synopsis>


   <links type="topic" ui:expanded="true"
          api:type="function" api:mime="text/x-gjs"
          groups="constructor" style="linklist">
     <title>Constructors</title>
   </links>
   <links type="topic" ui:expanded="true"
          api:type="function" api:mime="text/x-gjs"
FAIL Regress-1.0-Gjs (exit status: 1)
Comment 1 Dieter Verfaillie 2015-06-19 21:04:48 UTC
Created attachment 305713 [details] [review]
scanner: disable cache when --reparse-validate is specified

Otherwise, we go ahead and cache incomplete information which
leads to extremely hard to debug issues like the following
'make distcheck' failure on source tree configured
with --enable-doctool:

8< 8< 8<

$ make distcheck
...
FAIL: Regress-1.0-Gjs
  GEN      Regress-1.0-sections.txt
...
============================================================================
Testsuite summary for gobject-introspection 1.45.2
============================================================================
# TOTAL: 25
# PASS:  24
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See tests/scanner/test-suite.log
Please report to http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection
============================================================================
Makefile:1169: recipe for target 'test-suite.log' failed
make[8]: *** [test-suite.log] Error 1
make[8]: Leaving directory '/home/dieterv/gnome.org/checkout/gobject-introspection/gobject-introspection-1.45.2/_build/sub/tests/scanner'
...

$ cat gobject-introspection-1.45.2/_build/sub/tests/scanner/test-suite.log
================================================================
   gobject-introspection 1.45.2: tests/scanner/test-suite.log
================================================================

# TOTAL: 25
# PASS:  24
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: Regress-1.0-Gjs
=====================

diff -r -u -w -B -U 10 ../../../../tests/scanner/Regress-1.0-Gjs-expected/Regress.FooUtilityStruct-bar.page ./Regress-1.0-Gjs/Regress.FooUtilityStruct-bar.page
--- ../../../../tests/scanner/Regress-1.0-Gjs-expected/Regress.FooUtilityStruct-bar.page	2015-02-16 20:41:05.000000000 +0100
+++ ./Regress-1.0-Gjs/Regress.FooUtilityStruct-bar.page	2015-06-16 23:39:06.919298089 +0200
@@ -4,15 +4,15 @@
       style="field"
       xmlns="http://projectmallard.org/1.0/"
       xmlns:api="http://projectmallard.org/experimental/api/"
       xmlns:ui="http://projectmallard.org/1.0/ui/">
   <info>
     <link xref="Regress.FooUtilityStruct" group="field" type="guide"/>
     <title type="link" role="topic">bar</title>
   </info>
   <title>Regress.FooUtilityStruct.bar</title>
   <synopsis><code mime="text/x-gjs">
-FooUtilityStruct.bar: <link href="../Utility-1.0/Utility.Struct.html">Utility.Struct</link> (Read / Write)
+FooUtilityStruct.bar: <link href="../Utility-1.0/Utility.Struct.html">Utility.Struct</link> (Read)
   </code></synopsis>

 </page>
diff -r -u -w -B -U 10 ../../../../tests/scanner/Regress-1.0-Gjs-expected/Regress.FooUtilityStruct.page ./Regress-1.0-Gjs/Regress.FooUtilityStruct.page
--- ../../../../tests/scanner/Regress-1.0-Gjs-expected/Regress.FooUtilityStruct.page	2015-02-16 20:41:05.000000000 +0100
+++ ./Regress-1.0-Gjs/Regress.FooUtilityStruct.page	2015-06-16 23:39:06.919298089 +0200
@@ -5,23 +5,21 @@
       xmlns="http://projectmallard.org/1.0/"
       xmlns:api="http://projectmallard.org/experimental/api/"
       xmlns:ui="http://projectmallard.org/1.0/ui/">
   <info>
     <link xref="index" group="class" type="guide"/>
   </info>
   <title>Regress.FooUtilityStruct</title>
   <synopsis><code>
 const Regress = imports.gi.Regress;

-let fooUtilityStruct = new Regress.FooUtilityStruct({
-    <link xref='Regress.FooUtilityStruct-bar'>bar</link>: value
-});
+let fooUtilityStruct = new Regress.FooUtilityStruct();
   </code></synopsis>

   <links type="topic" ui:expanded="true"
          api:type="function" api:mime="text/x-gjs"
          groups="constructor" style="linklist">
     <title>Constructors</title>
   </links>
   <links type="topic" ui:expanded="true"
          api:type="function" api:mime="text/x-gjs"
FAIL Regress-1.0-Gjs (exit status: 1)
Comment 2 Dieter Verfaillie 2015-06-19 22:57:00 UTC
Hmm, looks like splinter doesn't like the commit message having diff output in there illustrating the build failures I've been seeing :/

Anybody reviewing this might want to look at the patch directly, it's only adding 2 lines to /giscanner/scannermain.py ...
Comment 3 Dieter Verfaillie 2015-06-20 12:55:40 UTC
Created attachment 305742 [details] [review]
scanner: disable cache in reparse validate mode

Only types are stored in the cache store, so disable
the cache for reparse validate mode since it needs
access to the whole serialized tree.

This fixes a seemingly hard to debug build failure
running 'make distcheck' on source trees configured
with --enable-doctool.
Comment 4 Dieter Verfaillie 2015-06-24 18:57:58 UTC
The following fix has been pushed:
6cb457e scanner: disable cache in reparse validate mode
Comment 5 Dieter Verfaillie 2015-06-24 18:58:03 UTC
Created attachment 306038 [details] [review]
scanner: disable cache in reparse validate mode

Only types are stored in the cache store, so disable
the cache for reparse validate mode since it needs
access to the whole serialized tree.

This fixes a seemingly hard to debug build failure
running 'make distcheck' on source trees configured
with --enable-doctool.