webr icon indicating copy to clipboard operation
webr copied to clipboard

progress bars from purrr doesn't render

Open StaffanBetner opened this issue 10 months ago • 2 comments

This is a simple example that doesn't show an expected progress bar:

library(purrr)
walk(1:10, ~Sys.sleep(0.5), .progress = TRUE)

StaffanBetner avatar Apr 12 '24 09:04 StaffanBetner

Thanks for reporting this! It looks like any kind of cli progress bars are not working in the webR demo application, not just from purrr.

georgestagg avatar Apr 17 '24 15:04 georgestagg

FWIW, similarly, it looks like output to stdout/stderr cannot be refreshed/flushed while running, e.g.

for (kk in 0:99) { cat(sprintf("%3d\r", kk)); Sys.sleep(0.1); flush(stdout()) }; cat("\n")

Same for

for (kk in 0:99) { cat(sprintf("\r%3d", kk)); Sys.sleep(0.1); flush(stdout()) }; cat("\n")

HenrikBengtsson avatar Apr 17 '24 22:04 HenrikBengtsson