Skip to content

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Feb 9, 2024

Fixes #36706

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@grhkm21
Copy link
Contributor

grhkm21 commented Feb 13, 2024

Do you mind explaining what type of messages are not logged anymore? Comparing the PDF docbuild of this PR compared to one from three weeks ago, the number of lines reduced by 95%, so that's nice.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 13, 2024

It's using tex's \batchmode, which suppresses everything on the terminal. It still goes to the log file. And tex is invoked by latexmk here, which goes through the log and shows the errors.

I haven't really tested what happens if I provoke errors.

Copy link

Documentation preview for this PR (built with commit b272b1c; changes) is ready! 🎉

@kwankyu
Copy link
Collaborator

kwankyu commented Feb 23, 2024

It's using tex's \batchmode, which suppresses everything on the terminal. It still goes to the log file. And tex is invoked by latexmk here, which goes through the log and shows the errors.

I haven't really tested what happens if I provoke errors.

I did. Errors are reported

...
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 1
      Refer to 'topology.log' for details
Latexmk: If appropriate, the -f option can be used to get latexmk
  to try to force complete processing.
make: *** [topology.pdf] Error 12
Error building the documentation.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/kwankyu/GitHub/sage-dev/src/sage_docbuild/__main__.py", line 509, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/kwankyu/GitHub/sage-dev/src/sage_docbuild/__main__.py", line 505, in main
    builder()
  File "/Users/kwankyu/GitHub/sage-dev/src/sage_docbuild/builders.py", line 300, in pdf
    raise RuntimeError(error_message % (command, tex_dir))
RuntimeError: failed to run $MAKE all-pdf in /Users/kwankyu/GitHub/sage-dev/local/share/doc/sage/latex/en/reference/topology

    Note: incremental documentation builds sometimes cause spurious
    error messages. To be certain that these are real errors, run
    "make doc-clean doc-uninstall" first and try again.

and you can see the errors in the log file topology.log.

@kwankyu
Copy link
Collaborator

kwankyu commented Feb 23, 2024

These added options not only reduce verbosity but speed up the compiling process. Very nice.

Copy link
Collaborator

@kwankyu kwankyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 23, 2024

Thank you!

@vbraun vbraun merged commit bab9e4c into sagemath:develop Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make doc-pdf: Reduce output
4 participants