Skip to content

Commit 3015d59

Browse files
authored
Merge branch 'main' into feat/typst-annotation-filename
2 parents f9a5d50 + 2f1d73d commit 3015d59

80 files changed

Lines changed: 2899 additions & 3525 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/rules/filters/lua-development.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,25 @@ if quarto.log.debug then
142142
end
143143
```
144144

145+
## External Command Execution
146+
147+
Use `pandoc.pipe()` instead of `io.popen()` for calling external programs:
148+
149+
```lua
150+
-- ✅ Correct - pandoc.pipe passes args as array, no shell interpretation
151+
local ok, result = pcall(pandoc.pipe, command, {"arg1", "arg2"}, "")
152+
if not ok then
153+
quarto.log.error("Command failed: " .. tostring(result))
154+
end
155+
156+
-- ❌ Wrong - io.popen uses shell, breaks on paths with spaces
157+
local handle = io.popen(command .. " arg1 arg2", "r")
158+
```
159+
160+
`io.popen()` passes a string to the shell, which breaks when paths contain spaces (e.g., `C:\Program Files\...`). `pandoc.pipe()` calls the executable directly with arguments as an array — no shell, no quoting issues.
161+
162+
Reference: `quarto-pre/shiny.lua`, `quarto-post/pdf-images.lua`
163+
145164
## Filter Return Values
146165

147166
```lua

.github/actions/cache-typst/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ runs:
4141

4242
- name: Cache Typst package folder
4343
id: cache-typst-restore
44-
uses: actions/cache/restore@v4
44+
uses: actions/cache/restore@v5
4545
with:
4646
path: ${{ env.TYPST_CACHE }}
4747
key: ${{ runner.os }}-typst-1
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "Merge extension tests into test tree"
2+
description: >
3+
Copies test files from extension subtrees into the main test directories
4+
so they are discovered by the test runner and bucket creation.
5+
Extension tests live in their own repos (single source of truth) and are
6+
pulled in via git subtree — this step avoids duplicating them.
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Merge julia-engine tests
12+
shell: bash
13+
run: |
14+
SUBTREE=src/resources/extension-subtrees/julia-engine/tests
15+
cp -r "$SUBTREE/docs/julia-engine" tests/docs/julia-engine
16+
cp -r "$SUBTREE/smoke/julia-engine" tests/smoke/julia-engine

.github/workflows/actions/launcher/action.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/actions/quarto-dev/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ runs:
55
using: "composite"
66
steps:
77
- name: Cache deno std deps
8-
uses: actions/cache@v4
8+
uses: actions/cache@v5
99
with:
1010
path: ./src/resources/deno_std/cache
1111
key: ${{ runner.os }}-deno_std-2-${{ hashFiles('./src/resources/deno_std/deno_std.lock', './package/scripts/deno_std/deno_std.ts') }}
1212
restore-keys: |
1313
${{ runner.os }}-deno_std-2-
1414
1515
- name: Cache Cargo dependencies
16-
uses: actions/cache@v4
16+
uses: actions/cache@v5
1717
with:
1818
path: |
1919
~/.cargo/registry

.github/workflows/actions/sign-files/action.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,43 @@ runs:
4444
run: |
4545
Write-Output "::group::Install smctl if needed"
4646
if (!(Get-Command smctl -ErrorAction SilentlyContinue)) {
47-
curl -o smtools-windows-x64.msi "https://rstudio-buildtools.s3.amazonaws.com/posit-dev/smtools-windows-x64.msi"
48-
msiexec /i smtools-windows-x64.msi /quiet /qn /log smtools-windows-x64.log
49-
"C:/Program Files/DigiCert/DigiCert One Signing Manager Tools" | Out-File -FilePath $env:GITHUB_PATH -Append
47+
# Download with retry (transient S3 failures cause silent install failures)
48+
$maxRetries = 3
49+
$downloaded = $false
50+
for ($i = 1; $i -le $maxRetries; $i++) {
51+
Write-Output "Downloading smtools MSI (attempt $i/$maxRetries)..."
52+
curl -o smtools-windows-x64.msi "https://rstudio-buildtools.s3.amazonaws.com/posit-dev/smtools-windows-x64.msi"
53+
if ($LASTEXITCODE -ne 0) {
54+
Write-Output "::warning::curl failed with exit code $LASTEXITCODE"
55+
continue
56+
}
57+
$fileSize = (Get-Item smtools-windows-x64.msi).Length
58+
if ($fileSize -lt 1MB) {
59+
Write-Output "::warning::Downloaded file is only $fileSize bytes, expected ~90MB"
60+
continue
61+
}
62+
$downloaded = $true
63+
Write-Output "Download successful ($fileSize bytes)"
64+
break
65+
}
66+
if (-not $downloaded) {
67+
Write-Output "::error title=Download Error::Failed to download smtools MSI after $maxRetries attempts"
68+
exit 1
69+
}
70+
# Install synchronously (msiexec can return before install completes without -Wait)
71+
$process = Start-Process msiexec -ArgumentList '/i', 'smtools-windows-x64.msi', '/quiet', '/qn', '/log', 'smtools-windows-x64.log' -Wait -PassThru
72+
if ($process.ExitCode -ne 0) {
73+
Write-Output "::error title=Install Error::msiexec failed with exit code $($process.ExitCode)"
74+
if (Test-Path smtools-windows-x64.log) { Get-Content smtools-windows-x64.log -Tail 50 }
75+
exit 1
76+
}
77+
# Verify smctl is actually on disk before declaring success
78+
$smctlPath = "C:/Program Files/DigiCert/DigiCert One Signing Manager Tools"
79+
if (!(Test-Path "$smctlPath/smctl.exe")) {
80+
Write-Output "::error title=Install Error::smctl.exe not found at $smctlPath after install"
81+
exit 1
82+
}
83+
$smctlPath | Out-File -FilePath $env:GITHUB_PATH -Append
5084
Write-Output "SMCTL installed and added on PATH"
5185
} else {
5286
Write-Output "SMCTL already installed and on PATH"

0 commit comments

Comments
 (0)