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 774812 - Error messages from xsltproc are hidden by gtkdoc-mkhtml
Error messages from xsltproc are hidden by gtkdoc-mkhtml
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.26
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-21 20:20 UTC by Sam Thursfield
Modified: 2016-11-24 17:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkdoc-mkhtml: Don't swallow error messages from xsltproc (2.03 KB, patch)
2016-11-21 20:21 UTC, Sam Thursfield
none Details | Review
gtkdoc-mkhtml: Don't swallow error messages from xsltproc (2.16 KB, patch)
2016-11-21 21:41 UTC, Sam Thursfield
committed Details | Review
gtkdoc-mkhtml: Don't swallow error messages from xsltproc (2.13 KB, patch)
2016-11-24 17:31 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Sam Thursfield 2016-11-21 20:20:46 UTC
If I have some errors in my input SGML file, xsltproc writes these to stderr, which gtkdoc-mkhtml then redirects to a file named profile.txt. This is quite confusing.

I hit this issue building docs with the Meson build system; I was getting unhelpful errors like "mesonbuild.mesonlib.MesonException: 'gtkdoc-mkhtml' failed with status 6" but this turned out to be because gtkdoc-mkhtml fails to write the error messages to stderr.
Comment 1 Sam Thursfield 2016-11-21 20:21:11 UTC
Created attachment 340473 [details] [review]
gtkdoc-mkhtml: Don't swallow error messages from xsltproc

The stderr output from `xsltproc` was being redirected to a file named
profile.txt unconditionally. This meant that if the input XML file had
some errors, gtkdoc-mkhtml would hide the error messages in profile.txt
rather than displaying them to the caller.

Now stderr is only redirected if profiling was actually enabled.
Comment 2 Sam Thursfield 2016-11-21 21:41:56 UTC
Created attachment 340476 [details] [review]
gtkdoc-mkhtml: Don't swallow error messages from xsltproc

The stderr output from `xsltproc` was being redirected to a file named
profile.txt unconditionally. This meant that if the input XML file had
some errors, gtkdoc-mkhtml would hide the error messages in profile.txt
rather than displaying them to the caller.

Now stderr is only redirected if profiling was actually enabled.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2016-11-23 14:52:01 UTC
Review of attachment 340476 [details] [review]:

::: gtkdoc-mkhtml.in
@@ +83,2 @@
     else
+        profile_args="--profile"

I think now it is easier to just add --profile directly and skip the var.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2016-11-24 17:31:50 UTC
The following fix has been pushed:
cdc49f6 gtkdoc-mkhtml: Don't swallow error messages from xsltproc
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2016-11-24 17:31:57 UTC
Created attachment 340703 [details] [review]
gtkdoc-mkhtml: Don't swallow error messages from xsltproc

The stderr output from `xsltproc` was being redirected to a file named
profile.txt unconditionally. This meant that if the input XML file had
some errors, gtkdoc-mkhtml would hide the error messages in profile.txt
rather than displaying them to the caller.

Now stderr is only redirected if profiling was actually enabled.