Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
330 stars 226 forks source link

Use xargs (with -r option) again when running html-check-links #3303

Closed d-torrance closed 6 days ago

d-torrance commented 2 weeks ago

Back in #1875, I broke make -C Macaulay2/html-check-links, which finds all the html files we just built and checks them for broken links. It previously used xargs to call ls and sort them from oldest to newest.

This was a problem when we didn't build any html documentation -- we called ls on the empty list and ended up checking all the non-html files for broken links. So I switched away from xargs, inadvertently completely breaking everything. We haven't actually checked for any broken links for over three years!

I tried fixing it in #2392, but there were some strange bison-related errors I couldn't figure out. They appear not to be an issue anymore, so we're trying again!

Basically, we return to using xargs, but now with the -r (short for --no-run-if-empty) option so we don't run ls on the empty list again. We also stop searching for xhtml files since there won't be any.

For now, the autotools builds should fail because there are lots and lots of broken links thanks to a mistake I made in #3277. But that's a good thing because it will mean that the check is working again! I'll rebase this on top of #3299 once it's merged.

Closes: #2398

mahrud commented 1 week ago

(I think you already removed this change from this PR, but for the record, I hate how the filenames in the documentation are nearly garbled ... I'd love a different system that doesn't have a _dozenunder__scores_in_it!!)