R Under development (unstable) (2025-06-05 r88281 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. > source("incl/start.R") Loading required package: parallelly Loading required package: future > library("listenv") > > strategies <- c("batchtools_interactive", "batchtools_local") > > ## CRAN processing times: > ## On Windows 32-bit, don't run these tests > if (!fullTest && isWin32) strategies <- character(0L) > > > message("*** Global argument '...' in futures ...") *** Global argument '...' in futures ... > > sum_fcns <- list() > > sum_fcns$A <- function(x, ...) { + message("Arguments '...' exists: ", exists("...", inherits = TRUE)) + y %<-% { sum(x, ...) } + y + } > > > sum_fcns$B <- function(x, ...) { + sumt <- function(x) { + message("Arguments '...' exists: ", exists("...", inherits = TRUE)) + y %<-% { sum(x, ...) } + y + } + sumt(x) + } > > sum_fcns$C <- function(x, y) { + message("Arguments '...' exists: ", exists("...", inherits = TRUE)) + y %<-% { sum(x, y) } + y + } > > sum_fcns$D <- function(x, y) { + message("Arguments '...' exists: ", exists("...", inherits = TRUE)) + y %<-% { sum(x, y, ...) } + y + } > > > for (strategy in strategies) { + plan(strategy, substitute = FALSE) + + for (name in names(sum_fcns)) { + mprintf("** Sum function '%s' with plan('%s') ...\n", name, strategy) + sum_fcn <- sum_fcns[[name]] + print(sum_fcn) + y <- try(sum_fcn(1:2, 3)) + print(y) + if (name %in% c("D")) { + stopifnot(inherits(y, "try-error")) + } else { + stopifnot(y == 6) + } + } + } ** Sum function 'A' with plan('batchtools_interactive') ... function (x, ...) { message("Arguments '...' exists: ", exists("...", inherits = TRUE)) y %<-% { sum(x, ...) } y } Arguments '...' exists: TRUE [04:37:55.532] Launched future #1 [1] 6 ** Sum function 'B' with plan('batchtools_interactive') ... function (x, ...) { sumt <- function(x) { message("Arguments '...' exists: ", exists("...", inherits = TRUE)) y %<-% { sum(x, ...) } y } sumt(x) } Arguments '...' exists: TRUE [04:37:55.765] Launched future #1 [1] 6 ** Sum function 'C' with plan('batchtools_interactive') ... function (x, y) { message("Arguments '...' exists: ", exists("...", inherits = TRUE)) y %<-% { sum(x, y) } y } Arguments '...' exists: FALSE [04:37:56.042] Launched future #1 [1] 6 ** Sum function 'D' with plan('batchtools_interactive') ... function (x, y) { message("Arguments '...' exists: ", exists("...", inherits = TRUE)) y %<-% { sum(x, y, ...) } y } Arguments '...' exists: FALSE [04:37:56.314] Launched future #1 Warning in delete.BatchtoolsFuture(future) : Will not remove batchtools registry, because the status of the batchtools was 'error', 'defined', 'finished', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: 'D:/temp/2025_06_06_04_35_16_24916/RtmpyEYYI5/.future/20250606_043755-yEYYI5/batchtools_120517285' Error in eval(quote({ : '...' used in an incorrect context [1] "Error in eval(quote({ : '...' used in an incorrect context\n" attr(,"class") [1] "try-error" attr(,"condition") ** Sum function 'A' with plan('batchtools_local') ... function (x, ...) { message("Arguments '...' exists: ", exists("...", inherits = TRUE)) y %<-% { sum(x, ...) } y } Arguments '...' exists: TRUE [04:37:57.687] Launched future #1 [1] 6 ** Sum function 'B' with plan('batchtools_local') ... function (x, ...) { sumt <- function(x) { message("Arguments '...' exists: ", exists("...", inherits = TRUE)) y %<-% { sum(x, ...) } y } sumt(x) } Arguments '...' exists: TRUE [04:37:59.030] Launched future #1 [1] 6 ** Sum function 'C' with plan('batchtools_local') ... function (x, y) { message("Arguments '...' exists: ", exists("...", inherits = TRUE)) y %<-% { sum(x, y) } y } Arguments '...' exists: FALSE [04:38:00.937] Launched future #1 [1] 6 ** Sum function 'D' with plan('batchtools_local') ... function (x, y) { message("Arguments '...' exists: ", exists("...", inherits = TRUE)) y %<-% { sum(x, y, ...) } y } Arguments '...' exists: FALSE [04:38:02.356] Launched future #1 Warning in delete.BatchtoolsFuture(future) : Will not remove batchtools registry, because the status of the batchtools was 'error', 'defined', 'finished', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: 'D:/temp/2025_06_06_04_35_16_24916/RtmpyEYYI5/.future/20250606_043755-yEYYI5/batchtools_564954097' Error in eval(quote({ : '...' used in an incorrect context [1] "Error in eval(quote({ : '...' used in an incorrect context\n" attr(,"class") [1] "try-error" attr(,"condition") > > message("*** Global argument '...' in futures ... DONE") *** Global argument '...' in futures ... DONE > > source("incl/end.R") Warning message: In delete.BatchtoolsFuture(f, onRunning = "skip", onMissing = "ignore", : Will not remove batchtools registry, because the status of the batchtools was 'error', 'defined', 'finished', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: 'D:/temp/2025_06_06_04_35_16_24916/RtmpyEYYI5/.future/20250606_043755-yEYYI5/batchtools_120517285' > > proc.time() user system elapsed 2.70 0.64 8.53 Warning message: In delete.BatchtoolsFuture(f, onRunning = "skip", onMissing = "ignore", : Will not remove batchtools registry, because the status of the batchtools was 'error', 'defined', 'finished', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: 'D:/temp/2025_06_06_04_35_16_24916/RtmpyEYYI5/.future/20250606_043755-yEYYI5/batchtools_564954097'