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

未关闭
#942 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
r, typescript

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
TypeScript
星标
665
派生
69
平均合并
2 天 4 小时
30 天内合并 PR
14

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

quarto-dev/quarto 的其他 Issue

查看 quarto-dev/quarto 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。