posit-dev / posit-dev/positron

Output from stdout and stderr disappears when running `later` callback

Open
#7,236 4 comments 0 reactions 1 assignee View on GitHub

@lionel- is already working on this.

Since May 6, 2025.

area: console area: kernels bug lang: r
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

System details:

Positron and OS details:

Positron Version: 2025.05.0 (Universal) build 35
Code - OSS Version: 1.98.0
Commit: ee0feaba9d71a3e9feef765e8c3a46aeb3273741
Date: 2025-04-09T03:27:32.927Z
Electron: 34.2.0
Chromium: 132.0.6834.196
Node.js: 20.18.2
V8: 13.2.152.36-electron.0
OS: Darwin arm64 24.3.0

Interpreter details:

R 4.4.2

Describe the issue:

This issue is related to #7235.

The later package is used for scheduling callbacks to be run, similar to setTimeout() in JavaScript. In Positron, when later runs a callback with the console idle, the output disappears.

If I run this in the terminal or in RStudio, it prints the message to the console:

later::later(\() {cat("Finished!")}, 0)

For example:

> later::later(\() {cat("Finished!")}, 0)
Finished!
>

But if I run it in Positron, nothing shows:

> later::later(\() {cat("Finished!")}, 0)
>

Same if I use stderr:

> later::later(\() {cat("Finished!", file=stderr())}, 0)
>

It does show up if I use later::run_now() to run the event loop immediately:

> later::later(\() {cat("Finished!")}, 0); later::run_now()
Finished!
> 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.