Most knitr engines are not yet supported: {cat}, {css}, {Rcpp}... cells go to Jupyter
Maintainer thường phản hồi trong vòng 1 ngày
@cderv đang làm issue này rồi.
Từ ngày 27/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
In a document using knitr, q2 runs a cell with knitr only when its language is r, python, sql, bash or sh. knitr has many more engines: knitr 1.52.3 registers 52 (names(knitr::knit_engines$get())), like cat, css, js, Rcpp, stan or sass. q2 gives a cell for one of those to the jupyter engine instead, and the render fails. Quarto 1 renders the same document.
This document uses the cat engine to write a CSS file, as in the knitr documentation:
---
title: cat engine
---
```{r}
1 + 1
```
```{cat}
#| engine-opts:
#| file: my-style.css
h2 { color: blue; }
```
With q2 0.48.0-nightly.20261126, q2 render doc.qmd fails and my-style.css is not written:
Error [Q-18-5]: Owned Language Has No Runnable Kernel
the `jupyter` engine runs `cat` cells, but no installed Jupyter kernel declares that language.
ℹ Install a Jupyter kernel for the language (`jupyter kernelspec list` shows what is installed), name a kernel for the whole document with `jupyter: <kernel>`, or give the cell `eval: false` if it is only meant to be shown.
With Quarto 1.12.3 (pre-release), quarto render doc.qmd succeeds and writes my-style.css.
I believe this is because q2 picks an engine for each cell language, and knitr claims only these five languages. Any other language goes to the Jupyter fallback.
Quarto 1 picks one engine for the whole document. Its knitr engine also claims only r, but once knitr is selected it knits the whole file, and each chunk goes to its own knitr engine.
claimsLanguage: (language: string) => {
return language.toLowerCase() === "r";
},
Quarto 1 engine selection: the first claimed language picks the engine for the document
// if there are languages see if any engines want to claim them
const languagesWithClassesMap = languagesWithClasses(markdown);
// see if there is an engine that claims this language (highest score wins)
for (const [language, firstClass] of languagesWithClassesMap) {
let bestEngine: ExecutionEngineDiscovery | undefined;
let bestScore = -Infinity;
for (const [_, engine] of reorderedEngines) {
const claim = engine.claimsLanguage(language, firstClass);
// false means "don't claim", skip this engine entirely
if (claim === false) {
continue;
}
// true -> score 1, number -> use as score
const score = claim === true ? 1 : claim;
if (score > bestScore) {
bestScore = score;
bestEngine = engine;
}
}
if (bestEngine) {
return bestEngine.launch(engineProjectContext(project));
}
Ideally we should support these engines somehow, but how is a question for us, and it probably needs some research first on what knitr's engines need:
- Which languages knitr should claim. We could pin knitr's built-in engines. Some of them need more than R (
Rcppneeds a compiler,stanneeds a Stan backend), and engines that packages register can't be listed ahead of time. - Whether knitr, when it runs a document, should take every cell that no other engine claims, like Quarto 1 does.
pythonandjuliashow it isn't that simple:pythonis claimed by knitr only when no dedicated engine takes it, and knitr deliberately doesn't claimjulia. - The claim has to stay static: the replay engine calls it in the WASM build, where there is no R.
Related: #1370, where an unclaimed {markdown} cell also ends up in the Jupyter engine.
- Ngôn ngữ chính
- Rust
- Star
- 316
- Fork
- 23
- Merge trung bình
- 11 giờ 49 phút
- Pull request đã merge (30 ngày)
- 245
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của quarto-dev/q2
-
Heading anchor links have no icon: AnchorJS is initialised with an empty `icon`Có thể đã có người làm @cscheid đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quarto-dev/q2#1419 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug testing windows
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
quarto-dev/q2#1346 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
quarto-dev/q2#1095 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
quarto-dev/q2#1418 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug readers-writers windows
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
quarto-dev/q2#1416 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quarto-dev/q2
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
BurntSushi/jiff#755 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
After the kernel is given up on, a new import leaves "Importing…" and its Cancel on the status lineĐang mởbug help wanted priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
sawhorse3d/sawhorse#163 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MartinPTielemans/ilo#4607 ·