posit-dev / posit-dev/positron
Code location range errors in R kernel logs after running quarto chunk
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Description
Create an R chunk and run it. Open the R kernel logs, you should see an error like this:
r-f0db872e [R] 2026-09-09T13:09:13.926454Z ERROR at crates/ark/src/console/console_repl.rs:927: Line count mismatch: location spans 0 lines, but code has 3 newlines
In https://github.com/posit-dev/positron/issues/15965, the user also hit:
2026-09-05T16:47:11.000721Z ERROR at crates/ark/src/console/console_repl.rs:927: Expected last line to have 0 bytes, got 56
The cause of both of these is that the code location sent by the Quarto execution manager harcodes the range to 0, see character values in:
Instead the range should match the text sent.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/vs/workbench/contrib/positronQuarto/browser/quartoExecutionManager.ts at the code-location construction around lines 152-160. Run an R Quarto chunk and inspect the R kernel logs while tracing how the submitted text and range are assembled. Done means the range matches the text sent and the reported line-count or last-line errors no longer occur.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100