Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation issues when upgrading to Doxygen 1.9.8 #1563

Closed
mudge opened this issue Nov 28, 2023 · 6 comments · Fixed by #1660
Closed

Documentation issues when upgrading to Doxygen 1.9.8 #1563

mudge opened this issue Nov 28, 2023 · 6 comments · Fixed by #1660
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@mudge
Copy link
Contributor

mudge commented Nov 28, 2023

The documentation for this SDK builds fine with Doxygen 1.8.17 (as indicated by the comment in the DoxygenLayout.xml) but has at least two issues when upgrading to the latest version of Doxygen: 1.9.8, released on 25 Aug 2023.

The "API Documentation" tab is missing from the main menu and no modules.html is output

Doxygen 1.8.17 Doxygen 1.9.8
Screenshot 2023-11-28 at 10 47 25 Screenshot 2023-11-28 at 10 49 23

Using the latest default DoxygenLayout.xml produced by Doxygen 1.9.8's doxygen -l restores the contents of the old modules.html but now refers to it as "Topics" instead. Updating our DoxygenLayout.xml restores the previous page (albeit under a new URL):

-    <tab type="modules" visible="yes" title="API Documentation" intro="These are the libraries supplied in the Raspberry Pi Pico SDK"/>
+    <tab type="topics" visible="yes" title="API Documentation" intro="These are the libraries supplied in the Raspberry Pi Pico SDK"/>
+    <tab type="modules" visible="no" title="" intro=""/>

Brief descriptions are no longer extracted for most modules by default

Doxygen 1.8.17 Doxygen 1.9.8
Screenshot 2023-11-28 at 10 47 34 Screenshot 2023-11-28 at 10 49 35

The latter can be fixed by adding JAVADOC_AUTOBRIEF = YES to the Doxyfile to opt into the following functionality:

If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the first line (until the first dot) of a Javadoc-style comment as the brief description. If set to NO, the Javadoc-style will behave just like regular Qt-style comments (thus requiring an explicit @brief command for a brief description.)

Alternatively, we may need to switch to using explicit @brief commands to separate brief descriptions from detailed ones.

@mudge mudge added the documentation Improvements or additions to documentation label Nov 28, 2023
mudge added a commit that referenced this issue Nov 28, 2023
As of Doxygen 1.8.19 (specifically,
doxygen/doxygen@327423e),
the first line of a comment is no longer automatically extracted as a
brief description unless we enable the JAVADOC_AUTOBRIEF setting. See
https://www.doxygen.nl/manual/config.html#cfg_javadoc_autobrief:

> If the `JAVADOC_AUTOBRIEF` tag is set to `YES` then doxygen will
> interpret the first line (until the first dot) of a Javadoc-style
> comment as the brief description. If set to `NO`, the Javadoc-style
> will behave just like regular Qt-style comments (thus requiring an
> explicit @brief command for a brief description.)

Fixes #1563.
mudge added a commit that referenced this issue Nov 28, 2023
Between Doxygen 1.8.17 and Doxygen 1.9.8, the top-level "modules" tab
type in the Doxygen layout has changed such that our "API Documentation"
section is no longer generated and is instead considered of the type
"topics". Update our layout XML to reflect this change and restore this
critical section of the documentation.

Fixes #1563.
@aallan aallan linked a pull request Nov 28, 2023 that will close this issue
@mudge
Copy link
Contributor Author

mudge commented Feb 7, 2024

As commented in #1564 (comment), I'm seeing incorrectly extracted brief descriptions in newer versions of Doxygen (e.g. 1.10.0) even when we're using the explicit \brief command if it isn't separated from the detailed description by a blank line, see

/*! \brief Initialise SPI instances
* \ingroup hardware_spi
* Puts the SPI into a known state, and enable it. Must be called before other
* functions.

@mudge
Copy link
Contributor Author

mudge commented Feb 7, 2024

In the short term, maybe it's worth defining what version of Doxygen is supported and we advise using that. I believe the latest version that behaves the way we expect is 1.8.17 (before the changes to brief description extraction)?

@aallan
Copy link
Contributor

aallan commented Mar 6, 2024

See #1660.

@aallan aallan linked a pull request Mar 6, 2024 that will close this issue
@krzysztofjozwiak
Copy link

Hi,
Is lack of backward compatibility in doxygenlayout .xml file expected?
I have updated doxygen locally but I cannot update doxygen in our CI currently and ended up with errors from older doxygen version in CI.
Also if there are breaking changes introduced IMO it requires changing format version and providing meaningful error if version is not supported/compatible: both versions are using layout 1.0

@aallan
Copy link
Contributor

aallan commented Apr 11, 2024

It's not so much a lack of backwards compatibility in the XML layout, as in the parser. Layout that parsed just fine with older versions of the library don't parse correctly with newer versions which seem to be a lot stricter in what it regards as valid markup.

@kilograham kilograham added this to the 1.6.0 milestone May 20, 2024
@kilograham kilograham modified the milestones: 1.6.0, 1.6.2, 2.0.0 Aug 6, 2024
@kilograham
Copy link
Contributor

this is likely fixed with the latest sdk release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
5 participants