Skip to content

Commit 4fbd77c

Browse files
authored
Merge branch 'main' into fix/issue13712
2 parents 86af47a + 9c6d652 commit 4fbd77c

326 files changed

Lines changed: 20333 additions & 3396 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.

.github/workflows/test-smokes.yml

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ jobs:
126126
path: |
127127
${{ env.RENV_PATHS_ROOT }}
128128
renv/library
129-
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-1-${{ hashFiles('tests/renv.lock') }}
129+
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-2-${{ hashFiles('tests/renv.lock') }}
130130
restore-keys: |
131-
${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-1-
131+
${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-2-
132132
133133
- name: Install missing system deps
134134
if: runner.os == 'Linux'
@@ -149,15 +149,23 @@ jobs:
149149
- name: Restore R packages
150150
working-directory: tests
151151
run: |
152+
cat("::group::Installing renv if needed\n")
152153
if (!requireNamespace('renv', quietly = TRUE)) install.packages('renv')
154+
cat("::endgroup::\n")
155+
cat("::group::Restoring R packages from renv.lock\n")
153156
renv::restore()
157+
cat("::endgroup::\n")
158+
cat("::group::Installing dev versions of knitr and rmarkdown\n")
154159
# Install dev versions for our testing
155160
# Use r-universe to avoid github api calls
156161
try(install.packages('rmarkdown', repos = c('https://rstudio.r-universe.dev', getOption('repos'))))
157162
try(install.packages('knitr', repos = c('https://yihui.r-universe.dev', getOption('repos'))))
163+
cat("::endgroup::\n")
158164
if ('${{ inputs.extra-r-packages }}' != '') {
159165
cat(sprintf("::notice::Running with the following extra R packages for renv: %s\n", "${{ inputs.extra-r-packages }}"))
166+
cat("::group::Installing extra R packages\n")
160167
renv::install(strsplit("${{ inputs.extra-r-packages }}", split = ",")[[1]])
168+
cat("::endgroup::\n")
161169
}
162170
shell: Rscript {0}
163171
env:
@@ -256,17 +264,36 @@ jobs:
256264
env:
257265
# Useful as TinyTeX latest release is checked in run-test.sh
258266
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
259-
QUARTO_LOG_LEVEL: DEBUG
260267
run: |
261268
haserror=0
269+
failed_tests=()
262270
readarray -t my_array < <(echo '${{ inputs.buckets }}' | jq -rc '.[]')
263-
for file in "${my_array[@]}"; do
271+
for file in "${my_array[@]}"; do
272+
echo "::group::Testing ${file}"
264273
echo ">>> ./run-tests.sh ${file}"
265-
shopt -s globstar && ./run-tests.sh $file
274+
# Run tests without -e so we don't exit on first failure
275+
set +e
276+
shopt -s globstar && ./run-tests.sh "$file"
266277
status=$?
267-
[ $status -eq 0 ] && echo ">>> No error in this test file" || haserror=1
278+
set -e
279+
echo "::endgroup::"
280+
if [ $status -ne 0 ]; then
281+
echo "::error title=Test Bucket Failed::Test bucket ${file} failed with exit code ${status}"
282+
echo ">>> Error found in test file: ${file}"
283+
haserror=1
284+
failed_tests+=("$file")
285+
fi
268286
done
269-
[ $haserror -eq 0 ] && echo ">>> All tests passed" || exit 1
287+
if [ $haserror -eq 1 ]; then
288+
echo "---- FAILING TESTS SUMMARY ----"
289+
echo " The following test buckets failed:"
290+
for failed in "${failed_tests[@]}"; do
291+
echo " - $failed"
292+
done
293+
exit 1
294+
else
295+
echo ">>> All tests passed"
296+
fi
270297
working-directory: tests
271298
shell: bash
272299

@@ -277,18 +304,26 @@ jobs:
277304
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
278305
run: |
279306
$haserror=$false
307+
$failed_tests=@()
280308
foreach ($file in ('${{ inputs.buckets }}' | ConvertFrom-Json)) {
309+
Write-Host "::group::Testing ${file}"
281310
Write-Host ">>> ./run-tests.ps1 ${file}"
282311
./run-tests.ps1 $file
283312
$status=$LASTEXITCODE
284-
if ($status -eq 1) {
285-
Write-Host ">>> Error found in test file"
313+
Write-Host "::endgroup::"
314+
if ($status -ne 0) {
315+
Write-Host "::error title=Test Bucket Failed::Test bucket ${file} failed with exit code ${status}"
316+
Write-Host ">>> Error found in test file: ${file}"
286317
$haserror=$true
287-
} else {
288-
Write-Host ">>> No error in this test file"
318+
$failed_tests+=$file
289319
}
290320
}
291321
if ($haserror) {
322+
Write-Host "---- FAILING TESTS SUMMARY ----"
323+
Write-Host " The following test buckets failed:"
324+
foreach ($failed in $failed_tests) {
325+
Write-Host " - $failed"
326+
}
292327
Exit 1
293328
} else {
294329
Write-Host ">>> All tests have passed"

configuration

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@
77
# but it also used when packaging (e.g. run configure.sh, then prepare-dist.sh, then package.sh)
88
# deno_dom should match release at https://github.com/b-fuze/deno-dom/releases
99

10-
# NB: When these are updated, you must also update the versions
10+
# IMPORTANT: When these are updated, you must also update the versions
1111
# in src/command/check/check.ts
12-
1312
# Binary dependencies
1413
export DENO=v2.4.5
1514
# TODO figure out where 0.1.41 apple silicon libs are available
1615
export DENO_DOM=v0.1.41-alpha-artifacts
17-
export PANDOC=3.6.3
16+
export PANDOC=3.8.3
1817
export DARTSASS=1.87.0
1918
export ESBUILD=0.25.10
20-
export TYPST=0.13.0
19+
export TYPST=0.14.2
2120

2221

2322
# NB: we can't put comments in the same line as export statements because it

configure.cmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ if "%QUARTO_VENDOR_BINARIES%" == "true" (
6262
POPD
6363
)
6464

65+
IF NOT DEFINED QUARTO_DENO_DIR (
66+
SET "DENO_DIR=!QUARTO_BIN_PATH!\deno_cache"
67+
) ELSE (
68+
SET "DENO_DIR=!QUARTO_DENO_DIR!"
69+
)
70+
6571
PUSHD !QUARTO_PACKAGE_PATH!\src
6672
ECHO Configuring Quarto from !cd!
6773
CALL quarto-bld.cmd configure --log-level info

dev-docs/feature-format-matrix/qmd-files/math/document.qmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ format:
55
html: default
66
_quarto:
77
tests:
8+
run:
9+
skip: "Pandoc 3.7+ removes newlines in display math blocks (fixed in pandoc@8123be6, awaiting release)"
810
html:
911
ensureHtmlElements:
1012
- []

dev-docs/subtree-extensions.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Subtree extensions
2+
3+
Subtree extensions live in `src/resources/subtree-extensions`.
4+
5+
Each is the complete git repository of a Quarto extension, e.g. the directory tree for the Julia engine looks like
6+
7+
```
8+
src/resources/extension-subtrees/
9+
julia-engine/
10+
_extensions/
11+
julia-engine/
12+
_extension.yml
13+
julia-engine.ts
14+
...
15+
```
16+
17+
The command to add or update a subtree is
18+
19+
```
20+
quarto dev-call pull-git-subtree subtree-name
21+
```
22+
23+
Omit _subtree-name_ to add/update all.
24+
25+
The code in `src/command/dev-call/pull-git-subtree/cmd.ts` contains a table of subtree
26+
27+
- `name`
28+
- `prefix` (subdirectory)
29+
- `remoteUrl`
30+
- `remoteBranch`
31+
32+
If the command is successful, it will add two commits, one the squashed changes from the remote repo and one a merge commit.
33+
34+
The commits have subtree status information in the message and metadata, so don't change them.
35+
36+
The commits can't be rebased -- you'll get weird errors indicating it tried to merge changes at the root of the repo.
37+
38+
So you must either
39+
40+
- run the command when ready to merge to main, or
41+
- remove the commits when rebasing, and run the `dev-call` command again

dev-docs/update-pandoc-checklist.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ Carlos needs to run this:
66
- [ ] Run `AWS_PROFILE=... ./package/src/quarto-bld update-pandoc PANDOC_VERSION`
77
- [ ] look at `git diff`, specifically for changes in Pandoc templates, and adjust as needed.
88

9+
As a reminder, our templates are kept in the same directories as Pandoc's templates, but with different names. `git diff` will show the diff in Pandoc's template; we have to manually patch
10+
ours. (We can't just use `patch` because the templates have diverged too much)
11+
12+
### Pandoc templates
13+
14+
The general rule for the naming is that "format.template" indicates Pandoc naming, and "template.format" indicates ours. Examples below:
15+
16+
#### beamer
17+
18+
- Pandoc's: src/resources/formats/beamer/pandoc/beamer.template
19+
- Ours: src/resources/formats/beamer/pandoc/template.tex
20+
21+
Partials:
22+
23+
- Pandoc's:
24+
- src/resources/formats/beamer/pandoc/latex.common
25+
- Ours:
26+
- src/resources/formats/beamer/pandoc/common.latex
27+
928
## Manual steps
1029

1130
- [ ] Update schemas by inspecting [their changelog](https://github.com/jgm/pandoc/blob/main/changelog.md) for new commands, deprecation removals, etc

llm-docs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# LLM documentation for Quarto
2+
3+
This directory contains documents providing context and instructions for LLMs
4+
to execute tasks in the `quarto-cli` codebase.

llm-docs/error-messages.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Writing Error Messages in Quarto
2+
3+
## The Rule
4+
5+
Each `error()`, `warning()`, or `info()` call should be **exactly one line**.
6+
7+
- ✅ End messages with `\n` to add blank lines after
8+
- ❌ Never start messages with `\n`
9+
- ❌ Never use empty `error("")` calls
10+
11+
## Why This Matters
12+
13+
Quarto's logging prefixes each call with `ERROR:` / `WARNING:` / `INFO:`. Starting a message with `\n` or using empty calls creates confusing output:
14+
15+
```
16+
ERROR: Multiple files found
17+
ERROR:
18+
Or specify entry point: ← Empty "ERROR:" line from \n at start
19+
```
20+
21+
## Adding Blank Lines
22+
23+
To add a blank line between sections, end the **previous** message with `\n`:
24+
25+
### ✅ Good
26+
27+
```typescript
28+
error("Multiple .ts files found in src/\n"); // \n at END
29+
error("Specify entry point as argument:");
30+
error(" quarto call build-ts-extension src/my-engine.ts");
31+
```
32+
33+
Output:
34+
```
35+
ERROR: Multiple .ts files found in src/
36+
ERROR:
37+
ERROR: Specify entry point as argument:
38+
ERROR: quarto call build-ts-extension src/my-engine.ts
39+
```
40+
41+
### ❌ Bad
42+
43+
```typescript
44+
error("Multiple .ts files found in src/");
45+
error("\nSpecify entry point as argument:"); // \n at START
46+
error(" quarto call build-ts-extension src/my-engine.ts");
47+
```
48+
49+
Output:
50+
```
51+
ERROR: Multiple .ts files found in src/
52+
ERROR:
53+
ERROR: Specify entry point as argument: ← Blank "ERROR:" line before
54+
ERROR: quarto call build-ts-extension src/my-engine.ts
55+
```
56+
57+
### ❌ Also Bad
58+
59+
```typescript
60+
error("Multiple .ts files found in src/");
61+
error(""); // Empty call to add spacing
62+
error("Specify entry point as argument:");
63+
```
64+
65+
Output:
66+
```
67+
ERROR: Multiple .ts files found in src/
68+
ERROR: ← Empty "ERROR:" line
69+
ERROR: Specify entry point as argument:
70+
```
71+
72+
## Complete Example
73+
74+
Here's a real example from `build-ts-extension` showing proper formatting:
75+
76+
### ✅ Good
77+
78+
```typescript
79+
error("No src/ directory found.\n");
80+
error("Create a TypeScript file in src/:");
81+
error(" mkdir -p src");
82+
error(" touch src/my-engine.ts\n");
83+
error("Or specify entry point as argument:");
84+
error(" quarto call build-ts-extension src/my-engine.ts");
85+
```
86+
87+
Output:
88+
```
89+
ERROR: No src/ directory found.
90+
ERROR:
91+
ERROR: Create a TypeScript file in src/:
92+
ERROR: mkdir -p src
93+
ERROR: touch src/my-engine.ts
94+
ERROR:
95+
ERROR: Or specify entry point as argument:
96+
ERROR: quarto call build-ts-extension src/my-engine.ts
97+
```
98+
99+
Notice:
100+
- Each `error()` call is one complete line
101+
- Blank lines are created by ending the previous message with `\n`
102+
- Indentation (with spaces) is preserved within each message
103+
- Message flow is clear and readable

0 commit comments

Comments
 (0)