From 5de68197c9ca2c9239324bc5200b87791cf1047a Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Fri, 23 Jan 2026 13:08:33 -0500 Subject: [PATCH 1/4] claude: Remove dtolnay/rust-toolchain action from CI workflows GitHub-hosted runners have stable Rust pre-installed by default. The dtolnay/rust-toolchain action is unnecessary since configure.sh already handles building typst-gather when cargo is available. Keeps cargo cache step in quarto-dev action for faster CI builds. Co-Authored-By: Claude Opus 4.5 --- .../workflows/actions/quarto-dev/action.yml | 5 ----- .github/workflows/create-release.yml | 20 ------------------- 2 files changed, 25 deletions(-) diff --git a/.github/workflows/actions/quarto-dev/action.yml b/.github/workflows/actions/quarto-dev/action.yml index b690b42e286..072c6f71e81 100644 --- a/.github/workflows/actions/quarto-dev/action.yml +++ b/.github/workflows/actions/quarto-dev/action.yml @@ -12,11 +12,6 @@ runs: restore-keys: | ${{ runner.os }}-deno_std-2- - - name: Install Rust for typst-gather - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - - name: Cache Cargo dependencies uses: actions/cache@v4 with: diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index c3c0703d938..5f9b584e5cc 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -133,11 +133,6 @@ jobs: if: ${{ inputs.publish-release }} uses: ./.github/workflows/actions/prevent-rerun - - name: Install Rust for typst-gather - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - - name: Configure run: | ./configure.sh @@ -266,11 +261,6 @@ jobs: if: ${{ inputs.publish-release }} uses: ./.github/workflows/actions/prevent-rerun - - name: Install Rust for typst-gather - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - - name: Configure run: | ./configure.sh @@ -370,11 +360,6 @@ jobs: if: ${{ inputs.publish-release }} uses: ./.github/workflows/actions/prevent-rerun - - name: Install Rust for typst-gather and launcher - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - - name: Configure run: | .\configure.cmd @@ -503,11 +488,6 @@ jobs: if: ${{ inputs.publish-release }} uses: ./.github/workflows/actions/prevent-rerun - - name: Install Rust for typst-gather - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - - name: Configure run: | ./configure.sh From c053b8ef4e5343fb10cf1d62495f9a825f682a06 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Fri, 23 Jan 2026 13:10:32 -0500 Subject: [PATCH 2/4] claude: Make typst-gather build mandatory in configure scripts Remove conditional cargo check - build should fail if Rust is not available rather than silently skipping typst-gather. Co-Authored-By: Claude Opus 4.5 --- configure.cmd | 12 +++--------- configure.sh | 11 +++-------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/configure.cmd b/configure.cmd index b4c2e839d03..2055c9dde1f 100644 --- a/configure.cmd +++ b/configure.cmd @@ -89,15 +89,9 @@ IF EXIST !QUARTO_BIN_PATH!\quarto.cmd ( ECHO NOTE: To use quarto please use quarto.cmd (located in this folder) or add the following path to your PATH ECHO !QUARTO_BIN_PATH! -REM Build typst-gather if cargo is available -where cargo >nul 2>nul -if %ERRORLEVEL% EQU 0 ( - ECHO Building typst-gather... - cargo build --release --manifest-path package\typst-gather\Cargo.toml -) else ( - ECHO Note: Rust/cargo not found, skipping typst-gather build - ECHO Install Rust to use 'quarto call typst-gather' -) +REM Build typst-gather +ECHO Building typst-gather... +cargo build --release --manifest-path package\typst-gather\Cargo.toml endlocal & set QUARTO_BIN_DEV=%QUARTO_BIN_PATH% diff --git a/configure.sh b/configure.sh index 4bbcd86c7bc..6cc8c5a66db 100755 --- a/configure.sh +++ b/configure.sh @@ -103,11 +103,6 @@ else quarto --version fi -# Build typst-gather if cargo is available -if command -v cargo &> /dev/null; then - echo "Building typst-gather..." - cargo build --release --manifest-path package/typst-gather/Cargo.toml -else - echo "Note: Rust/cargo not found, skipping typst-gather build" - echo "Install Rust to use 'quarto call typst-gather'" -fi +# Build typst-gather +echo "Building typst-gather..." +cargo build --release --manifest-path package/typst-gather/Cargo.toml From 86b70823fde4ab3290a9fc04a79aaffb59bd4234 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Fri, 23 Jan 2026 13:30:22 -0500 Subject: [PATCH 3/4] claude: Install typst-gather to bin/tools/{arch}/ during configure - configure.sh/cmd: Copy built binary to standard tools location - Simplify cmd.ts files to only use architectureToolsPath() - prepare-dist.ts: Error if typst-gather binary is missing Co-Authored-By: Claude Opus 4.5 --- configure.cmd | 3 +- configure.sh | 3 +- package/src/common/prepare-dist.ts | 20 +++++++------ src/command/call/typst-gather/cmd.ts | 37 +++++------------------- src/command/dev-call/typst-gather/cmd.ts | 20 +++++-------- 5 files changed, 30 insertions(+), 53 deletions(-) diff --git a/configure.cmd b/configure.cmd index 2055c9dde1f..1435a289b0e 100644 --- a/configure.cmd +++ b/configure.cmd @@ -89,9 +89,10 @@ IF EXIST !QUARTO_BIN_PATH!\quarto.cmd ( ECHO NOTE: To use quarto please use quarto.cmd (located in this folder) or add the following path to your PATH ECHO !QUARTO_BIN_PATH! -REM Build typst-gather +REM Build typst-gather and install to tools directory ECHO Building typst-gather... cargo build --release --manifest-path package\typst-gather\Cargo.toml +COPY package\typst-gather\target\release\typst-gather.exe "!QUARTO_BIN_PATH!\tools\x86_64\" endlocal & set QUARTO_BIN_DEV=%QUARTO_BIN_PATH% diff --git a/configure.sh b/configure.sh index 6cc8c5a66db..64f54e790e0 100755 --- a/configure.sh +++ b/configure.sh @@ -103,6 +103,7 @@ else quarto --version fi -# Build typst-gather +# Build typst-gather and install to tools directory echo "Building typst-gather..." cargo build --release --manifest-path package/typst-gather/Cargo.toml +cp package/typst-gather/target/release/typst-gather "$QUARTO_BIN_PATH/tools/$DENO_ARCH_DIR/" diff --git a/package/src/common/prepare-dist.ts b/package/src/common/prepare-dist.ts index 025f18247f2..b97bece8edc 100755 --- a/package/src/common/prepare-dist.ts +++ b/package/src/common/prepare-dist.ts @@ -100,7 +100,7 @@ export async function prepareDist( } } - // Stage typst-gather binary if it exists (built by configure.sh) + // Stage typst-gather binary (built by configure.sh) // Only stage if the build machine architecture matches the target architecture // (cross-compilation is not currently supported) const buildArch = Deno.build.arch === "aarch64" ? "aarch64" : "x86_64"; @@ -111,15 +111,17 @@ export async function prepareDist( "package/typst-gather/target/release", typstGatherBinaryName, ); - if (existsSync(typstGatherSrc)) { - info("\nStaging typst-gather binary"); - const typstGatherDest = join(targetDir, config.arch, typstGatherBinaryName); - ensureDirSync(join(targetDir, config.arch)); - copySync(typstGatherSrc, typstGatherDest, { overwrite: true }); - info(`Copied ${typstGatherSrc} to ${typstGatherDest}`); - } else { - info("\nNote: typst-gather binary not found, skipping staging"); + if (!existsSync(typstGatherSrc)) { + throw new Error( + `typst-gather binary not found at ${typstGatherSrc}\n` + + "Run ./configure.sh to build it.", + ); } + info("\nStaging typst-gather binary"); + const typstGatherDest = join(targetDir, config.arch, typstGatherBinaryName); + ensureDirSync(join(targetDir, config.arch)); + copySync(typstGatherSrc, typstGatherDest, { overwrite: true }); + info(`Copied ${typstGatherSrc} to ${typstGatherDest}`); } else { info(`\nNote: Skipping typst-gather staging (build arch ${buildArch} != target arch ${config.arch})`); } diff --git a/src/command/call/typst-gather/cmd.ts b/src/command/call/typst-gather/cmd.ts index 104aae5566a..280ba60089f 100644 --- a/src/command/call/typst-gather/cmd.ts +++ b/src/command/call/typst-gather/cmd.ts @@ -452,36 +452,15 @@ export const typstGatherCommand = new Command() Deno.exit(1); } - // Find typst-gather binary - // First try architecture-specific path, then fall back to PATH - let typstGatherBinary: string; + // Find typst-gather binary in standard tools location const binaryName = isWindows ? "typst-gather.exe" : "typst-gather"; - - const archPath = architectureToolsPath(binaryName); - if (existsSync(archPath)) { - typstGatherBinary = archPath; - } else { - // Try to find in PATH or use development location - const quartoRoot = Deno.env.get("QUARTO_ROOT"); - if (quartoRoot) { - const devPath = join( - quartoRoot, - "package/typst-gather/target/release", - binaryName, - ); - if (existsSync(devPath)) { - typstGatherBinary = devPath; - } else { - console.error( - `typst-gather binary not found.\n` + - `Build it with: cd package/typst-gather && cargo build --release`, - ); - Deno.exit(1); - } - } else { - console.error("typst-gather binary not found."); - Deno.exit(1); - } + const typstGatherBinary = architectureToolsPath(binaryName); + if (!existsSync(typstGatherBinary)) { + console.error( + `typst-gather binary not found.\n` + + `Run ./configure.sh to build and install it.`, + ); + Deno.exit(1); } // Determine config file to use diff --git a/src/command/dev-call/typst-gather/cmd.ts b/src/command/dev-call/typst-gather/cmd.ts index 739cb439e85..8c41c4c25c4 100644 --- a/src/command/dev-call/typst-gather/cmd.ts +++ b/src/command/dev-call/typst-gather/cmd.ts @@ -5,9 +5,11 @@ */ import { Command } from "cliffy/command/mod.ts"; +import { existsSync } from "../../../deno_ral/fs.ts"; import { error, info } from "../../../deno_ral/log.ts"; import { join } from "../../../deno_ral/path.ts"; import { isWindows } from "../../../deno_ral/platform.ts"; +import { architectureToolsPath } from "../../../core/resources.ts"; export const typstGatherCommand = new Command() .name("typst-gather") @@ -33,21 +35,13 @@ export const typstGatherCommand = new Command() "src/command/dev-call/typst-gather/typst-gather.toml", ); - // Path to the typst-gather binary + // Find typst-gather binary in standard tools location const binaryName = isWindows ? "typst-gather.exe" : "typst-gather"; - const typstGatherBinary = join( - quartoRoot, - "package/typst-gather/target/release", - binaryName, - ); - - // Check if binary exists - try { - await Deno.stat(typstGatherBinary); - } catch { + const typstGatherBinary = architectureToolsPath(binaryName); + if (!existsSync(typstGatherBinary)) { error( - `typst-gather binary not found at ${typstGatherBinary}\n` + - "Build it with: cd package/typst-gather && cargo build --release", + `typst-gather binary not found.\n` + + "Run ./configure.sh to build and install it.", ); Deno.exit(1); } From 4fc29a05581290b62d9e7da98b5ac8ac93aa394b Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Fri, 23 Jan 2026 13:43:38 -0500 Subject: [PATCH 4/4] fix numeric pdf version test to use string there is logic in TS to handle numbers if they get through but following the schema and using an explicit string when that's the only entry is safest and clearest --- tests/docs/smoke-all/pdf-standard/pdfversion-numeric.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docs/smoke-all/pdf-standard/pdfversion-numeric.qmd b/tests/docs/smoke-all/pdf-standard/pdfversion-numeric.qmd index 8226dc51f46..60e181eec14 100644 --- a/tests/docs/smoke-all/pdf-standard/pdfversion-numeric.qmd +++ b/tests/docs/smoke-all/pdf-standard/pdfversion-numeric.qmd @@ -1,7 +1,7 @@ --- title: "PDF version (numeric YAML)" lang: en -pdf-standard: 2.0 +pdf-standard: "2.0" keep-tex: true keep-typ: true _quarto: