Commit 47747ce
committed
make: Fix race generating markdown docs
Sequence the `doctest` and `toc` prerequisites in the `doc` target as
both of the prerequisites change the same files. If they run in parallel
and start with the same input, and one changes a file but the other does
not and the one that does not finishes last, you end up with an
unchanged file, wiping out the changes of the first. This can cause the
`check-uptodate` target to falsely report the docs are up to date.
This seems to have happened when adding the `Pi` variable to the
built-in docs. The PR successfully passed CI, yet the table of contents
did not contain the entry for `Pi`. Looking at the CI run [1], both
`doctest.awk` and `toc.awk` ran close together and the toc should have
been updated causing the workspace to be dirty, but because
`doctest.awk` takes a lot longer to run on `builtins.md` (as it has to
run and format many evy programs), it is likely it generated a file
without the updated toc and it all appeared clean.
Sequencing these two prerequisites should let `doctest` run to
completion first, then `toc` runs, using the output of `doctest` as
input. If either make changes, we should now fail the up-to-date
check.
Link: https://github.com/evylang/evy/actions/runs/10901756581/job/30252189731#step:3:1171 parent 9acf198 commit 47747ce
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
0 commit comments