GNOME Bugzilla – Bug 774812
Error messages from xsltproc are hidden by gtkdoc-mkhtml
Last modified: 2016-11-24 17:32:36 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.
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.
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.
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.
The following fix has been pushed: cdc49f6 gtkdoc-mkhtml: Don't swallow error messages from xsltproc
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.