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

Fix documentation issues when upgrading Doxygen to 1.9.8 #1564

Closed
wants to merge 2 commits into from

Conversation

mudge
Copy link
Contributor

@mudge mudge commented Nov 28, 2023

See #1563

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.

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.)

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.
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.
@mudge mudge added the documentation Improvements or additions to documentation label Nov 28, 2023
@aallan aallan linked an issue Nov 28, 2023 that may be closed by this pull request
@@ -3,7 +3,8 @@
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title="Introduction"></tab>
<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"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frustratingly, this change will break building the docs on Doxygen 1.8.17 as this seems to be a breaking change in Doxygen itself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Joy. Is there a requirements file we can specify the minimum version needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe Doxygen is being used a system dependency here (i.e. we expect the doxygen command to be available when running the build) rather than something being managed by Bundler or PIP so there is no existing place to specify a version constraint.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah it's a README thing then. 'kay.

@mudge
Copy link
Contributor Author

mudge commented Feb 7, 2024

This no longer seems to work as expected with the very latest version of Doxygen (1.10.0) and I've discovered more subtle bugs with brief description extraction even without relying on JAVADOC_AUTOBRIEF: e.g. the brief description for

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

<para>Initialise SPI instances</para>
<para>Puts the SPI into a known state, and enable it. Must be called before other functions. </para>

Note the first line of the detailed description being included here, presumably because there is no blank line after the \brief command.

@aallan
Copy link
Contributor

aallan commented Mar 6, 2024

@mudge Deprecated in favour of #1660?

@mudge
Copy link
Contributor Author

mudge commented Mar 6, 2024

Yes, I'll close this one though the DoxygenLayout.xml changes may still be necessary.

@mudge mudge closed this Mar 6, 2024
@aallan
Copy link
Contributor

aallan commented Mar 6, 2024

@nelliemckesson Do we still need the DoxygenLayout.xml changes in this PR?

@nelliemckesson
Copy link
Contributor

@aallan @mudge we don't use doxygen's generated nav data in the web documentation toolchain, and as far as I can tell, it also isn't used in the doxygentoasciidoc conversion. So, I think DoxygenLayout.xml would only affect the original pico-sdk site (can't remember where that lives/lived), but if that still exists, then yeah, those changes are still required.

@lurch
Copy link
Contributor

lurch commented Mar 7, 2024

So, I think DoxygenLayout.xml would only affect the original pico-sdk site (can't remember where that lives/lived), but if that still exists, then yeah, those changes are still required.

I think the only place that's still relevant is Appendix E of https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf ? But if this is going to become dependent on the version of Doxygen the user has installed, maybe the Doxygen-version also needs to be mentioned in that Appendix?

@aallan
Copy link
Contributor

aallan commented Mar 7, 2024

@nathan-contino Can you throw a quick NOTE block into Appendix E of the Pico C SDK book ahead of the documentation release (which looks to be next week at this point). Thanks!

@aallan aallan deleted the doxygen-1-9-8-compatibility branch March 7, 2024 10:48
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
Development

Successfully merging this pull request may close these issues.

Documentation issues when upgrading to Doxygen 1.9.8
5 participants