You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.
Proposal
Thanks for adding Quarto targets - I've been eagerly following the feature progress on this one! Ideally, tar_quarto() would produce a similar error message to tar_render() i.e. specify the lines/code chunk that produce an error (without needing to inspect tar_meta() for quick debugging). Currently it just specifies that there is an error in the pipeline. MWE below altering the vignette example with a spelling error in the code chunk.
targets::tar_dir({ # tar_dir() runs code from a temporary directory.# Unparameterized Quarto document:lines<- c(
"---",
"title: report.qmd source file",
"output_format: html",
"---",
"Assume these lines are in report.qmd.",
"```{r}",
# Note the incorrect spelling to cause an error"targets::tar_red(data)",
"```"
)
writeLines(lines, "report.qmd")
# Include the report in a pipeline as follows.targets::tar_script({
library(tarchetypes)
list(
tar_target(data, data.frame(x= seq_len(26), y=letters)),
tar_quarto(report, path="report.qmd")
)
}, ask=FALSE)
# Run pipelinetargets::tar_make()
})
#> • start target report#> ✖ error target report#> • end pipeline: 2.266 seconds#> Error : ! System command 'quarto' failed#> ✖ Problem with the pipeline.#> ℹ Show errors: tar_meta(fields = error, complete_only = TRUE)#> ℹ Learn more: https://books.ropensci.org/targets/debugging.html#> Error:#> ! problem with the pipeline.
quiet = FALSE in tarchetypes::tar_quarto() prints the Quarto build log to the R console. But otherwise, I'm afraid this is outside my control because the error message generated by the quarto R package is "System command 'quarto' failed".
Prework
Proposal
Thanks for adding Quarto targets - I've been eagerly following the feature progress on this one! Ideally,
tar_quarto()
would produce a similar error message totar_render()
i.e. specify the lines/code chunk that produce an error (without needing to inspecttar_meta()
for quick debugging). Currently it just specifies that there is an error in the pipeline. MWE below altering the vignette example with a spelling error in the code chunk.Created on 2022-07-01 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: