Skip to content

Fix broken C++ API documentation pages (Doxygen INPUT path typo) - #498

Closed
TensorDevLJ wants to merge 3 commits into
csrc-sdsu:mainfrom
TensorDevLJ:fix/broken-cpp-docs-492
Closed

TensorDevLJ wants to merge 3 commits into
csrc-sdsu:mainfrom
TensorDevLJ:fix/broken-cpp-docs-492

Conversation

@TensorDevLJ

Copy link
Copy Markdown
Contributor

Fixes #492

Root Cause

Doxyfile's INPUT tag was accidentally changed from src/cpp to the non-existent cpp/scr in commit f32155c. Since that path doesn't exist, Doxygen scanned no source files and produced an essentially empty XML tree.

Every C++ API page (operators.md, boundary.md, utils.md) uses Breathe's {doxygenclass} directive to pull in class docs (e.g. Gradient, Divergence, Laplacian, Interpol, RobinBC, MixedBC, Utils). With an empty XML tree, Breathe couldn't resolve any of them, so every single class reference across all C++ API pages rendered as a "Cannot find class ... in doxygen xml output for project MoleCpp" error — matching the bug report exactly (replace "Gradient" with any other class name).

Changes

  • Doxyfile: restore INPUT = src/cpp
  • Consolidate the duplicate RECURSIVE/EXCLUDE tags introduced by the same commit into the single canonical EXCLUDE entry, correcting its path to src/cpp/old_version to match

Testing

  • Ran doxygen Doxyfile locally: XML output now correctly includes classGradient.xml, classDivergence.xml, classLaplacian.xml, classInterpol.xml, classRobinBC.xml, classMixedBC.xml, classUtils.xml (previously these were missing entirely).
  • Ran sphinx-build -b html: completes with zero Breathe/doxygenclass errors.
  • Inspected the rendered operators.html, boundary.html, utils.html: all now show fully resolved C++ class/function signatures (Doxygen-mangled _CPPv4... IDs) instead of the broken error admonitions.
  • Full HTML+PDF doc build will also be validated by the Build-Documentation CI job on this PR.

Doxyfile's INPUT tag was accidentally changed from 'src/cpp' to the
non-existent 'cpp/scr' in commit f32155c, causing Doxygen to scan no
source files and generate an empty XML tree. As a result, every
Breathe {doxygenclass} directive on the C++ API pages (operators,
boundary, utils) failed with 'Cannot find class ... in doxygen xml
output for project MoleCpp', appearing on every single C++ class
reference page.

- Restore INPUT = src/cpp
- Consolidate the duplicate RECURSIVE/EXCLUDE tags introduced by the
  same commit into the single canonical EXCLUDE entry (also fixing
  its path to src/cpp/old_version to match)

Verified locally:
- doxygen Doxyfile now generates classGradient.xml, classDivergence.xml,
  classLaplacian.xml, classInterpol.xml, classRobinBC.xml,
  classMixedBC.xml, and classUtils.xml as expected.
- sphinx-build -b html completes with zero Breathe/doxygenclass errors.
- Rendered operators.html/boundary.html/utils.html now contain fully
  resolved C++ class/function signatures (_CPPv4... IDs) instead of
  'Cannot find class' errors.

Fixes csrc-sdsu#492

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused configuration corrections address the documented cause, with no unresolved findings.

0 open findings

What changed in this PR

Fixes #492 by restoring Doxygen’s C++ source path so Breathe can resolve API documentation.

Changes:

  • Corrects INPUT to src/cpp.
  • Removes duplicate settings and consolidates the exclusion at src/cpp/old_version.
File Description
Doxyfile Restores C++ source discovery and consolidates recursive scanning and exclusion settings.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jbrzensk

Copy link
Copy Markdown
Collaborator

@TensorDevLJ Is this human derived, or an agent driven PR?

@TensorDevLJ

Copy link
Copy Markdown
Contributor Author

Hi @jbrzensk — good question! I used AI to help investigate and draft this fix, but I reviewed and verified it myself before submitting — I traced the typo back to commit f32155c via git log, and locally ran doxygen + sphinx-build before/after the change to confirm the XML and HTML output were actually fixed (not just a guess from reading the code). Happy to answer any questions about the change!

@Tony-Drummond

Copy link
Copy Markdown
Collaborator

Thank you @TensorDevLJ but we have another solution for this which will be implemented shortly.

@TensorDevLJ

Copy link
Copy Markdown
Contributor Author

Thanks @Tony-Drummond — sounds good! Since this was the root cause I traced (the INPUT = cpp/scr typo from f32155c), happy to defer to your fix if it covers the same issue. Let me know if you'd like me to close this PR, or if it'd help to keep it open for reference until yours is merged. Either way works for me!

@Tony-Drummond

Copy link
Copy Markdown
Collaborator

@TensorDevLJ I am closing this PR, which was related to other issues already fixed for the MOLE C++ documentation. For future, please create an issue and follow our Contributing to MOLE guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken C++ Documentation Page

4 participants