Bug 411690

Summary: QCH build fails with doxygen 1.8.16
Product: [Frameworks and Libraries] frameworks-kdeclarative Reporter: Antonio Rojas <arojas>
Component: generalAssignee: Friedrich W. H. Kossebau <kossebau>
Status: RESOLVED UPSTREAM    
Severity: normal CC: eugene.shalygin+bugzilla.kde, heiko.becker, kdelibs-bugs, rdieter, yurii.kolesnykov
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: broken index.qhp

Description Antonio Rojas 2019-09-07 22:33:51 UTC
Created attachment 122527 [details]
broken index.qhp

SUMMARY

If kconfig and kpackage are both compiled with doxygen 1.8.16, QCH docs fail to build for kdeclarative, with error

Error in line 233: Opening and ending tag mismatch.

And indeed, index.qhp (attached) contains a spurious </section> tag.

Looking at the tags files for kconfig and kpackage, these are the diffs when compiled with doxygen 1.8.16 vs old doxygen (modulo permutation of the <member> blocks):

diff -ru kpackage-old/usr/share/doc/qt/KF5Package.tags kpackage-new/usr/share/doc/qt/KF5Package.tags
--- kpackage-old/usr/share/doc/qt/KF5Package.tags	2019-08-09 17:13:20.000000000 +0200
+++ kpackage-new/usr/share/doc/qt/KF5Package.tags	2019-09-07 22:52:01.000000000 +0200
@@ -645,5 +645,11 @@
     <name>index</name>
     <title>KPackage Framework</title>
     <filename>index</filename>
+    <docanchor file="index" title="Introduction">autotoc_md1</docanchor>
+    <docanchor file="index" title="Using KPackage">autotoc_md2</docanchor>
+    <docanchor file="index" title="Package class">autotoc_md3</docanchor>
+    <docanchor file="index" title="Package structures">autotoc_md4</docanchor>
+    <docanchor file="index" title="Package loader">autotoc_md5</docanchor>
+    <docanchor file="index" title="Note for packagers">autotoc_md6</docanchor>
   </compound>
 </tagfile>

diff -ru kconfig-old/usr/share/doc/qt/KF5Config.tags kconfig-new/usr/share/doc/qt/KF5Config.tags
--- kconfig-old/usr/share/doc/qt/KF5Config.tags	2019-08-09 16:34:02.000000000 +0200
+++ kconfig-new/usr/share/doc/qt/KF5Config.tags	2019-09-07 22:49:53.000000000 +0200
@@ -4117,10 +4117,13 @@
     <name>options</name>
     <title>KConfig Entry Options</title>
     <filename>options</filename>
+    <docanchor file="options" title="Immutable Entries">autotoc_md0</docanchor>
+    <docanchor file="options" title="Shell Expansion">autotoc_md1</docanchor>
   </compound>
   <compound kind="page">
     <name>index</name>
     <title>KConfig</title>
     <filename>index</filename>
+    <docanchor file="index" title="Introduction">autotoc_md3</docanchor>
   </compound>
 </tagfile>

Removing these docanchor lines from either of them fixes the issue.

There's probably some doxygen bug involved here, but I don't understand the internals of QCH generation well enough to figure it out.
Comment 1 Antonio Rojas 2019-09-08 12:42:57 UTC
Offending commit is https://github.com/doxygen/doxygen/commit/73ea97de120eaf825b72717b0abe71f28d7838bb
which doesn't say much - probably the issue was already there before, just not visible since markdown headers weren't being processed
Comment 2 Antonio Rojas 2019-09-08 14:41:24 UTC
Managed to produce a minimal test case and reported upstream

https://github.com/doxygen/doxygen/issues/7248
Comment 3 Antonio Rojas 2019-09-09 11:58:59 UTC
Confirmed to be a doxygen bug
Comment 4 Antonio Rojas 2019-09-09 16:09:15 UTC
*** Bug 410892 has been marked as a duplicate of this bug. ***
Comment 5 Antonio Rojas 2019-11-28 20:37:53 UTC
*** Bug 414634 has been marked as a duplicate of this bug. ***