diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 01:01:25 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | cfedacb6d8c1e194575d5b5c62d2a724bdf2add6 (patch) | |
| tree | f2166d353f374beebb6beac08dbd02c77da3d5fc /tools | |
| parent | 10115489f8988cf6a649707202a51757708883a2 (diff) | |
| download | sketchbook-cfedacb6d8c1e194575d5b5c62d2a724bdf2add6.tar.gz sketchbook-cfedacb6d8c1e194575d5b5c62d2a724bdf2add6.zip | |
anim: Typst runs with / as its root, so a source can name any file
The Typst step ran in .zig-cache/typst with Typst's default root, the
directory of the file it compiles, so a source could name no file but
one in the cache: #image("/home/me/manual.pdf", page: 31) failed with
"would escape the project root". It now runs with --root /, which
makes an absolute path in a source the file's own path; relative paths
still resolve in the cache, as before.
Why / and not the build root: the file a scene names (a manual, a
paper) lives where its owner keeps it, outside any project, and a copy
or link under the project is one jj add away from being committed. /
is safe in that Typst only reads what a source names, and a scene's
sources are its author's code, compiled by a build that can already
read and run anything. The cache is still keyed by preamble and source
alone: a file changed in place keeps its old SVG until its cache entry
goes (typst.zig says so).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions
