quarto-dev / quarto-dev/quarto

`eval: !expr` is ignored when running chunks in Positron

Open
#942 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement vscode
Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

Bug description

When using eval: !expr in a chunk's #| options, the expression is not evaluated when running chunks in Positron via "Run Above" or "Quarto: Run All Cells" from the command palette. The chunk runs unconditionally regardless of what the expression evaluates to.

Using eval: false (a literal boolean) works as expected, which suggests the issue is specific to !expr not being resolved outside of quarto render.

Steps to reproduce

Create a .qmd file with the following content:

---
title: "eval expr test"
---

## Test

```{r}
test <- TRUE
```

```{r}
#| eval: !expr isFALSE(test)

message("This code will not be evaluated because the condition is not met.")
```

```{r}
1 + 1
```

Then run the chunks in Positron using "Run Above" or "Quarto: Run All Cells" from the command palette.

Change #| eval: !expr isFALSE(test) to #| eval: false and try again to compare the results.

Actual behavior

The second chunk runs unconditionally and prints the message, even though isFALSE(TRUE) evaluates to FALSE. The !expr expression is ignored.

Expected behavior

The second chunk should be skipped, since isFALSE(TRUE) returns FALSE. This is exactly what happens when running quarto render. The rendered output correctly omits the second chunk. This is also consistent with how eval: false behaves, where the chunk is correctly skipped.

Your environment

Positron Version: 2026.03.0 build 212
Code - OSS Version: 1.108.0
Commit: f3aae65e0a1a11d39226cd884520f49301daef82
Date: 2026-02-26T05:01:47.944Z
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Linux x64 6.19.6-arch1-1

Contributor guide

No contributing guide indexed for this repository

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

No source files or tests are named. Start by reproducing the .qmd example in Positron with “Run Above” and “Quarto: Run All Cells,” then compare that execution path with quarto render. Done means eval: !expr isFALSE(test) is resolved during chunk execution and the second chunk is skipped, matching rendered output.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.