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

docs: Sphinx >=7.4.0 breaks warning ignore script #3879

Open
AJPfleger opened this issue Nov 20, 2024 · 0 comments
Open

docs: Sphinx >=7.4.0 breaks warning ignore script #3879

AJPfleger opened this issue Nov 20, 2024 · 0 comments
Labels
Component - Documentation Affects the documentation Needs Decision Needs decision or further information

Comments

@AJPfleger
Copy link
Contributor

Problem

The logging in sphinx changed slightly in 7.3.7 -> 7.4.0. This breaks our warnings_filter.py-script, that helps to ignore false positives. The issue persists until at least 8.1.3.

Details

It is clear, why this set of warnings does not work and others (e.g. Duplicate C++ declaration, ...) do. There was a change in Sphinx regarding the handling of the messages from:

logger.warning(msg % target, ...

to

logger.warning(msg, target, ...

. This might change the time, when the expression is evaluated.

Message in log

/home/runner/work/acts/acts/docs/api/api.md:60: WARNING: undefined label: 'class_acts_1_1_convex_polygon_bounds_3_01_polygon_dynamic_01_4'
/home/runner/work/acts/acts/docs/api/api.md:171: WARNING: undefined label: 'class_acts_1_1_axis_3_01_axis_type_1_1_equidistant_00_01bdt_01_4'
/home/runner/work/acts/acts/docs/api/api.md:171: WARNING: undefined label: 'class_acts_1_1_axis_3_01_axis_type_1_1_variable_00_01bdt_01_4'
/home/runner/work/acts/acts/docs/api/api.md:177: WARNING: undefined label: 'class_acts_1_1_grid_surface_material_t'

Handled object until 7.3.7

 <LogRecord: sphinx.sphinx.domains.std, 30, /home/runner/.local/lib/python3.10/site-packages/sphinx/util/logging.py, 131, "undefined label: 'class_acts_1_1_convex_polygon_bounds_3_01_polygon_dynamic_01_4'">
 <LogRecord: sphinx.sphinx.domains.std, 30, /home/runner/.local/lib/python3.10/site-packages/sphinx/util/logging.py, 131, "undefined label: 'class_acts_1_1_axis_3_01_axis_type_1_1_equidistant_00_01bdt_01_4'">
 <LogRecord: sphinx.sphinx.domains.std, 30, /home/runner/.local/lib/python3.10/site-packages/sphinx/util/logging.py, 131, "undefined label: 'class_acts_1_1_axis_3_01_axis_type_1_1_variable_00_01bdt_01_4'">
 <LogRecord: sphinx.sphinx.domains.std, 30, /home/runner/.local/lib/python3.10/site-packages/sphinx/util/logging.py, 131, "undefined label: 'class_acts_1_1_grid_surface_material_t'">

Handled object since 7.4.0

<LogRecord: sphinx.sphinx.domains.std, 30, /home/runner/.local/lib/python3.10/site-packages/sphinx/util/logging.py, 131, "undefined label: %r">
<LogRecord: sphinx.sphinx.domains.std, 30, /home/runner/.local/lib/python3.10/site-packages/sphinx/util/logging.py, 131, "undefined label: %r">
<LogRecord: sphinx.sphinx.domains.std, 30, /home/runner/.local/lib/python3.10/site-packages/sphinx/util/logging.py, 131, "undefined label: %r">
<LogRecord: sphinx.sphinx.domains.std, 30, /home/runner/.local/lib/python3.10/site-packages/sphinx/util/logging.py, 131, "undefined label: %r">

Possible solutions

Stick to Sphinx 7.3.7

Pro

  • No extra work needed
  • We directly see, when we generate new warnings of the type undefined label

Con

  • Already old (Apr 19 2024), which might lead to problems in the future
  • Locked in to current dependencies, which might need updates in the future

Upgrade to Sphinx 8.1.3 and ignore all undefined label:-warnings

Just add .*undefined label: .* to the regex-filter.

Pro

  • Newest version including bugfixes
  • no constraints in upgrading Sphinx or any of it dependencies

Con

  • We won't see new warnings including undefined label: immediately
@AJPfleger AJPfleger added Needs Decision Needs decision or further information Component - Documentation Affects the documentation labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Documentation Affects the documentation Needs Decision Needs decision or further information
Projects
None yet
Development

No branches or pull requests

1 participant