Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fallback to parse usual R comments in Quarto #2225

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Feb 10, 2023

This is related to discussion in quarto-dev/quarto-cli#4306

Making this draft PR to test a scenario and discuss. This is WIP

Regarding second commit, if we don't error but just don't fallback we would get this behavior with an obscure error due to in chunk content not being parsed as option

---
title: "Example"
format: html
engine: knitr
---

```{r}
# install.packages(c("DBI", "RSQLite"))
db = DBI::dbConnect(RSQLite::SQLite(), ":memory:")
```

```{sql}
#| label: test multiqueries -5
#|  connection: db

select 1
```
processing file: test2.qmd
  |..........................................          |  80% (unnamed-chunk-2)Quitting from lines 14-18 (test2.qmd)
Error:
! The 'connection' option (DBI connection) is required for sql chunks.
Backtrace:
  1. global .main()
  2. execute(...)
  3. rmarkdown::render(...)
  4. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  5. knitr:::process_file(text, output)
  8. knitr:::process_group.block(group)
  9. knitr:::call_block(x)
 10. knitr:::block_exec(params)
 13. knitr (local) engine(options)
 14. knitr:::stop2("The 'connection' option (DBI connection) is required for sql chunks.")
                                                                                                            Exécution arrêtée

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant