R Under development (unstable) (2025-08-24 r88696 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## This runs testme test script inst/testme/test-zzz,future_lapply.R > ## Don't edit - it was autogenerated by inst/testme/deploy.R > future.batchtools:::testme("zzz,future_lapply") Test 'zzz,future_lapply' ... Sourcing 9 prologue scripts ... 01/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_prologue/001.load.R' 02/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_prologue/002.record-state.R' 03/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_prologue/030.imports.R' 04/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_prologue/050.utils.R' 05/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_prologue/090.context.R' 06/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_prologue/090.options.R' 07/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_prologue/091.envvars.R' 08/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_prologue/099.future-setup.R' 09/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_prologue/995.detrius-connections.R' Sourcing 9 prologue scripts ... done Running test script: 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/test-zzz,future_lapply.R' > library(future) > library(future.batchtools) Loading required package: parallelly > if (requireNamespace("future.apply", quietly = TRUE)) { + future_lapply <- future.apply::future_lapply + library(listenv) + print(all_st .... [TRUNCATED] [1] "sequential" "multisession" "cluster" All HPC strategies: [00:42:56.821] [1] "batchtools_lsf" "batchtools_openlava" "batchtools_sge" [00:42:56.821] [4] "batchtools_slurm" "batchtools_torque" Supported HPC strategies: [00:42:56.823] character(0) Strategies to test with: [00:42:56.824] [1] "batchtools_local" *** future_lapply() ... - future_lapply(x, FUN = vector, ...) ... List of 1 $ x:List of 3 ..$ a: chr "integer" ..$ c: chr "character" ..$ c: chr "list" List of 1 $ y0:List of 3 ..$ a: int [1:2] 0 0 ..$ c: chr [1:2] "" "" ..$ c:List of 2 .. ..$ : NULL .. ..$ : NULL - plan('batchtools_local') ... [00:42:56.907] function (strategy = NULL, ..., substitute = TRUE, .skip = FALSE, [00:42:56.907] .call = TRUE, .cleanup = NA, .init = TRUE) [00:42:56.907] { [00:42:56.907] if (substitute) [00:42:56.907] strategy <- substitute(strategy) [00:42:56.907] if (is.logical(.skip)) [00:42:56.907] stop_if_not(length(.skip) == 1L, !is.na(.skip)) [00:42:56.907] if (is.logical(.call)) [00:42:56.907] stop_if_not(length(.call) == 1L, !is.na(.call)) [00:42:56.907] debug <- isTRUE(getOption("future.debug")) [00:42:56.907] if (debug) { [00:42:56.907] if (inherits(strategy, "character")) { [00:42:56.907] first <- sprintf("\"%s\"", strategy) [00:42:56.907] } [00:42:56.907] else { [00:42:56.907] first <- sprintf("<%s>", commaq(class(strategy)[1])) [00:42:56.907] } [00:42:56.907] mdebugf_push("plan(%s, .skip = %s, .cleanup = %s, .init = %s) ...", [00:42:56.907] first, .skip, .cleanup, .init) [00:42:56.907] on.exit(mdebug_pop()) [00:42:56.907] } [00:42:56.907] if (is.null(stack)) { [00:42:56.907] stack <<- plan_default_stack() [00:42:56.907] if (debug) [00:42:56.907] mdebug("Created default stack") [00:42:56.907] } [00:42:56.907] if (identical(strategy, "backend")) { [00:42:56.907] strategy <- stack[[1L]] [00:42:56.907] backend <- attr(strategy, "backend") [00:42:56.907] if (is.null(backend)) { [00:42:56.907] strategy <- plan_init(strategy, debug = debug) [00:42:56.907] stack[[1L]] <<- strategy [00:42:56.907] backend <- attr(strategy, "backend") [00:42:56.907] } [00:42:56.907] return(backend) [00:42:56.907] } [00:42:56.907] else if (is.null(strategy) || identical(strategy, "next")) { [00:42:56.907] strategy <- stack[[1L]] [00:42:56.907] if (!inherits(strategy, "FutureStrategy")) { [00:42:56.907] class(strategy) <- c("FutureStrategy", class(strategy)) [00:42:56.907] } [00:42:56.907] stop_if_not(is.function(strategy)) [00:42:56.907] if (debug) [00:42:56.907] mdebugf("Getting current (\"next\") strategy: %s", [00:42:56.907] commaq(class(strategy))) [00:42:56.907] return(strategy) [00:42:56.907] } [00:42:56.907] else if (identical(strategy, "default")) { [00:42:56.907] strategy <- getOption("future.plan") [00:42:56.907] if (is.null(strategy)) [00:42:56.907] strategy <- sequential [00:42:56.907] if (debug) [00:42:56.907] mdebugf("Getting default stack: %s", commaq(class(strategy))) [00:42:56.907] } [00:42:56.907] else if (identical(strategy, "list")) { [00:42:56.907] if (debug) [00:42:56.907] mdebugf("Getting full stack: [n=%d] %s", length(stack), [00:42:56.907] commaq(sapply(stack, FUN = class))) [00:42:56.907] if (all(c("codalm", "testthat") %in% loadedNamespaces())) { [00:42:56.907] ignore <- c("init", "backend") [00:42:56.907] class <- class(stack) [00:42:56.907] stack <- lapply(stack, FUN = function(s) { [00:42:56.907] for (name in ignore) attr(s, name) <- NULL [00:42:56.907] s [00:42:56.907] }) [00:42:56.907] class(stack) <- class [00:42:56.907] } [00:42:56.907] return(stack) [00:42:56.907] } [00:42:56.907] else if (identical(strategy, "tail")) { [00:42:56.907] stack <- stack[-1] [00:42:56.907] if (debug) [00:42:56.907] mdebugf("Getting stack without first backend: [n=%d] %s", [00:42:56.907] length(stack), commaq(sapply(stack, FUN = class))) [00:42:56.907] return(stack) [00:42:56.907] } [00:42:56.907] else if (identical(strategy, "reset")) { [00:42:56.907] if (debug) [00:42:56.907] mdebug_push("Resetting stack ...") [00:42:56.907] plan_cleanup(stack[[1]], cleanup = .cleanup, debug = debug) [00:42:56.907] stack <<- plan_default_stack() [00:42:56.907] if (debug) [00:42:56.907] mdebug_pop() [00:42:56.907] return(stack) [00:42:56.907] } [00:42:56.907] else if (identical(strategy, "pop")) { [00:42:56.907] if (debug) [00:42:56.907] mdebug_push("Popping stack ...") [00:42:56.907] oldStack <- stack [00:42:56.907] stack <<- stack[-1L] [00:42:56.907] if (length(stack) == 0L) [00:42:56.907] stack <<- plan_default_stack() [00:42:56.907] if (debug) [00:42:56.907] mdebug_pop() [00:42:56.907] return(oldStack) [00:42:56.907] } [00:42:56.907] oldStack <- stack [00:42:56.907] newStack <- NULL [00:42:56.907] targs <- list(...) [00:42:56.907] if (is.function(strategy)) { [00:42:56.907] if (length(targs) > 0) { [00:42:56.907] args <- c(list(strategy), targs, penvir = parent.frame()) [00:42:56.907] strategy <- do.call(tweak, args = args) [00:42:56.907] } [00:42:56.907] strategy <- list(strategy) [00:42:56.907] } [00:42:56.907] if (is.list(strategy)) { [00:42:56.907] oldStack <- plan_set(strategy, skip = .skip, cleanup = .cleanup, [00:42:56.907] init = .init, debug = debug) [00:42:56.907] return(invisible(oldStack)) [00:42:56.907] } [00:42:56.907] if (is.language(strategy)) { [00:42:56.907] first <- as.list(strategy)[[1]] [00:42:56.907] if (is.symbol(first)) { [00:42:56.907] if (is.call(strategy)) { [00:42:56.907] first <- get(as.character(first), mode = "function", [00:42:56.907] envir = parent.frame(), inherits = TRUE) [00:42:56.907] } [00:42:56.907] else { [00:42:56.907] first <- eval(first, envir = parent.frame(), [00:42:56.907] enclos = baseenv()) [00:42:56.907] } [00:42:56.907] if (is.list(first)) { [00:42:56.907] strategies <- first [00:42:56.907] res <- plan(strategies, substitute = FALSE, .cleanup = .cleanup, [00:42:56.907] .init = .init) [00:42:56.907] return(invisible(res)) [00:42:56.907] } [00:42:56.907] if (is.function(first) && !inherits(first, "future")) { [00:42:56.907] strategies <- eval(strategy, envir = parent.frame(), [00:42:56.907] enclos = baseenv()) [00:42:56.907] if (is.list(strategies)) { [00:42:56.907] for (kk in seq_along(strategies)) { [00:42:56.907] strategy_kk <- strategies[[kk]] [00:42:56.907] if (is.character(strategy_kk)) { [00:42:56.907] strategy_kk <- tweak(strategy_kk, penvir = parent.frame()) [00:42:56.907] strategies[[kk]] <- strategy_kk [00:42:56.907] } [00:42:56.907] } [00:42:56.907] newStack <- strategies [00:42:56.907] stop_if_not(!is.null(newStack), is.list(newStack), [00:42:56.907] length(newStack) >= 1L) [00:42:56.907] } [00:42:56.907] else if (is.function(strategies) && !inherits(strategies, [00:42:56.907] "future")) { [00:42:56.907] strategies <- list(strategies) [00:42:56.907] newStack <- strategies [00:42:56.907] stop_if_not(!is.null(newStack), is.list(newStack), [00:42:56.907] length(newStack) >= 1L) [00:42:56.907] } [00:42:56.907] } [00:42:56.907] } [00:42:56.907] } [00:42:56.907] if (is.null(newStack)) { [00:42:56.907] if (is.symbol(strategy)) { [00:42:56.907] strategy <- eval(strategy, envir = parent.frame(), [00:42:56.907] enclos = baseenv()) [00:42:56.907] } [00:42:56.907] else if (is.language(strategy)) { [00:42:56.907] strategyT <- as.list(strategy) [00:42:56.907] if (strategyT[[1]] == as.symbol("tweak")) { [00:42:56.907] strategy <- eval(strategy, envir = parent.frame(), [00:42:56.907] enclos = baseenv()) [00:42:56.907] } [00:42:56.907] else { [00:42:56.907] isSymbol <- sapply(strategyT, FUN = is.symbol) [00:42:56.907] if (!all(isSymbol)) { [00:42:56.907] strategy <- eval(strategyT[[1L]], envir = parent.frame(), [00:42:56.907] enclos = baseenv()) [00:42:56.907] if (length(strategyT) > 1L) { [00:42:56.907] args <- c(list(strategy), strategyT[-1L], [00:42:56.907] penvir = parent.frame()) [00:42:56.907] strategy <- do.call(tweak, args = args) [00:42:56.907] } [00:42:56.907] } [00:42:56.907] else { [00:42:56.907] strategy <- eval(strategy, envir = parent.frame(), [00:42:56.907] enclos = baseenv()) [00:42:56.907] } [00:42:56.907] } [00:42:56.907] } [00:42:56.907] args <- c(list(strategy), targs, penvir = parent.frame()) [00:42:56.907] tstrategy <- do.call(tweak, args = args, quote = TRUE) [00:42:56.907] newStack <- list(tstrategy) [00:42:56.907] stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= [00:42:56.907] 1L) [00:42:56.907] } [00:42:56.907] if (!is.null(.call)) { [00:42:56.907] call <- if (isTRUE(.call)) [00:42:56.907] sys.call() [00:42:56.907] else .call [00:42:56.907] for (kk in seq_along(newStack)) { [00:42:56.907] strategy <- newStack[[kk]] [00:42:56.907] if (!is.null(attr(strategy, "call", exact = TRUE))) [00:42:56.907] next [00:42:56.907] attr(strategy, "call") <- call [00:42:56.907] newStack[[kk]] <- strategy [00:42:56.907] } [00:42:56.907] stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= [00:42:56.907] 1L) [00:42:56.907] } [00:42:56.907] oldStack <- plan_set(newStack, skip = .skip, cleanup = .cleanup, [00:42:56.907] init = .init, debug = debug) [00:42:56.907] invisible(oldStack) [00:42:56.907] } [00:42:56.907] [00:42:56.907] List of 1 $ y:List of 3 ..$ a: int [1:2] 0 0 ..$ c: chr [1:2] "" "" ..$ c:List of 2 .. ..$ : NULL .. ..$ : NULL List of 1 $ y:List of 3 ..$ a: int [1:2] 0 0 ..$ c: chr [1:2] "" "" ..$ c:List of 2 .. ..$ : NULL .. ..$ : NULL - future_lapply(x, FUN = base::vector, ...) ... List of 1 $ x:List of 3 ..$ a: chr "integer" ..$ c: chr "character" ..$ c: chr "list" List of 1 $ y0:List of 3 ..$ a: int [1:2] 0 0 ..$ c: chr [1:2] "" "" ..$ c:List of 2 .. ..$ : NULL .. ..$ : NULL - plan('batchtools_local') ... [00:43:00.618] function (strategy = NULL, ..., substitute = TRUE, .skip = FALSE, [00:43:00.618] .call = TRUE, .cleanup = NA, .init = TRUE) [00:43:00.618] { [00:43:00.618] if (substitute) [00:43:00.618] strategy <- substitute(strategy) [00:43:00.618] if (is.logical(.skip)) [00:43:00.618] stop_if_not(length(.skip) == 1L, !is.na(.skip)) [00:43:00.618] if (is.logical(.call)) [00:43:00.618] stop_if_not(length(.call) == 1L, !is.na(.call)) [00:43:00.618] debug <- isTRUE(getOption("future.debug")) [00:43:00.618] if (debug) { [00:43:00.618] if (inherits(strategy, "character")) { [00:43:00.618] first <- sprintf("\"%s\"", strategy) [00:43:00.618] } [00:43:00.618] else { [00:43:00.618] first <- sprintf("<%s>", commaq(class(strategy)[1])) [00:43:00.618] } [00:43:00.618] mdebugf_push("plan(%s, .skip = %s, .cleanup = %s, .init = %s) ...", [00:43:00.618] first, .skip, .cleanup, .init) [00:43:00.618] on.exit(mdebug_pop()) [00:43:00.618] } [00:43:00.618] if (is.null(stack)) { [00:43:00.618] stack <<- plan_default_stack() [00:43:00.618] if (debug) [00:43:00.618] mdebug("Created default stack") [00:43:00.618] } [00:43:00.618] if (identical(strategy, "backend")) { [00:43:00.618] strategy <- stack[[1L]] [00:43:00.618] backend <- attr(strategy, "backend") [00:43:00.618] if (is.null(backend)) { [00:43:00.618] strategy <- plan_init(strategy, debug = debug) [00:43:00.618] stack[[1L]] <<- strategy [00:43:00.618] backend <- attr(strategy, "backend") [00:43:00.618] } [00:43:00.618] return(backend) [00:43:00.618] } [00:43:00.618] else if (is.null(strategy) || identical(strategy, "next")) { [00:43:00.618] strategy <- stack[[1L]] [00:43:00.618] if (!inherits(strategy, "FutureStrategy")) { [00:43:00.618] class(strategy) <- c("FutureStrategy", class(strategy)) [00:43:00.618] } [00:43:00.618] stop_if_not(is.function(strategy)) [00:43:00.618] if (debug) [00:43:00.618] mdebugf("Getting current (\"next\") strategy: %s", [00:43:00.618] commaq(class(strategy))) [00:43:00.618] return(strategy) [00:43:00.618] } [00:43:00.618] else if (identical(strategy, "default")) { [00:43:00.618] strategy <- getOption("future.plan") [00:43:00.618] if (is.null(strategy)) [00:43:00.618] strategy <- sequential [00:43:00.618] if (debug) [00:43:00.618] mdebugf("Getting default stack: %s", commaq(class(strategy))) [00:43:00.618] } [00:43:00.618] else if (identical(strategy, "list")) { [00:43:00.618] if (debug) [00:43:00.618] mdebugf("Getting full stack: [n=%d] %s", length(stack), [00:43:00.618] commaq(sapply(stack, FUN = class))) [00:43:00.618] if (all(c("codalm", "testthat") %in% loadedNamespaces())) { [00:43:00.618] ignore <- c("init", "backend") [00:43:00.618] class <- class(stack) [00:43:00.618] stack <- lapply(stack, FUN = function(s) { [00:43:00.618] for (name in ignore) attr(s, name) <- NULL [00:43:00.618] s [00:43:00.618] }) [00:43:00.618] class(stack) <- class [00:43:00.618] } [00:43:00.618] return(stack) [00:43:00.618] } [00:43:00.618] else if (identical(strategy, "tail")) { [00:43:00.618] stack <- stack[-1] [00:43:00.618] if (debug) [00:43:00.618] mdebugf("Getting stack without first backend: [n=%d] %s", [00:43:00.618] length(stack), commaq(sapply(stack, FUN = class))) [00:43:00.618] return(stack) [00:43:00.618] } [00:43:00.618] else if (identical(strategy, "reset")) { [00:43:00.618] if (debug) [00:43:00.618] mdebug_push("Resetting stack ...") [00:43:00.618] plan_cleanup(stack[[1]], cleanup = .cleanup, debug = debug) [00:43:00.618] stack <<- plan_default_stack() [00:43:00.618] if (debug) [00:43:00.618] mdebug_pop() [00:43:00.618] return(stack) [00:43:00.618] } [00:43:00.618] else if (identical(strategy, "pop")) { [00:43:00.618] if (debug) [00:43:00.618] mdebug_push("Popping stack ...") [00:43:00.618] oldStack <- stack [00:43:00.618] stack <<- stack[-1L] [00:43:00.618] if (length(stack) == 0L) [00:43:00.618] stack <<- plan_default_stack() [00:43:00.618] if (debug) [00:43:00.618] mdebug_pop() [00:43:00.618] return(oldStack) [00:43:00.618] } [00:43:00.618] oldStack <- stack [00:43:00.618] newStack <- NULL [00:43:00.618] targs <- list(...) [00:43:00.618] if (is.function(strategy)) { [00:43:00.618] if (length(targs) > 0) { [00:43:00.618] args <- c(list(strategy), targs, penvir = parent.frame()) [00:43:00.618] strategy <- do.call(tweak, args = args) [00:43:00.618] } [00:43:00.618] strategy <- list(strategy) [00:43:00.618] } [00:43:00.618] if (is.list(strategy)) { [00:43:00.618] oldStack <- plan_set(strategy, skip = .skip, cleanup = .cleanup, [00:43:00.618] init = .init, debug = debug) [00:43:00.618] return(invisible(oldStack)) [00:43:00.618] } [00:43:00.618] if (is.language(strategy)) { [00:43:00.618] first <- as.list(strategy)[[1]] [00:43:00.618] if (is.symbol(first)) { [00:43:00.618] if (is.call(strategy)) { [00:43:00.618] first <- get(as.character(first), mode = "function", [00:43:00.618] envir = parent.frame(), inherits = TRUE) [00:43:00.618] } [00:43:00.618] else { [00:43:00.618] first <- eval(first, envir = parent.frame(), [00:43:00.618] enclos = baseenv()) [00:43:00.618] } [00:43:00.618] if (is.list(first)) { [00:43:00.618] strategies <- first [00:43:00.618] res <- plan(strategies, substitute = FALSE, .cleanup = .cleanup, [00:43:00.618] .init = .init) [00:43:00.618] return(invisible(res)) [00:43:00.618] } [00:43:00.618] if (is.function(first) && !inherits(first, "future")) { [00:43:00.618] strategies <- eval(strategy, envir = parent.frame(), [00:43:00.618] enclos = baseenv()) [00:43:00.618] if (is.list(strategies)) { [00:43:00.618] for (kk in seq_along(strategies)) { [00:43:00.618] strategy_kk <- strategies[[kk]] [00:43:00.618] if (is.character(strategy_kk)) { [00:43:00.618] strategy_kk <- tweak(strategy_kk, penvir = parent.frame()) [00:43:00.618] strategies[[kk]] <- strategy_kk [00:43:00.618] } [00:43:00.618] } [00:43:00.618] newStack <- strategies [00:43:00.618] stop_if_not(!is.null(newStack), is.list(newStack), [00:43:00.618] length(newStack) >= 1L) [00:43:00.618] } [00:43:00.618] else if (is.function(strategies) && !inherits(strategies, [00:43:00.618] "future")) { [00:43:00.618] strategies <- list(strategies) [00:43:00.618] newStack <- strategies [00:43:00.618] stop_if_not(!is.null(newStack), is.list(newStack), [00:43:00.618] length(newStack) >= 1L) [00:43:00.618] } [00:43:00.618] } [00:43:00.618] } [00:43:00.618] } [00:43:00.618] if (is.null(newStack)) { [00:43:00.618] if (is.symbol(strategy)) { [00:43:00.618] strategy <- eval(strategy, envir = parent.frame(), [00:43:00.618] enclos = baseenv()) [00:43:00.618] } [00:43:00.618] else if (is.language(strategy)) { [00:43:00.618] strategyT <- as.list(strategy) [00:43:00.618] if (strategyT[[1]] == as.symbol("tweak")) { [00:43:00.618] strategy <- eval(strategy, envir = parent.frame(), [00:43:00.618] enclos = baseenv()) [00:43:00.618] } [00:43:00.618] else { [00:43:00.618] isSymbol <- sapply(strategyT, FUN = is.symbol) [00:43:00.618] if (!all(isSymbol)) { [00:43:00.618] strategy <- eval(strategyT[[1L]], envir = parent.frame(), [00:43:00.618] enclos = baseenv()) [00:43:00.618] if (length(strategyT) > 1L) { [00:43:00.618] args <- c(list(strategy), strategyT[-1L], [00:43:00.618] penvir = parent.frame()) [00:43:00.618] strategy <- do.call(tweak, args = args) [00:43:00.618] } [00:43:00.618] } [00:43:00.618] else { [00:43:00.618] strategy <- eval(strategy, envir = parent.frame(), [00:43:00.618] enclos = baseenv()) [00:43:00.618] } [00:43:00.618] } [00:43:00.618] } [00:43:00.618] args <- c(list(strategy), targs, penvir = parent.frame()) [00:43:00.618] tstrategy <- do.call(tweak, args = args, quote = TRUE) [00:43:00.618] newStack <- list(tstrategy) [00:43:00.618] stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= [00:43:00.618] 1L) [00:43:00.618] } [00:43:00.618] if (!is.null(.call)) { [00:43:00.618] call <- if (isTRUE(.call)) [00:43:00.618] sys.call() [00:43:00.618] else .call [00:43:00.618] for (kk in seq_along(newStack)) { [00:43:00.618] strategy <- newStack[[kk]] [00:43:00.618] if (!is.null(attr(strategy, "call", exact = TRUE))) [00:43:00.618] next [00:43:00.618] attr(strategy, "call") <- call [00:43:00.618] newStack[[kk]] <- strategy [00:43:00.618] } [00:43:00.618] stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= [00:43:00.618] 1L) [00:43:00.618] } [00:43:00.618] oldStack <- plan_set(newStack, skip = .skip, cleanup = .cleanup, [00:43:00.618] init = .init, debug = debug) [00:43:00.618] invisible(oldStack) [00:43:00.618] } [00:43:00.618] [00:43:00.618] List of 1 $ y:List of 3 ..$ a: int [1:2] 0 0 ..$ c: chr [1:2] "" "" ..$ c:List of 2 .. ..$ : NULL .. ..$ : NULL List of 1 $ y:List of 3 ..$ a: int [1:2] 0 0 ..$ c: chr [1:2] "" "" ..$ c:List of 2 .. ..$ : NULL .. ..$ : NULL - future_lapply(x, FUN = future:::hpaste, ...) ... List of 1 $ x:List of 1 ..$ a: Named chr [1:101] "hello" "1" "2" "3" ... .. ..- attr(*, "names")= chr [1:101] "" "b1" "b2" "b3" ... List of 1 $ y0:List of 1 ..$ a: chr "hello; 1; 2; ...; 100" - plan('batchtools_local') ... [00:43:04.241] function (strategy = NULL, ..., substitute = TRUE, .skip = FALSE, [00:43:04.241] .call = TRUE, .cleanup = NA, .init = TRUE) [00:43:04.241] { [00:43:04.241] if (substitute) [00:43:04.241] strategy <- substitute(strategy) [00:43:04.241] if (is.logical(.skip)) [00:43:04.241] stop_if_not(length(.skip) == 1L, !is.na(.skip)) [00:43:04.241] if (is.logical(.call)) [00:43:04.241] stop_if_not(length(.call) == 1L, !is.na(.call)) [00:43:04.241] debug <- isTRUE(getOption("future.debug")) [00:43:04.241] if (debug) { [00:43:04.241] if (inherits(strategy, "character")) { [00:43:04.241] first <- sprintf("\"%s\"", strategy) [00:43:04.241] } [00:43:04.241] else { [00:43:04.241] first <- sprintf("<%s>", commaq(class(strategy)[1])) [00:43:04.241] } [00:43:04.241] mdebugf_push("plan(%s, .skip = %s, .cleanup = %s, .init = %s) ...", [00:43:04.241] first, .skip, .cleanup, .init) [00:43:04.241] on.exit(mdebug_pop()) [00:43:04.241] } [00:43:04.241] if (is.null(stack)) { [00:43:04.241] stack <<- plan_default_stack() [00:43:04.241] if (debug) [00:43:04.241] mdebug("Created default stack") [00:43:04.241] } [00:43:04.241] if (identical(strategy, "backend")) { [00:43:04.241] strategy <- stack[[1L]] [00:43:04.241] backend <- attr(strategy, "backend") [00:43:04.241] if (is.null(backend)) { [00:43:04.241] strategy <- plan_init(strategy, debug = debug) [00:43:04.241] stack[[1L]] <<- strategy [00:43:04.241] backend <- attr(strategy, "backend") [00:43:04.241] } [00:43:04.241] return(backend) [00:43:04.241] } [00:43:04.241] else if (is.null(strategy) || identical(strategy, "next")) { [00:43:04.241] strategy <- stack[[1L]] [00:43:04.241] if (!inherits(strategy, "FutureStrategy")) { [00:43:04.241] class(strategy) <- c("FutureStrategy", class(strategy)) [00:43:04.241] } [00:43:04.241] stop_if_not(is.function(strategy)) [00:43:04.241] if (debug) [00:43:04.241] mdebugf("Getting current (\"next\") strategy: %s", [00:43:04.241] commaq(class(strategy))) [00:43:04.241] return(strategy) [00:43:04.241] } [00:43:04.241] else if (identical(strategy, "default")) { [00:43:04.241] strategy <- getOption("future.plan") [00:43:04.241] if (is.null(strategy)) [00:43:04.241] strategy <- sequential [00:43:04.241] if (debug) [00:43:04.241] mdebugf("Getting default stack: %s", commaq(class(strategy))) [00:43:04.241] } [00:43:04.241] else if (identical(strategy, "list")) { [00:43:04.241] if (debug) [00:43:04.241] mdebugf("Getting full stack: [n=%d] %s", length(stack), [00:43:04.241] commaq(sapply(stack, FUN = class))) [00:43:04.241] if (all(c("codalm", "testthat") %in% loadedNamespaces())) { [00:43:04.241] ignore <- c("init", "backend") [00:43:04.241] class <- class(stack) [00:43:04.241] stack <- lapply(stack, FUN = function(s) { [00:43:04.241] for (name in ignore) attr(s, name) <- NULL [00:43:04.241] s [00:43:04.241] }) [00:43:04.241] class(stack) <- class [00:43:04.241] } [00:43:04.241] return(stack) [00:43:04.241] } [00:43:04.241] else if (identical(strategy, "tail")) { [00:43:04.241] stack <- stack[-1] [00:43:04.241] if (debug) [00:43:04.241] mdebugf("Getting stack without first backend: [n=%d] %s", [00:43:04.241] length(stack), commaq(sapply(stack, FUN = class))) [00:43:04.241] return(stack) [00:43:04.241] } [00:43:04.241] else if (identical(strategy, "reset")) { [00:43:04.241] if (debug) [00:43:04.241] mdebug_push("Resetting stack ...") [00:43:04.241] plan_cleanup(stack[[1]], cleanup = .cleanup, debug = debug) [00:43:04.241] stack <<- plan_default_stack() [00:43:04.241] if (debug) [00:43:04.241] mdebug_pop() [00:43:04.241] return(stack) [00:43:04.241] } [00:43:04.241] else if (identical(strategy, "pop")) { [00:43:04.241] if (debug) [00:43:04.241] mdebug_push("Popping stack ...") [00:43:04.241] oldStack <- stack [00:43:04.241] stack <<- stack[-1L] [00:43:04.241] if (length(stack) == 0L) [00:43:04.241] stack <<- plan_default_stack() [00:43:04.241] if (debug) [00:43:04.241] mdebug_pop() [00:43:04.241] return(oldStack) [00:43:04.241] } [00:43:04.241] oldStack <- stack [00:43:04.241] newStack <- NULL [00:43:04.241] targs <- list(...) [00:43:04.241] if (is.function(strategy)) { [00:43:04.241] if (length(targs) > 0) { [00:43:04.241] args <- c(list(strategy), targs, penvir = parent.frame()) [00:43:04.241] strategy <- do.call(tweak, args = args) [00:43:04.241] } [00:43:04.241] strategy <- list(strategy) [00:43:04.241] } [00:43:04.241] if (is.list(strategy)) { [00:43:04.241] oldStack <- plan_set(strategy, skip = .skip, cleanup = .cleanup, [00:43:04.241] init = .init, debug = debug) [00:43:04.241] return(invisible(oldStack)) [00:43:04.241] } [00:43:04.241] if (is.language(strategy)) { [00:43:04.241] first <- as.list(strategy)[[1]] [00:43:04.241] if (is.symbol(first)) { [00:43:04.241] if (is.call(strategy)) { [00:43:04.241] first <- get(as.character(first), mode = "function", [00:43:04.241] envir = parent.frame(), inherits = TRUE) [00:43:04.241] } [00:43:04.241] else { [00:43:04.241] first <- eval(first, envir = parent.frame(), [00:43:04.241] enclos = baseenv()) [00:43:04.241] } [00:43:04.241] if (is.list(first)) { [00:43:04.241] strategies <- first [00:43:04.241] res <- plan(strategies, substitute = FALSE, .cleanup = .cleanup, [00:43:04.241] .init = .init) [00:43:04.241] return(invisible(res)) [00:43:04.241] } [00:43:04.241] if (is.function(first) && !inherits(first, "future")) { [00:43:04.241] strategies <- eval(strategy, envir = parent.frame(), [00:43:04.241] enclos = baseenv()) [00:43:04.241] if (is.list(strategies)) { [00:43:04.241] for (kk in seq_along(strategies)) { [00:43:04.241] strategy_kk <- strategies[[kk]] [00:43:04.241] if (is.character(strategy_kk)) { [00:43:04.241] strategy_kk <- tweak(strategy_kk, penvir = parent.frame()) [00:43:04.241] strategies[[kk]] <- strategy_kk [00:43:04.241] } [00:43:04.241] } [00:43:04.241] newStack <- strategies [00:43:04.241] stop_if_not(!is.null(newStack), is.list(newStack), [00:43:04.241] length(newStack) >= 1L) [00:43:04.241] } [00:43:04.241] else if (is.function(strategies) && !inherits(strategies, [00:43:04.241] "future")) { [00:43:04.241] strategies <- list(strategies) [00:43:04.241] newStack <- strategies [00:43:04.241] stop_if_not(!is.null(newStack), is.list(newStack), [00:43:04.241] length(newStack) >= 1L) [00:43:04.241] } [00:43:04.241] } [00:43:04.241] } [00:43:04.241] } [00:43:04.241] if (is.null(newStack)) { [00:43:04.241] if (is.symbol(strategy)) { [00:43:04.241] strategy <- eval(strategy, envir = parent.frame(), [00:43:04.241] enclos = baseenv()) [00:43:04.241] } [00:43:04.241] else if (is.language(strategy)) { [00:43:04.241] strategyT <- as.list(strategy) [00:43:04.241] if (strategyT[[1]] == as.symbol("tweak")) { [00:43:04.241] strategy <- eval(strategy, envir = parent.frame(), [00:43:04.241] enclos = baseenv()) [00:43:04.241] } [00:43:04.241] else { [00:43:04.241] isSymbol <- sapply(strategyT, FUN = is.symbol) [00:43:04.241] if (!all(isSymbol)) { [00:43:04.241] strategy <- eval(strategyT[[1L]], envir = parent.frame(), [00:43:04.241] enclos = baseenv()) [00:43:04.241] if (length(strategyT) > 1L) { [00:43:04.241] args <- c(list(strategy), strategyT[-1L], [00:43:04.241] penvir = parent.frame()) [00:43:04.241] strategy <- do.call(tweak, args = args) [00:43:04.241] } [00:43:04.241] } [00:43:04.241] else { [00:43:04.241] strategy <- eval(strategy, envir = parent.frame(), [00:43:04.241] enclos = baseenv()) [00:43:04.241] } [00:43:04.241] } [00:43:04.241] } [00:43:04.241] args <- c(list(strategy), targs, penvir = parent.frame()) [00:43:04.241] tstrategy <- do.call(tweak, args = args, quote = TRUE) [00:43:04.241] newStack <- list(tstrategy) [00:43:04.241] stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= [00:43:04.241] 1L) [00:43:04.241] } [00:43:04.241] if (!is.null(.call)) { [00:43:04.241] call <- if (isTRUE(.call)) [00:43:04.241] sys.call() [00:43:04.241] else .call [00:43:04.241] for (kk in seq_along(newStack)) { [00:43:04.241] strategy <- newStack[[kk]] [00:43:04.241] if (!is.null(attr(strategy, "call", exact = TRUE))) [00:43:04.241] next [00:43:04.241] attr(strategy, "call") <- call [00:43:04.241] newStack[[kk]] <- strategy [00:43:04.241] } [00:43:04.241] stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= [00:43:04.241] 1L) [00:43:04.241] } [00:43:04.241] oldStack <- plan_set(newStack, skip = .skip, cleanup = .cleanup, [00:43:04.241] init = .init, debug = debug) [00:43:04.241] invisible(oldStack) [00:43:04.241] } [00:43:04.241] [00:43:04.241] List of 1 $ y:List of 1 ..$ a: chr "hello; 1; 2; ...; 100" List of 1 $ y:List of 1 ..$ a: chr "hello; 1; 2; ...; 100" - future_lapply(x, FUN = listenv::listenv, ...) ... $a A 'listenv' vector with 1 element ('A'). $b A 'listenv' vector with 2 elements ('A', 'B'). List of 1 $ y0:List of 2 ..$ a: Named chr "A" .. ..- attr(*, "names")= chr "A" ..$ b: Named chr [1:2] "A" "B" .. ..- attr(*, "names")= chr [1:2] "A" "B" - plan('batchtools_local') ... List of 1 $ y:List of 2 ..$ a: Named chr "A" .. ..- attr(*, "names")= chr "A" ..$ b: Named chr [1:2] "A" "B" .. ..- attr(*, "names")= chr [1:2] "A" "B" List of 1 $ y:List of 2 ..$ a: Named chr "A" .. ..- attr(*, "names")= chr "A" ..$ b: Named chr [1:2] "A" "B" .. ..- attr(*, "names")= chr [1:2] "A" "B" - future_lapply(x, FUN, ...) for large length(x) ... - future_lapply() with global in non-attached package ... *** future_lapply() ... DONE Sourcing 6 epilogue scripts ... 01/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_epilogue/001.undo-future.R' 02/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_epilogue/002.undo-state.R' Failed to undo environment variables: - Expected environment variables: [n=214] '!ExitCode', 'ALLUSERSPROFILE', 'APPDATA', ..., 'tempdirname' - Environment variables still there: [n=0] - Environment variables missing: [n=1] 'MAKEFLAGS' Differences environment variable by environment variable: 03/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_epilogue/090.gc.R' 04/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_epilogue/099.session_info.R' 05/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_epilogue/995.detritus-connections.R' 06/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future.batchtools/testme/_epilogue/999.detritus-files.R' Skipping, because path appears not to be an 'R CMD check' folder: 'D:/temp/2025_08_26_00_40_17_26176' Sourcing 6 epilogue scripts ... done Test time: user.self=4s, sys.self=0.3s, elapsed=2e+01s, user.child=NAs, sys.child=NAs Test 'tempdirname' ... success > > proc.time() user system elapsed 4.76 0.42 16.93