quarto-dev / quarto-dev/quarto-cli
`julia` engine: Don't give stack trace on execution error
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
When rendering a file with engine: julia that results in an execution error, a stack trace is printed. This trace is the most salient part of the output and may obscure the actual error that Julia returned.
Withknitr and jupyter there is no stack trace in this scenario, making it clear the error comes from executing a code cell, not Quarto.
Steps to reproduce
julia-error.qmd:
---
title: "Untitled"
format: html
engine: julia
---
```{julia}
x
```
quarto render julia-error.qmd
Expected behavior
Running [1/1] at line 7: x
ERROR: Julia server returned error after receiving "run" command:
Failed to run notebook: /Users/charlottewickham/Documents/posit/weekly-log/2024-09-30/julia-error.qmd
ERROR: EvaluationError: Encountered 1 error during evaluation
Error 1 of 1
@ /Users/charlottewickham/Documents/posit/weekly-log/2024-09-30/julia-error.qmd:7
UndefVarError: `x` not defined
Actual behavior
Running [1/1] at line 7: x
ERROR: Julia server returned error after receiving "run" command:
Failed to run notebook: /Users/charlottewickham/Documents/posit/weekly-log/2024-09-30/julia-error.qmd
ERROR: EvaluationError: Encountered 1 error during evaluation
Error 1 of 1
@ /Users/charlottewickham/Documents/posit/weekly-log/2024-09-30/julia-error.qmd:7
UndefVarError: `x` not defined
ERROR: Internal julia server error
Stack trace:
at writeJuliaCommand (file:///Applications/quarto/bin/quarto.js:41295:19)
at eventLoopTick (ext:core/01_core.js:175:7)
at async executeJulia (file:///Applications/quarto/bin/quarto.js:41189:22)
at async Object.execute (file:///Applications/quarto/bin/quarto.js:40926:20)
at async renderExecute (file:///Applications/quarto/bin/quarto.js:84967:27)
at async renderFileInternal (file:///Applications/quarto/bin/quarto.js:85135:43)
at async renderFiles (file:///Applications/quarto/bin/quarto.js:85003:17)
at async render (file:///Applications/quarto/bin/quarto.js:89867:21)
at async Command.actionHandler (file:///Applications/quarto/bin/quarto.js:90015:32)
at async Command.execute (file:///Applications/quarto/bin/quarto.js:8070:13)
Your environment
- OS: Mac Sequoia 15.0
Quarto check output
Quarto 1.6.21
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.21
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2024.03.13
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/charlottewickham/Library/TinyTeX/bin/universal-darwin
Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.2
Path: /Users/charlottewickham/.pyenv/versions/3.12.2/bin/python
Jupyter: 5.7.2
Kernels: julia-1.10, ark, python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.3.3
Path: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources
LibPaths:
- /Users/charlottewickham/Library/R/arm64/4.3/library
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.45
rmarkdown: 2.28
[✓] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running quarto render julia-error.qmd with the reproduction shown in the issue and compare the Julia execution error with the expected output. Trace the Julia engine's error handling to identify where the Internal julia server error and stack trace are added; done means execution errors retain Julia's message without Quarto's internal stack trace.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100