-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Exceptions raised in a Directive cause parallel builds to hang #8952
Exceptions raised in a Directive cause parallel builds to hang #8952
Comments
Is it really? I suppose Sphinx handles the error on the parallel build. As a trial, I added the following directive into conf.py:
And sphinx-build exits successfully with displaying an error.
Is there any example project? |
I just made this example branch: https://github.com/Cadair/sunpy/tree/test_sphinx_error I too couldn't recreate it with a very small project, maybe because there isn't enough parallel work to do to spin up enough workers or something? I have also noticed the original bug with the changelog extension on multiple projects. |
…builds to hang Do shutdown explicitly when failure on the subprocess.
Thanks. I reproduce the error now!
And I believe #8957 will fix this. |
Thanks a lot! |
Fix #8952: Exceptions raised in a Directive cause parallel builds to hang
Describe the bug
While it seems that raising exceptions in directives is at least frowned upon, the behaviour of when this happens during a parallel build seems to not be what I would expect.
If a (custom) directive raises an exception (regular Python exception, or sphinx ExtensionError) the parallel build will hang indefinitely after printing the error to screen.
To Reproduce
Modify an extension to raise an error inside the
run()
method of a Directive class, then build the project with-j auto
.Expected behaviour
The build process exits with a failing code after the error is displayed.
Environment info
The text was updated successfully, but these errors were encountered: