[backport] typst gather which await v1.10 - #14732
Open
cderv wants to merge 2 commits into
Open
Conversation
The non-vendored branch of each dependency's configure callback verifies the binary is on PATH with `if (which(file) === undefined)`. `which` is async, so this compares a Promise to undefined: always false, guard never fires. Effect: with QUARTO_VENDOR_BINARIES=false, configureDependency skips the download but still calls configure(). The guard is the only thing meant to catch a missing binary, so the build reports success and produces a Quarto tree without it. For typst-gather this surfaces only at render time, as "typst-gather analyze failed; staging all packages as fallback". Fixes the same bug in typst-gather, typst, pandoc and esbuild. Also refresh the "binary not found" message in typstGatherBinaryPath() and the dev-call command: configure.sh no longer builds typst-gather (the cargo step and package/typst-gather/ are gone; it is a downloaded release binary), and neither message mentioned QUARTO_TYPST_GATHER, which both already honour. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
THis PR is a backport to v1.10
Description
Backport of #14731 to
v1.10.v1.10carries all four instances of the bug identically: the non-vendoredbranch of each dependency's
configurecallback inpackage/src/common/dependencies/checksif (which(file) === undefined), butwhichisasync(src/core/path.ts), so this compares aPromisetoundefined— always false, guard never fires.With
QUARTO_VENDOR_BINARIES=false(what conda-forge uses, so binary deps comefrom conda packages rather than downloaded release assets),
configureDependencyskips the download but still calls
configure(). This guard is the only thingmeant to catch a missing binary, so the build reports success and produces a
Quarto tree without it. Confirmed against a real green CI build of quarto
1.10.18 on conda-forge — which is why this matters on the stable branch rather
than only on
main. The failure surfaces only at runtime: every Typst renderprints
typst-gather analyze failed; staging all packages as fallback: ..., andquarto call typst-gatherdies with a misleading error.Also refreshes the stale "binary not found" message in
typstGatherBinaryPath()and the
dev-call typst-gathercommand, which told users toRun ./configure.sh to build and install it.—configure.shno longer buildstypst-gather (the cargo step and
package/typst-gather/were removed in 1.10;it is a downloaded release binary), and neither message mentioned
QUARTO_TYPST_GATHER, which both code paths already honour.Backport notes
Prepared per
dev-docs/checklist-backport-a-pr.md:v1.10with zero conflicts in all sixsource files. The only conflict was
news/changelog-1.11.md, which does notexist on this branch and was dropped, as the checklist prescribes.
# v1.11 backports > ## In this releaseinnews/changelog-1.10.mdper.claude/rules/changelog.md.v1.10, so that commitalso introduces the dual top-level structure (
# v1.11 backports/# v1.10 changes) that the file did not have yet. The pre-existingv1.10content is unchanged, just moved under the
# v1.10 changesheading.Checklist
I have (if applicable):
The checklist step of manually running the test-suite GHA workflow on
v1.10has not been done and is worth doing before merge — nothing in this change
has been built or test-run. Note also that
package/srcis not covered by anytest suite and no CI workflow runs
deno checkover it, which is howPromise<string | undefined> === undefined(TS error 2367) shipped in the firstplace.
AI-assisted PR
src/core/path.ts(confirmedwhichisasync), the four
configurecallbacks inpackage/src/common/dependencies/, verified against the realv1.10branchthat all four instances and the stale error message are present there;
dev-docs/checklist-backport-a-pr.mdand.claude/rules/changelog.mdfor thebackport and changelog-placement conventions.
content before submitting.