Conversation
|
I noticed this because I introduced a mistake in AutoDoc's manual and the CI just passed... sigh |
stertooy
left a comment
There was a problem hiding this comment.
Seems to work as intended, just one small remark :)
action.yml
Outdated
| run: | | ||
| if grep -q -i -e "there were latex errors" $RUNNER_TEMP/output.log; then | ||
| echo "::error::LaTeX errors were found when building the documentation!" | ||
| grep -i -e "there were latex errors" $RUNNER_TEMP/output.log |
There was a problem hiding this comment.
I'm not sure what the intention of the final grep line is? It will just print "#W There were LaTeX errors:", but not the actual errors.
There was a problem hiding this comment.
Well this is modelled on the existing code a few lines below: I think the idea is to make the error "stand out" by repeating it.
But I'd be fine with removing it here -- but then also there.
There was a problem hiding this comment.
Making the errors stand out is IMO a good thing, but I'd want to see the actual errors. The existing code (mostly?) gets to deal with one-line warnings, so repeating those lines is helpful.
But for the LaTeX errors, the actual errors are on separate lines below the '#W There were LaTeX errors' line. Something like this, maybe? (untested code!)
echo "::error::LaTeX errors were found when building the documentation!"
awk '/^#[IW] / {err=0}; /There were LaTeX errors/ {err=1}; err && /^!/ {print}' "$RUNNER_TEMP/output.log"
which should then print something like
Error: LaTeX errors were found when building the documentation!
! Missing \endcsname inserted.
! Argument of \@setref has an extra }.
! Paragraph ended before \@setref was complete.
! Extra \endcsname.
! Too many }'s.
There was a problem hiding this comment.
In the case where we find any errors of any form in the log, is it worth outputting the whole log file for easier debugging?
Treat GAPDoc's "There were LaTeX errors" message as a warning failure when warnings-as-errors is true. Co-authored-by: Codex <codex@openai.com>
5d1745c to
ad6b251
Compare
Joseph-Edwards
left a comment
There was a problem hiding this comment.
This all looks good to me. We may wish to output the whole log file if we find any errors for easier debugging though I don't feel too strongly about this. Otherwise I'm happy to merge
Treat GAPDoc's "There were LaTeX errors" message as a
warning failure when warnings-as-errors is true.
Co-authored-by: Codex codex@openai.com