Skip to content

Auto-recompile stale Asymptote figures in handout builds#97

Merged
PatrikBak merged 1 commit into
mainfrom
patrik/handout-asy-incremental-compile
May 14, 2026
Merged

Auto-recompile stale Asymptote figures in handout builds#97
PatrikBak merged 1 commit into
mainfrom
patrik/handout-asy-incremental-compile

Conversation

@PatrikBak
Copy link
Copy Markdown
Owner

Summary

  • BuildCommand walks each handout's referenced images before TeX compile and recompiles any .asy whose .pdf/.svg is missing or older than its source (plus transitive include/import deps).
  • Recompiles are batched into a single _Export-Asy.ps1 invocation per handout, and deduplicated across handouts so language variants of the same handout don't re-do the same figures.
  • _common.asy is intentionally excluded from the dep graph since most edits there are additive helpers that can't affect existing figures. New --force-asy flag triggers a full rebuild for semantic changes (palette tweak, modified helper). New --skip-asy bypasses the check entirely; CI uses it because asy/Inkscape aren't on the runner.
  • Skeleton generation now lives inside the --skip-compile gate (no point if we're not compiling), and PDF uploads are gated on having actually compiled (so --skip-compile doesn't publish stale binaries — image uploads still happen).
  • Extracted external-process spawning to MathComps.Shared.ProcessRunner, shared between the TeX compile and the new Asymptote path.

🤖 Generated with Claude Code

BuildCommand now walks each handout's referenced images and recompiles
any .asy whose .pdf/.svg is missing or older than its source (plus
transitive include/import deps). Compile invocation is shared with the
TeX path via the new MathComps.Shared.ProcessRunner.

_common.asy is intentionally excluded from the dep graph (edits are
almost always additive helpers); a new --force-asy flag triggers a full
rebuild for semantic changes. --skip-asy bypasses the check entirely
and is what CI uses since asy/Inkscape aren't on the runner.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@PatrikBak PatrikBak enabled auto-merge May 14, 2026 00:20
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
math-comps Ready Ready Preview, Comment May 14, 2026 0:21am

@PatrikBak PatrikBak merged commit c43a846 into main May 14, 2026
4 checks passed
@PatrikBak PatrikBak deleted the patrik/handout-asy-incremental-compile branch May 14, 2026 00:23
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