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

Đang mở
#942 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
r, typescript

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
665
Fork
69
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quarto-dev/quarto

Tất cả issue của quarto-dev/quarto

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.