Skip to content

New json file at QUARTO_EXECUTE_INFO (as per Quarto 1.8.19) not being written #333

@remlapmot

Description

@remlapmot

Thanks for this fantastic engine.

I think the following is a QuartoNotebookRunner.jl issue - but if it's actually something the Quarto CLI should do, do correct me.

I don't whether you've seen that as of Quarto 1.8.19 (in PR quarto-dev/quarto-cli#13171) Quarto writes a json file at the location of the new environment variable QUARTO_EXECUTE_INFO.

This works for engine: knitr, and all of the jupyter: engines I've tried including jupyter: julia-1.11. However, it seems that engine: julia currently fails to write this file.

You can see this with the following simple qmd file.

---
format:
  html:
    embed-resources: true
engine: julia
---

```{julia}
println(ENV["QUARTO_EXECUTE_INFO"])

println(isfile(ENV["QUARTO_EXECUTE_INFO"]))

if isfile(ENV["QUARTO_EXECUTE_INFO"]) 
  import Pkg; Pkg.add("JSON")
  using JSON
  json_string = JSON.parsefile(ENV["QUARTO_EXECUTE_INFO"])
  JSON.print(json_string, 2)
else
  println("The file didn't exist")
end
```

which generates

Image

Compared with say jupyter: julia-1.11 which does write the file.

---
format:
  html:
    embed-resources: true
jupyter: julia-1.11
---
  
```{julia}
println(ENV["QUARTO_EXECUTE_INFO"])

println(isfile(ENV["QUARTO_EXECUTE_INFO"]))

if isfile(ENV["QUARTO_EXECUTE_INFO"]) 
  import Pkg; Pkg.add("JSON")
  using JSON
  json_string = JSON.parsefile(ENV["QUARTO_EXECUTE_INFO"])
  JSON.print(json_string, 2)
end
```

which produces

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions