futureverse / futureverse/future.apply

`cli` messages are always printed at the end of execution

Open
#128 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
218
Forks
20
Avg merge
2d 9h
Merged PRs (30d)
1

Description

**Describe the bug**
Also referenced [here](https://github.com/r-lib/cli/issues/575) . The `cli` package messages are not relayed when called within the `future.apply` context. This is even the case when no parallelism is used.

**Reproduce example**
The following waits for 10 seconds and prints `hihihihihihihihihihi`
```
future::plan(future::sequential)
ret <- future.apply::future_lapply(X = seq(10), future.stdout=NA,
FUN=function(x) {
cli::cli_inform('hi')
Sys.sleep(1)
})
```

Contributor guide

Open the contributing guide

Research direction

Start by running the reported future::plan(future::sequential) and future.apply::future_lapply reproduction with future.stdout=NA and cli::cli_inform. Trace how messages are handled during the future.apply call, including the sequential path. Done means cli messages are relayed while execution proceeds rather than being printed only after all iterations finish.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.