quarto-dev / quarto-dev/quarto-cli
Support knitr warning option
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Quarto is ignoring warning: false passed to knitr.
Consider the minimal working example:
_quarto.yml:
project:
title: "mwe"
editor: visual
mwe.qmd:
---
title: "mwe"
---
## Quarto
```{r}
#| output: asis
#| warning: true
warning("My warning with warning: true")
```
```{r}
#| output: asis
#| warning: false
warning("My warning with warning: false")
```
It produces

For comparison, consider the minimal working example in R Markdown:
---
title: "mwe"
author: "Raniere Silva"
date: "2022-07-20"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r output='asis', warning=TRUE}
warning("My warning with warning: true")
```
```{r output='asis', warning=FALSE}
warning("My warning with warning: false")
```
The R Markdown document produces

Environment
Operating System: Ubuntu
quarto check Output
[✓] Checking Quarto installation......OK
Version: 1.0.32
Path: /opt/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.5 (Conda)
Path: /opt/conda/bin/python
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with conda install jupyter
[✓] Checking R installation...........OK
Version: 4.1.3
Path: /opt/conda/lib/R
LibPaths:
- /opt/conda/lib/R/library
rmarkdown: 2.14
[✓] Checking Knitr engine render......OK
quarto tools check Output
Tool Status Installed Latest
chromium Not installed --- 869685
tinytex Not installed --- v2022.07
Checklist
- formatted your issue so it is easier for us to read?
- included a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- documented the quarto version you're running, by pasting the output from running
quarto checkin the "Quarto Check Output" text area? - documented the version of the quarto tools you're running, by providing the output from running
quarto tools checkin the "Quarto Tools Check Output" text area? - documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
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 with the minimal _quarto.yml and mwe.qmd example, then inspect how the knitr engine handles the two warning options. Reproduce the output difference described in the issue and verify that the warning marked false is suppressed while the warning marked true remains visible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100