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

Warning handling for the build-finished event for -W #10110

Closed
felix-hilden opened this issue Jan 17, 2022 · 1 comment
Closed

Warning handling for the build-finished event for -W #10110

felix-hilden opened this issue Jan 17, 2022 · 1 comment

Comments

@felix-hilden
Copy link

Is your feature request related to a problem? Please describe.
I'd like to issue warnings in build-finished. Currently, they aren't converted to errors with -W (ref: felix-hilden/sphinx-codeautolink#100). But my extension deals with the result HTML, so there's nowhere else that I can place the logic.

Describe the solution you'd like
I'd like for -W to raise the warnings in all build steps as expected.

Describe alternatives you've considered

  • Implement extension logic elsewhere: surely often possible, but unfortunately not in this case
  • Keep not raising: again, it's not often that a cleanup step would warn, but I can see it being potentially useful in other scenarios as well. Although in most of those cases you'd just raise an error.

Additional context
I found the relevant source in build. The logic looks solid, because build-finished should be emitted regardless of error state. And if you'd like to have the warning summary messages before that like it is currently without including build-finished, it's completely fine by me. I just want them to be converted to errors.

Also, feel free to just close this if you're keen on keeping the current behavior 😄 But I'd like to know why!

@felix-hilden felix-hilden added the type:enhancement enhance or introduce a new feature label Jan 17, 2022
tk0miya added a commit to tk0miya/sphinx that referenced this issue Jan 17, 2022
…down

The error on the builder-finished event has been ignored for the
calculation of the exit code.  This emits the event earilier step to be
calculated correctly.
@tk0miya tk0miya added this to the 4.5.0 milestone Jan 17, 2022
@tk0miya tk0miya added api type:bug api:cmdline and removed type:enhancement enhance or introduce a new feature labels Jan 17, 2022
@tk0miya
Copy link
Member

tk0miya commented Jan 17, 2022

I posted the fix for this as #10114. Could you try this please?

@tk0miya tk0miya modified the milestones: 4.5.0, 5.0.0 Mar 27, 2022
tk0miya added a commit that referenced this issue May 22, 2022
…builder-finished

Fix #10110: sphinx-build: Emit builder-finished before shutdown
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants