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

let AutoDoc set an exit code in the case of failure #280

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ThomasBreuer
Copy link

@ThomasBreuer ThomasBreuer commented Nov 12, 2024

The idea is the same as in gap-system/gap/pull/5835, but here we deal with package documentation:
When building a manual, collect the info messages printed by MakeGAPDocDoc, use a heuristic to decide whether the result is acceptable, and let makedoc.g report failure if not; this can be used in automated tests.

For that, the function AutoDoc now ~~returns a record; up to now, it had no return value.~~sets a nonzero exit code if applicable.

This change will automatically become available in all packages that use makedoc.g containing AutoDoc calls. This should not cause problems because the exit code of processing makedoc.g did not have a meaning before the change.

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.89%. Comparing base (5f19ad0) to head (3426245).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
gap/Magic.gi 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #280      +/-   ##
==========================================
+ Coverage   79.83%   79.89%   +0.06%     
==========================================
  Files          13       13              
  Lines        2241     2258      +17     
==========================================
+ Hits         1789     1804      +15     
- Misses        452      454       +2     
Files with missing lines Coverage Δ
gap/Magic.gd 100.00% <ø> (ø)
makedoc.g 100.00% <100.00%> (ø)
gap/Magic.gi 70.99% <88.23%> (+0.72%) ⬆️
---- 🚨 Try these New Features:

@ThomasBreuer
Copy link
Author

@fingolfin
From the viewpoint of https://github.com/gap-system/ReleaseTools/blob/master/release-gap-package, it is not a good idea to change AutoDoc to return something:
The makedoc.g files of packages that call AutoDoc typically do not suppress its output, and the release-gap-package script collects and evaluates all output obtained by processing makedoc.g.
Thus the proposed change would make release-gap-package's work more complicated, instead of simplifying the task.
I will change the approach (again) ...

@ThomasBreuer ThomasBreuer changed the title let AutoDoc return GAPDoc info messages let AutoDoc set an exit code in the case of failure Nov 20, 2024
Just set an exit value in `AutoDoc` in case of failure,
do not change the output vaue of `AutoDoc`,
undo the proposed changes in `makedoc.g` and in the documentation.

(In particular, do not call `QUIT` or `QuitGap` in `makedoc.g`,
since this file gets read inside a testfile.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant