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

Offen
#942 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
52/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
r, typescript

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement vscode
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

Vorherrschende Sprache
TypeScript
Sterne
665
Forks
69
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
14

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus quarto-dev/quarto

Alle Issues in quarto-dev/quarto

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.