From 2aecc2ca2073a5fb0efe09bc86c6546dc85fb594 Mon Sep 17 00:00:00 2001 From: pat-s Date: Wed, 28 Aug 2024 11:43:48 +0200 Subject: [PATCH] no progressr --- R/build_binaries.R | 12 ++++++------ R/process_cran_updates.R | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/R/build_binaries.R b/R/build_binaries.R index 1a08c25..470cbbe 100644 --- a/R/build_binaries.R +++ b/R/build_binaries.R @@ -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))}}.") diff --git a/R/process_cran_updates.R b/R/process_cran_updates.R index 786ff5e..e1ba5fa 100644 --- a/R/process_cran_updates.R +++ b/R/process_cran_updates.R @@ -31,7 +31,7 @@ process_cran_updates <- function( all_pkgs <- dplyr::bind_rows(updated_pkgs, new_pkgs) - purrr::walk2(all_pkgs$name, all_pkgs$version, ~ build_binary_package(.x, .y, platform = platform)) + # purrr::walk2(all_pkgs$name, all_pkgs$version, ~ build_binary_package(.x, .y, platform = platform)) if (prune) { removed_pkgs <- get_removed_cran_packages(interval) @@ -57,8 +57,8 @@ process_cran_updates <- function( purrr::walk(removed_pkgs$name, ~ { cli::cli_alert("{.fun process_cran_updates}: Removing package {.pkg {.x}} from S3.") - files_filtered <- grep("bold_", files, value = TRUE) - s3fs::s3_file_delete_async(files_filtered) + files_filtered <- grep(sprintf("%s_", .x), files, value = TRUE) + s3fs::s3_file_delete(files_filtered) cli::cli_alert_success("{.fun process_cran_updates}: Successfully removed {.pkg {basename(files_filtered)}} from S3.") })