felix-hilden / sphinx-codeautolink

Automatic links from code examples to reference documentation
https://sphinx-codeautolink.rtfd.io
MIT License
58 stars 9 forks source link

-W does not seem to work with "Could not match transformation" warning #100

Closed mgeier closed 2 years ago

mgeier commented 2 years ago

I don't know if this is an issue of sphinx_codeautolink or a Sphinx issue.

Issue

Running Sphinx with -W exits with "success", even if a "Could not match transformation" warning has been raised.

Expected behavior

Sphinx should exit with "failure" (when -W is used), which in turn should mark CI jobs as "failed".

Steps to reproduce

Example: https://github.com/AudioSceneDescriptionFormat/splines/runs/4827865837

Here we can also see that the warning message comes after the line

The HTML pages are in _build/html.
felix-hilden commented 2 years ago

Oh damn, it probably is because the warning is issued in the cleanup step and not in the proper build. Unfortunately we can't do anything about it, since that's when the HTML is written. I'll have a look what Sphinx knows of this, if anything. Then we can ask the devs.

felix-hilden commented 2 years ago

Okay, here's the relevant function in Sphinx's source: build. It indeed seems that build-finished is emitted only at the very end of the process with no special handling. I'll post a question.

felix-hilden commented 2 years ago

In case you didn't follow the Sphinx issue: it's being fixed (although now stalled) on their end. So either the fix is eventually merged and released by Sphinx, or if not, then there's not much we can do about the warnings on our end. Because of that, I think I'll close this issue for housekeeping!