no progressr

This commit is contained in:
Patrick Schratz 2024-08-28 11:43:48 +02:00
commit 2aecc2ca20
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -84,15 +84,15 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
cli::cli_alert("Building binaries for {.pkg {package_name[[1]]}} with tags {.field {tag}}.")
# Set up the progress handler
progressr::handlers(global = TRUE)
progressr::handlers("cli", "debug")
# progressr::handlers(global = TRUE)
# progressr::handlers("cli", "debug")
out <- progressr::with_progress({
p <- progressr::progressor(along = tag)
# out <- progressr::with_progress({
# p <- progressr::progressor(along = tag)
future.apply::future_mapply(function(x, y) {
tryCatch(
{
p()
# p()
dump <- build_single_tag(x, y, dir_out_bin, local_clone_dir, platform = platform, debug = debug, force = force)
# if for some reason an underlying error didnt' get caught in the tryCatch calls, we check again here for the existence of the binary file on disk and mark the build as failed if it is not found
@ -113,7 +113,7 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
}
)
}, package_name, tag, future.seed = TRUE)
})
# })
total_build_time <- round(Sys.time() - t1, 2)
cli::cli_alert("Execution time ({.pkg {package_name[[1]]}}) ({length(tag)} tags): {.strong {total_build_time} {units(difftime(Sys.time(), t1))}}.")