Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the problem
The PRs fixes #1581
Describe the algorithm of actions that leads to the problem
The current implementation of third-party sphinx-extension
sphinx-autoapi
can break sometimes.Description of Changes
We monkey patch the
autoapi.directive.NestedParser.run
Code for testing new changes
make clean && make html
closes #1581
how I found the error
when going through the memory in the debugger I noticed that the extension does not decrement the "node" level in some edge cases, so Sphinx keeps trying to go one level up even when we are at root
Future considerations
in v2.1.0 it can be discussed if its possible to migrate
sphinx-autoapi
tosphinx.ext.autosummary
asautosummary
now supports recursive docs generation, or even ditching sphinx altogether for something like hugo.