quarto-dev / quarto-dev/quarto-cli

Support knitr warning option

Open
#1,462 1 comment 1 reaction 0 assignees View on GitHub

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

Screenshot from 2022-07-20 12-40-35

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

Screenshot from 2022-07-20 12-42-16

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 check in the "Quarto Check Output" text area?
  • documented the version of the quarto tools you're running, by providing the output from running quarto tools check in 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.