Skip to content

Doc issues fail CI#8161

Open
alliepiper wants to merge 25 commits intoNVIDIA:mainfrom
alliepiper:7053_doc_ci_fail
Open

Doc issues fail CI#8161
alliepiper wants to merge 25 commits intoNVIDIA:mainfrom
alliepiper:7053_doc_ci_fail

Conversation

@alliepiper
Copy link
Contributor

@alliepiper alliepiper commented Mar 25, 2026

Summary

Closes #7053. Makes the documentation build fail on both Doxygen and Sphinx
warnings/errors, and fixes all existing issues so the build passes cleanly.

Sphinx (-W warnings-as-errors)

  • Add -W to SPHINXOPTS in gen_docs.bash
  • Fix all undefined RST label references, missing toctree entries, title
    underline lengths, RST formatting errors, and duplicate labels
  • Add suppress_warnings in conf.py for cpp.duplicate_declaration and
    docutils — breathe architecture limitations that cannot be fixed in source
  • Skip generating API pages for symbols with unparseable C++ declarations
    (_BREATHE_SKIP_SYMBOLS in auto_api_generator.py)

Doxygen (WARN_AS_ERROR = FAIL_ON_WARNINGS)

  • Unify warning settings across all 4 Doxyfiles (cub, libcudacxx, thrust, cudax)
  • Fix gen_docs.bash to check Doxygen exit codes from parallel builds
  • Fix @param name mismatches across STF base classes, cudax launch, and CUB
  • Add _CCCL_DOXYGEN_INVOKED stubs for CUB namespace macros
  • Remove orphaned @endrst directives in CUB device headers
  • Fix @file tags, stale @param entries, and misused @name tags
  • Hide recursive template inheritance from Doxygen (graph_task, stream_task,
    task_dep, CompileTimeArray)
  • Escape cross-project type references that Doxygen cannot resolve (each
    project's Doxygen build is currently isolated from the others)
  • Hide _CCCL_DOXYGEN_INVOKED-guard ::cuda::std::execution::env defaults in
    device_scan.cuh template signatures
  • Exclude CUB dispatch/ and kernels/ directories (internal implementation)
  • Remove duplicate tuple_element/tuple_size docs from thrust/pair.h
    (authoritative docs remain in tuple.h)
  • Convert doc comments on excluded detail symbols to plain C++ comments
  • Restore __hierarchy to cudax Doxyfile INPUT (incorrectly removed)

Verification

Built docs from this branch and from the merge base with gen_docs.bash in
a devcontainer, then diffed the HTML output. All differences are accounted for:

  • 29 CUB pages removed: Internal dispatch/kernel classes and enums now
    excluded via EXCLUDE_PATTERNS. These were never public API.
  • 4 symbol pages removed: get_executor_func_t, group,
    has_property, property_with_value — skipped due to unparseable C++
    declarations (breathe/Sphinx parser limitations on SFINAE expressions).
  • 2 thrust pages moved: tuple_element/tuple_size moved from pair
    group to tuple group (removed duplicate, kept authoritative location).
  • cudax hierarchy pages preserved: this_block, this_thread,
    this_warp, this_grid, this_cluster all present after restoring
    __hierarchy to INPUT.
  • No unexpected regressions in generated documentation content.

Test plan

  • docs/gen_docs.bash passes with zero Doxygen errors and zero Sphinx warnings
  • Diff of generated HTML against merge base shows no unexpected regressions

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Mar 25, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Progress in CCCL Mar 25, 2026
Copy link
Contributor Author

@alliepiper alliepiper left a comment

Choose a reason for hiding this comment

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

/ok to test

@alliepiper alliepiper changed the title Fix documentation build to pass with warnings-as-errors Doc issues fail CI Mar 25, 2026
@alliepiper
Copy link
Contributor Author

/ok to test

1 similar comment
@alliepiper
Copy link
Contributor Author

/ok to test

@github-actions

This comment has been minimized.

Copy link
Contributor

@miscco miscco left a comment

Choose a reason for hiding this comment

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

I love this soo much

Add missing @param tags, fix param name mismatches, remove stale
params, and correct Doxyfile inputs across libcudacxx, cudax, CUB,
and Thrust headers. Replace duplicate overload doc blocks in copy.h
and fill.h with @overload. Fix minor doc formatting in CUB device
headers and Python sort docstrings.
Add -W (warnings-as-errors) to SPHINXOPTS and quote paths in the
sphinx build command. Replace toctree with ref links in auto-generated
group pages to eliminate duplicate-toctree warnings. Fix undefined
label references, add missing toctree entries for numeric overflow
docs, fix RST formatting errors, and add stub anchors for in-progress
container and graph features.
Skip generating API pages for 3 symbols whose Doxygen XML produces
C++ declarations that breathe/Sphinx cannot parse (function-pointer
typedefs, variable templates with SFINAE expressions). Suppress
cpp.duplicate_declaration and docutils warning categories that arise
from breathe architecture limitations. Remove container.rst stub
anchors that collide with breathe-generated labels.

Full doc build (Doxygen + Sphinx -W) now passes with zero warnings.
Unify Doxygen warning settings across all 4 Doxyfiles with
WARN_AS_ERROR=FAIL_ON_WARNINGS. Fix gen_docs.bash to check Doxygen
exit codes from parallel builds. Add _CCCL_DOXYGEN_INVOKED stubs for
CUB namespace macros. Remove orphaned @endrst directives, fix @param
name mismatches across STF base classes and cudax launch overloads,
fix @file tags, and clean up stale @param entries in CUB internals.
Add % prefix to ::cuda::std::tuple, ::cuda::std::execution::env,
::cuda::std::plus, ::std::tuple, and ::cuda::stream_ref in doc
comments. The % tells Doxygen to render these as plain text instead
of attempting to resolve them as cross-reference links.
Each CCCL project's Doxygen build is currently isolated, so types from
other projects (e.g. cuda::std::tuple referenced from CUB) cannot be
resolved. Drop :: global scope prefix from type names in doc comments
and use monospace formatting instead. For template default arguments
in C++ signatures, hide ::cuda::std::execution::env from Doxygen
behind _CCCL_DOXYGEN_INVOKED guards.
Change @name to @brief on shape_of copy constructor doc blocks.
Doxygen's @name creates a member group, which caused @param tags
from adjacent doc blocks to bleed into unrelated members like
size() and get_capacity(). Also fix @param size0 to match the
actual parameter name (sizes) in the coords_t constructor.
Remove stray @} with no matching @{ in buffer.h. Remove duplicate
@relates in zip_function.h (Doxygen allows only one per block). Add
missing @endrst to close an RST block in block_load_to_shared.cuh.
Fix @snippet filename from unittest.h to unittest.cuh in traits.cuh
and add EXAMPLE_PATH to cudax Doxyfile so Doxygen can find it.
Doxygen cannot handle self-referential template inheritance (CRTP
and recursive specialization patterns). Hide the recursive base
class from Doxygen with _CCCL_DOXYGEN_INVOKED guards on graph_task,
stream_task, and task_dep. Hide the entire CompileTimeArray recursive
template in WarpExchangeShfl since it is a private implementation
detail.
Convert discard_temp_storage doc comments from Doxygen markup to
plain C++ comments since the symbol is in a detail namespace excluded
by EXCLUDE_SYMBOLS. Hide __ensure_current_context out-of-class
definition and structured_binding_size specialization from Doxygen
with _CCCL_DOXYGEN_INVOKED guards. Remove \var doc for batch_memop
enum value that is commented out and not yet defined.
Both pair.h and tuple.h documented these symbols under different
Doxygen @addtogroup groups, causing "Member documentation found
several times in @addtogroup groups" errors. Remove the Doxygen
aliases and doc comments from pair.h, keeping tuple.h as the single
authoritative location (which includes deprecation notices and
cross-references).
Add */dispatch/* and */kernels/* to CUB Doxyfile EXCLUDE_PATTERNS.
These directories contain only internal dispatch machinery and kernel
launch functions, not public API. Doxygen was erroring on symbols
like vsmem_helper_t::discard_temp_storage because EXTRACT_ALL pulled
them in but EXCLUDE_SYMBOLS excluded their underlying detail types.
The WIP merge incorrectly removed __hierarchy from the Doxygen input
paths. This directory exists and contains public API classes including
this_block, this_thread, this_warp, this_grid, and this_cluster.
The group concept uses _CCCL_REQUIRES_EXPR which expands to an
expression that Sphinx's C++ parser cannot handle. Exposed by
restoring __hierarchy to the cudax Doxyfile INPUT.
@alliepiper
Copy link
Contributor Author

/ok to test

@alliepiper alliepiper marked this pull request as ready for review March 25, 2026 20:03
@alliepiper alliepiper requested review from a team as code owners March 25, 2026 20:03
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Progress to In Review in CCCL Mar 25, 2026
Comment on lines +374 to +379
typename EnvT = // Doxygen cannot resolve ::cuda::std::execution::env
#ifdef _CCCL_DOXYGEN_INVOKED
void
#else
::cuda::std::execution::env<>
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

This is very sad! Is there a way we can properly fix this? Environment overloads will show up everywhere!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a fix we can consider as part of the env rollout. I've filed a bug to track.

#8176

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tldr to save a click -- this fails because all of our projects use separate doxyfiles, and CUB's parser doesn't know about libcudacxx's symbols. Doxygen has some 'tagfile' mechanism to let the projects share cross-referencing info that would be great for a followup.

@alliepiper alliepiper requested a review from a team as a code owner March 25, 2026 22:38
@github-actions
Copy link
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 54m: Pass: 100%/425 | Total: 4d 23h | Max: 1h 37m | Hits: 97%/510549

See results here.

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

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

[BUG]: Doc issues do not fail CI

6 participants