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

set an exit code in make_doc #5835

Merged
merged 4 commits into from
Nov 27, 2024

Conversation

ThomasBreuer
Copy link
Contributor

With this change, the CI tests detect whether errors like broken references occur when the manuals get built.

For that,

  • redirect the Info output generated by GAPDoc functions to a string,
  • extract the messages that describe warnings; according to frankluebeck/GAPDoc@826c091, these are the lines starting with "#W ",
  • omit the LaTeX warnings about overfull boxes (I think we do not want to force ourselves to create manuals without these warning),
  • report failure if the set of remaining warnings is nonempty.

For that,
- redirect the `Info` output generated by GAPDoc functions to a string,
- extract the messages that describe warnings; according to
  frankluebeck/GAPDoc/commit/826c091491438c1f6ba1f330d17914f45b4bd3af,
  these are the lines starting with `"#W "`,
- omit the LaTeX warnings about overfull boxes (I think we do not want
  to force ourselves to create manuals without these warning),
- report failure if the set of remaining warnings is nonempty.
@ThomasBreuer ThomasBreuer added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: workflow Meta: anything related to the development workflow of GAP labels Nov 8, 2024
@fingolfin
Copy link
Member

So it reports a failure now. So what is wrong?

(Funny. I got exit code 0 locally before this change.)
@fingolfin
Copy link
Member

It shows a lot of warnings about unresolved references. But those all come from run 1, were they are to be expected (we need to build the manual twice precisely to deal with those).

Perhaps run 1 ought to be excluded from this?

This way, create the documentation w.r.t. the installed GAP
without private packages; this is useful for debugging.
(but print it for both runs, as in earlier times)
@ThomasBreuer
Copy link
Contributor Author

This is more subtle than I had thought.
Note that doc/make_doc is not self-contained. It assumes that the documentation for all those packages has been build for which there are cross-references from the main GAP manuals (for example the Forms package).

@ThomasBreuer
Copy link
Contributor Author

After some experiments, I think that this pull request can be merged, as it improves the behaviour for the main GAP manuals.

Concerning more general support for package manuals, i.e., how to detect problems when building a package's documentation (in CI tests), the situation is not obvious:

There is the release-gap-package script which could be extended, see gap-system/ReleaseTools/issues/106.

Besides that, changing return values or printed output of MakeGAPDocDoc or AutoDoc would perhaps yield an improvement for an individual GAP package (assuming that the makedoc.g file of the package is read by a CI test), but would also confuse release-gap-package.
Setting an exit code for the current GAP session if AutoDoc detects failure seems to be useful, and will not cause unwanted changes in the behaviour of scripts involving AutoDoc calls, see gap-packages/AutoDoc/pull/280.

@fingolfin fingolfin merged commit 37a8938 into gap-system:master Nov 27, 2024
33 checks passed
@ThomasBreuer ThomasBreuer deleted the TB_report_errors branch November 27, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: workflow Meta: anything related to the development workflow of GAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants