Files
Verso/services
claudeandClaude Sonnet 4.6 45609de048
Build and Deploy Verso / deploy (push) Successful in 11m5s
Build and Deploy Verso (prod) / deploy (push) Successful in 1m24s
fix(typst): prevent no-PDF race on heavy documents
typst watch emits "compiled successfully" then immediately starts a new
compile cycle when it detected file changes during the current one (heavy
documents trigger this because ResourceWriter writes many files while
compilation is already underway).  The new cycle truncates output.pdf,
so the CompileManager copy gets size=0 → "no PDF produced".

Fix: have typst write to output-typst-snap.pdf (staging path).  The
moment "compiled successfully" is detected, atomically rename it to
output.pdf — before the 150 ms diagnostic-flush wait, before yielding
the event loop.  The concurrent recompile writes to the staging file
again without touching output.pdf.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 13:53:45 +00:00
..