Skip to content

Fix Doxygen Ref issues - #536

Merged
nkoukpaizan merged 2 commits into
developfrom
alex/fix-doxygen-refs
Aug 14, 2026
Merged

Fix Doxygen Ref issues#536
nkoukpaizan merged 2 commits into
developfrom
alex/fix-doxygen-refs

Conversation

@alexander-novo

Copy link
Copy Markdown
Collaborator

Description

The PR #524 was created to fix some error messages Doxygen was giving about refs not being found. It was fixed by removing the refs, but those refs are useful so it would be nice to fix the root issue instead. This PR does that.

Proposed changes

The root of the issue is a quirk with Doxygen - since the docs of CircuitComponent are inherited by PowerElectronicsModel, some of the refs in CircuitComponent docs appear in the PowerElectronicsModel context, but some of these items are re-imported into the PowerElectronicsModel namespace. The re-imports aren't documented and Doxygen can only tell that they refer to the same things if in the code they clearly come from CircuitComponent.

DOXYGEN_EXTRACT_ALL has been set in the normal docs to help with normal docs as well - many items aren't documented, but they should still appear in the documentation. Refs will also be able to resolve for them even if they aren't documented.

EXTRACT_PRIVATE has been set in the Sphinx documentation Doxyfile. Sphinx will strip privates from the doxygen xml, and this will help errors from being generated, since the Doxygen documentation is developer-oriented, it might mention private members in the documentation.

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ style guidelines.
  • [N/A] There are unit tests for the new code.
  • [N/A] The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • I have updated CHANGELOG.md to reflect the changes in this PR. If this is a minor PR that is part of a larger fix already included in the file, state so.

This is part of a previous fix

Further comments

@lukelowry can you verify that this fixes the issue you were having in the previous PR?

@alexander-novo alexander-novo self-assigned this Aug 13, 2026
@alexander-novo alexander-novo added the documentation Improvements or additions to documentation label Aug 13, 2026
@pelesh

pelesh commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

I'm getting folowing error:

/home/user/src/gridkit/GridKit/GridKit/Solver/Dynamic/Rosenbrock.hpp:334: error: unable to resolve reference to 'RHS_first_stage_' for \ref command

*** Doxygen has finished

@alexander-novo

Copy link
Copy Markdown
Collaborator Author

I'm getting folowing error:

/home/user/src/gridkit/GridKit/GridKit/Solver/Dynamic/Rosenbrock.hpp:334: error: unable to resolve reference to 'RHS_first_stage_' for \ref command

*** Doxygen has finished

Is this when running the GridKitDocs target in cmake, or when running doxygen for the sphinx documentation?

I believe this is due to a bug in Doxygen. My doxygen version is 1.17.0 and I do not have these errors. When I downgrade to 1.9.8, I get similar errors.

@lukelowry

lukelowry commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Error on RTD when I tried to build docs

[rtd-command-info] start-time: 2026-08-13T20:49:59.413892Z, end-time: 2026-08-13T20:50:06.063784Z, duration: 6, exit-code: 1
rm -rf docs/xml && cd docs && doxygen Doxyfile
/home/docs/checkouts/readthedocs.org/user_builds/gridkit/checkouts/alex/GridKit/Solver/Dynamic/Native/InfNorm.hpp:41: error: unable to resolve reference to 'scale_' for \ref command
/home/docs/checkouts/readthedocs.org/user_builds/gridkit/checkouts/alex/GridKit/Solver/Dynamic/Rosenbrock.hpp:453: error: unable to resolve reference to 'RHS_' for \ref command

If you fix those I can run it again until it builds on RTD

@alexander-novo

Copy link
Copy Markdown
Collaborator Author

Error on RTD when I tried to build docs

[rtd-command-info] start-time: 2026-08-13T20:49:59.413892Z, end-time: 2026-08-13T20:50:06.063784Z, duration: 6, exit-code: 1
rm -rf docs/xml && cd docs && doxygen Doxyfile
/home/docs/checkouts/readthedocs.org/user_builds/gridkit/checkouts/alex/GridKit/Solver/Dynamic/Native/InfNorm.hpp:41: error: unable to resolve reference to 'scale_' for \ref command
/home/docs/checkouts/readthedocs.org/user_builds/gridkit/checkouts/alex/GridKit/Solver/Dynamic/Rosenbrock.hpp:453: error: unable to resolve reference to 'RHS_' for \ref command

If you fix those I can run it again until it builds on RTD

Yes those are exactly what I get with the outdated version of doxygen. This is a doxygen bug - you should try updating.

@lukelowry

Copy link
Copy Markdown
Collaborator

Well that's the unfortunate thing, we can't do that on RTD unless we just use a more recent version of Ubuntu

In .readthedocs.yaml, can you change to:

build:
  os: ubuntu-26.04

Increasing Ubuntu version will increase Doxygen version for fixing a bug.
@lukelowry

Copy link
Copy Markdown
Collaborator

https://gridkit.readthedocs.io/en/alex/

Take a look, it builds now!

@nkoukpaizan
nkoukpaizan merged commit 77963e7 into develop Aug 14, 2026
6 checks passed
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.

4 participants