Turn warnings into errors in the Makefile.#906
Conversation
pradyunsg
left a comment
There was a problem hiding this comment.
Assuming we add --keep-going.
Sorry, something went wrong.
|
Actually Is there any downside in adding them both directly to the |
Sorry, something went wrong.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Users' local builds will fail slower, but they can Ctrl-C them anyway if they want and I'd still rather have the full error output, especially for something that only takes a few seconds to build like the devguide. |
Sorry, something went wrong.
There was a problem hiding this comment.
Strong 👍 on -W --keep-going.
-
Can we add
-ntoo to automatically catch any broken internal links/ref targets? Seems like it builds cleanly with it with your PR. -
Is there a reason we can't add it to the existing
SPHINXOPTSvariable instead of making a new bespokeSPHINXERRORHANDLINGone—I thought that was whatSPHINXOPTSis for, which is why I usually add it there, but maybe I was mistaken. -
Wouldn't it make sense to add it to the
make.battoo, so they are consistent? -
Testing this locally with my standard
python -b -X dev -m sphinxto catch Python-level warnings, I noticed that line 227 in theconf.pycontains an invalid escape sequence due to being a regex without arraw string prefix. Since its a one line change and fixes a warning, might be worth just fixing here instead of a whole separate PR.
Thanks!
Sorry, something went wrong.
Ok.
The only reason is to keep consistent with cpython/Doc/Makefile. Adding it directly to
I'll update it once we decide which options we want.
I can fix this too. |
Sorry, something went wrong.
|
It seems that
Perhaps for So the plan would be:
|
Sorry, something went wrong.
|
FWIW, in case of errors |
Sorry, something went wrong.
|
I think it's fine to bail: it's a prompt to fix the (new) errors. |
Sorry, something went wrong.
|
Anyone on Windows wants to check if the bat works? 🦇 |
Sorry, something went wrong.
There was a problem hiding this comment.
I had to set the PYTHON environment variable to python to get it to work at all (due to my Python install not shipping with py), and it created its own whole venv instead of using my existing conda env (which it fortunately did not muck with), but it then exited with an error due to the args being quoted. However, I tested it and it appears to be an easy fix.
(To be honest, I usually don't use makefiles or helper scripts for Sphinx build orchestration, as opposed to using python -m sphinx myself, as they tend to do too much magic, not work in many scenarios and get in the away of me passing the args I want. And I have make on my system so I usually use that anyway instead of batch files)
Sorry, something went wrong.
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
CAM-Gerlach
left a comment
There was a problem hiding this comment.
LGTM, thanks @ezio-melotti !
Sorry, something went wrong.
This PR turns warnings into errors, in a way similar to what
cpython/Doc/Makefiledoes.