R Under development (unstable) (2023-12-20 r85713 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 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") [01:27:33.199] plan(): Setting new future strategy stack: [01:27:33.201] List of future strategies: [01:27:33.201] 1. sequential: [01:27:33.201] - args: function (..., envir = parent.frame(), workers = "") [01:27:33.201] - tweaked: FALSE [01:27:33.201] - call: future::plan("sequential") [01:27:33.217] plan(): nbrOfWorkers() = 1 > > message("*** future() ...") *** future() ... > > f <- future({ + 42L + }, lazy = TRUE) [01:27:33.224] getGlobalsAndPackages() ... [01:27:33.224] Searching for globals... [01:27:33.228] - globals found: [1] '{' [01:27:33.228] Searching for globals ... DONE [01:27:33.228] Resolving globals: FALSE [01:27:33.229] [01:27:33.229] [01:27:33.229] getGlobalsAndPackages() ... DONE > > print(resolved(f)) [01:27:33.230] resolved() for 'Future' ... [01:27:33.230] - state: 'created' [01:27:33.231] - run: TRUE [01:27:33.231] - run() ... [01:27:33.231] run() for 'Future' ... [01:27:33.231] - state: 'created' [01:27:33.232] - Future backend: 'FutureStrategy', 'sequential', 'uniprocess', 'future', 'function' [01:27:33.232] - Future class: 'SequentialFuture', 'UniprocessFuture', 'Future', 'environment' [01:27:33.232] - Copy elements of temporary 'SequentialFuture' to final 'Future' object ... [01:27:33.232] - Field: 'label' [01:27:33.233] - Field: 'local' [01:27:33.233] - Field: 'owner' [01:27:33.233] - Field: 'envir' [01:27:33.233] - Field: 'packages' [01:27:33.233] - Field: 'gc' [01:27:33.234] - Field: 'conditions' [01:27:33.234] - Field: 'expr' [01:27:33.234] - Field: 'uuid' [01:27:33.234] - Field: 'seed' [01:27:33.234] - Field: 'version' [01:27:33.234] - Field: 'result' [01:27:33.235] - Field: 'asynchronous' [01:27:33.235] - Field: 'calls' [01:27:33.235] - Field: 'globals' [01:27:33.235] - Field: 'stdout' [01:27:33.235] - Field: 'earlySignal' [01:27:33.235] - Field: 'lazy' [01:27:33.236] - Field: 'state' [01:27:33.236] - Copy elements of temporary 'SequentialFuture' to final 'Future' object ... done [01:27:33.236] - Launch lazy future ... [01:27:33.237] Packages needed by the future expression (n = 0): [01:27:33.237] Packages needed by future strategies (n = 0): [01:27:33.238] { [01:27:33.238] { [01:27:33.238] { [01:27:33.238] ...future.startTime <- base::Sys.time() [01:27:33.238] { [01:27:33.238] { [01:27:33.238] { [01:27:33.238] base::local({ [01:27:33.238] has_future <- base::requireNamespace("future", [01:27:33.238] quietly = TRUE) [01:27:33.238] if (has_future) { [01:27:33.238] ns <- base::getNamespace("future") [01:27:33.238] version <- ns[[".package"]][["version"]] [01:27:33.238] if (is.null(version)) [01:27:33.238] version <- utils::packageVersion("future") [01:27:33.238] } [01:27:33.238] else { [01:27:33.238] version <- NULL [01:27:33.238] } [01:27:33.238] if (!has_future || version < "1.8.0") { [01:27:33.238] info <- base::c(r_version = base::gsub("R version ", [01:27:33.238] "", base::R.version$version.string), [01:27:33.238] platform = base::sprintf("%s (%s-bit)", [01:27:33.238] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [01:27:33.238] os = base::paste(base::Sys.info()[base::c("sysname", [01:27:33.238] "release", "version")], collapse = " "), [01:27:33.238] hostname = base::Sys.info()[["nodename"]]) [01:27:33.238] info <- base::sprintf("%s: %s", base::names(info), [01:27:33.238] info) [01:27:33.238] info <- base::paste(info, collapse = "; ") [01:27:33.238] if (!has_future) { [01:27:33.238] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [01:27:33.238] info) [01:27:33.238] } [01:27:33.238] else { [01:27:33.238] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [01:27:33.238] info, version) [01:27:33.238] } [01:27:33.238] base::stop(msg) [01:27:33.238] } [01:27:33.238] }) [01:27:33.238] } [01:27:33.238] options(future.plan = NULL) [01:27:33.238] Sys.unsetenv("R_FUTURE_PLAN") [01:27:33.238] future::plan("default", .cleanup = FALSE, .init = FALSE) [01:27:33.238] } [01:27:33.238] ...future.workdir <- getwd() [01:27:33.238] } [01:27:33.238] ...future.oldOptions <- base::as.list(base::.Options) [01:27:33.238] ...future.oldEnvVars <- base::Sys.getenv() [01:27:33.238] } [01:27:33.238] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [01:27:33.238] future.globals.maxSize = NULL, future.globals.method = NULL, [01:27:33.238] future.globals.onMissing = NULL, future.globals.onReference = NULL, [01:27:33.238] future.globals.resolve = NULL, future.resolve.recursive = NULL, [01:27:33.238] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [01:27:33.238] future.stdout.windows.reencode = NULL, width = 80L) [01:27:33.238] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [01:27:33.238] base::names(...future.oldOptions)) [01:27:33.238] } [01:27:33.238] if (FALSE) { [01:27:33.238] } [01:27:33.238] else { [01:27:33.238] if (TRUE) { [01:27:33.238] ...future.stdout <- base::rawConnection(base::raw(0L), [01:27:33.238] open = "w") [01:27:33.238] } [01:27:33.238] else { [01:27:33.238] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [01:27:33.238] windows = "NUL", "/dev/null"), open = "w") [01:27:33.238] } [01:27:33.238] base::sink(...future.stdout, type = "output", split = FALSE) [01:27:33.238] base::on.exit(if (!base::is.null(...future.stdout)) { [01:27:33.238] base::sink(type = "output", split = FALSE) [01:27:33.238] base::close(...future.stdout) [01:27:33.238] }, add = TRUE) [01:27:33.238] } [01:27:33.238] ...future.frame <- base::sys.nframe() [01:27:33.238] ...future.conditions <- base::list() [01:27:33.238] ...future.rng <- base::globalenv()$.Random.seed [01:27:33.238] if (FALSE) { [01:27:33.238] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [01:27:33.238] "...future.value", "...future.globalenv.names", ".Random.seed") [01:27:33.238] } [01:27:33.238] ...future.result <- base::tryCatch({ [01:27:33.238] base::withCallingHandlers({ [01:27:33.238] ...future.value <- base::withVisible(base::local({ [01:27:33.238] 42L [01:27:33.238] })) [01:27:33.238] future::FutureResult(value = ...future.value$value, [01:27:33.238] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [01:27:33.238] ...future.rng), globalenv = if (FALSE) [01:27:33.238] list(added = base::setdiff(base::names(base::.GlobalEnv), [01:27:33.238] ...future.globalenv.names)) [01:27:33.238] else NULL, started = ...future.startTime, version = "1.8") [01:27:33.238] }, condition = base::local({ [01:27:33.238] c <- base::c [01:27:33.238] inherits <- base::inherits [01:27:33.238] invokeRestart <- base::invokeRestart [01:27:33.238] length <- base::length [01:27:33.238] list <- base::list [01:27:33.238] seq.int <- base::seq.int [01:27:33.238] signalCondition <- base::signalCondition [01:27:33.238] sys.calls <- base::sys.calls [01:27:33.238] `[[` <- base::`[[` [01:27:33.238] `+` <- base::`+` [01:27:33.238] `<<-` <- base::`<<-` [01:27:33.238] sysCalls <- function(calls = sys.calls(), from = 1L) { [01:27:33.238] calls[seq.int(from = from + 12L, to = length(calls) - [01:27:33.238] 3L)] [01:27:33.238] } [01:27:33.238] function(cond) { [01:27:33.238] is_error <- inherits(cond, "error") [01:27:33.238] ignore <- !is_error && !is.null(NULL) && inherits(cond, [01:27:33.238] NULL) [01:27:33.238] if (is_error) { [01:27:33.238] sessionInformation <- function() { [01:27:33.238] list(r = base::R.Version(), locale = base::Sys.getlocale(), [01:27:33.238] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [01:27:33.238] search = base::search(), system = base::Sys.info()) [01:27:33.238] } [01:27:33.238] ...future.conditions[[length(...future.conditions) + [01:27:33.238] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [01:27:33.238] cond$call), session = sessionInformation(), [01:27:33.238] timestamp = base::Sys.time(), signaled = 0L) [01:27:33.238] signalCondition(cond) [01:27:33.238] } [01:27:33.238] else if (!ignore && TRUE && inherits(cond, c("condition", [01:27:33.238] "immediateCondition"))) { [01:27:33.238] signal <- TRUE && inherits(cond, "immediateCondition") [01:27:33.238] ...future.conditions[[length(...future.conditions) + [01:27:33.238] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [01:27:33.238] if (TRUE && !signal) { [01:27:33.238] muffleCondition <- function (cond, pattern = "^muffle") [01:27:33.238] { [01:27:33.238] inherits <- base::inherits [01:27:33.238] invokeRestart <- base::invokeRestart [01:27:33.238] is.null <- base::is.null [01:27:33.238] muffled <- FALSE [01:27:33.238] if (inherits(cond, "message")) { [01:27:33.238] muffled <- grepl(pattern, "muffleMessage") [01:27:33.238] if (muffled) [01:27:33.238] invokeRestart("muffleMessage") [01:27:33.238] } [01:27:33.238] else if (inherits(cond, "warning")) { [01:27:33.238] muffled <- grepl(pattern, "muffleWarning") [01:27:33.238] if (muffled) [01:27:33.238] invokeRestart("muffleWarning") [01:27:33.238] } [01:27:33.238] else if (inherits(cond, "condition")) { [01:27:33.238] if (!is.null(pattern)) { [01:27:33.238] computeRestarts <- base::computeRestarts [01:27:33.238] grepl <- base::grepl [01:27:33.238] restarts <- computeRestarts(cond) [01:27:33.238] for (restart in restarts) { [01:27:33.238] name <- restart$name [01:27:33.238] if (is.null(name)) [01:27:33.238] next [01:27:33.238] if (!grepl(pattern, name)) [01:27:33.238] next [01:27:33.238] invokeRestart(restart) [01:27:33.238] muffled <- TRUE [01:27:33.238] break [01:27:33.238] } [01:27:33.238] } [01:27:33.238] } [01:27:33.238] invisible(muffled) [01:27:33.238] } [01:27:33.238] muffleCondition(cond, pattern = "^muffle") [01:27:33.238] } [01:27:33.238] } [01:27:33.238] else { [01:27:33.238] if (TRUE) { [01:27:33.238] muffleCondition <- function (cond, pattern = "^muffle") [01:27:33.238] { [01:27:33.238] inherits <- base::inherits [01:27:33.238] invokeRestart <- base::invokeRestart [01:27:33.238] is.null <- base::is.null [01:27:33.238] muffled <- FALSE [01:27:33.238] if (inherits(cond, "message")) { [01:27:33.238] muffled <- grepl(pattern, "muffleMessage") [01:27:33.238] if (muffled) [01:27:33.238] invokeRestart("muffleMessage") [01:27:33.238] } [01:27:33.238] else if (inherits(cond, "warning")) { [01:27:33.238] muffled <- grepl(pattern, "muffleWarning") [01:27:33.238] if (muffled) [01:27:33.238] invokeRestart("muffleWarning") [01:27:33.238] } [01:27:33.238] else if (inherits(cond, "condition")) { [01:27:33.238] if (!is.null(pattern)) { [01:27:33.238] computeRestarts <- base::computeRestarts [01:27:33.238] grepl <- base::grepl [01:27:33.238] restarts <- computeRestarts(cond) [01:27:33.238] for (restart in restarts) { [01:27:33.238] name <- restart$name [01:27:33.238] if (is.null(name)) [01:27:33.238] next [01:27:33.238] if (!grepl(pattern, name)) [01:27:33.238] next [01:27:33.238] invokeRestart(restart) [01:27:33.238] muffled <- TRUE [01:27:33.238] break [01:27:33.238] } [01:27:33.238] } [01:27:33.238] } [01:27:33.238] invisible(muffled) [01:27:33.238] } [01:27:33.238] muffleCondition(cond, pattern = "^muffle") [01:27:33.238] } [01:27:33.238] } [01:27:33.238] } [01:27:33.238] })) [01:27:33.238] }, error = function(ex) { [01:27:33.238] base::structure(base::list(value = NULL, visible = NULL, [01:27:33.238] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [01:27:33.238] ...future.rng), started = ...future.startTime, [01:27:33.238] finished = Sys.time(), session_uuid = NA_character_, [01:27:33.238] version = "1.8"), class = "FutureResult") [01:27:33.238] }, finally = { [01:27:33.238] if (!identical(...future.workdir, getwd())) [01:27:33.238] setwd(...future.workdir) [01:27:33.238] { [01:27:33.238] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [01:27:33.238] ...future.oldOptions$nwarnings <- NULL [01:27:33.238] } [01:27:33.238] base::options(...future.oldOptions) [01:27:33.238] if (.Platform$OS.type == "windows") { [01:27:33.238] old_names <- names(...future.oldEnvVars) [01:27:33.238] envs <- base::Sys.getenv() [01:27:33.238] names <- names(envs) [01:27:33.238] common <- intersect(names, old_names) [01:27:33.238] added <- setdiff(names, old_names) [01:27:33.238] removed <- setdiff(old_names, names) [01:27:33.238] changed <- common[...future.oldEnvVars[common] != [01:27:33.238] envs[common]] [01:27:33.238] NAMES <- toupper(changed) [01:27:33.238] args <- list() [01:27:33.238] for (kk in seq_along(NAMES)) { [01:27:33.238] name <- changed[[kk]] [01:27:33.238] NAME <- NAMES[[kk]] [01:27:33.238] if (name != NAME && is.element(NAME, old_names)) [01:27:33.238] next [01:27:33.238] args[[name]] <- ...future.oldEnvVars[[name]] [01:27:33.238] } [01:27:33.238] NAMES <- toupper(added) [01:27:33.238] for (kk in seq_along(NAMES)) { [01:27:33.238] name <- added[[kk]] [01:27:33.238] NAME <- NAMES[[kk]] [01:27:33.238] if (name != NAME && is.element(NAME, old_names)) [01:27:33.238] next [01:27:33.238] args[[name]] <- "" [01:27:33.238] } [01:27:33.238] NAMES <- toupper(removed) [01:27:33.238] for (kk in seq_along(NAMES)) { [01:27:33.238] name <- removed[[kk]] [01:27:33.238] NAME <- NAMES[[kk]] [01:27:33.238] if (name != NAME && is.element(NAME, old_names)) [01:27:33.238] next [01:27:33.238] args[[name]] <- ...future.oldEnvVars[[name]] [01:27:33.238] } [01:27:33.238] if (length(args) > 0) [01:27:33.238] base::do.call(base::Sys.setenv, args = args) [01:27:33.238] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [01:27:33.238] } [01:27:33.238] else { [01:27:33.238] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [01:27:33.238] } [01:27:33.238] { [01:27:33.238] if (base::length(...future.futureOptionsAdded) > [01:27:33.238] 0L) { [01:27:33.238] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [01:27:33.238] base::names(opts) <- ...future.futureOptionsAdded [01:27:33.238] base::options(opts) [01:27:33.238] } [01:27:33.238] { [01:27:33.238] { [01:27:33.238] NULL [01:27:33.238] RNGkind("Mersenne-Twister") [01:27:33.238] base::rm(list = ".Random.seed", envir = base::globalenv(), [01:27:33.238] inherits = FALSE) [01:27:33.238] } [01:27:33.238] options(future.plan = NULL) [01:27:33.238] if (is.na(NA_character_)) [01:27:33.238] Sys.unsetenv("R_FUTURE_PLAN") [01:27:33.238] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [01:27:33.238] future::plan(list(function (..., envir = parent.frame()) [01:27:33.238] { [01:27:33.238] future <- SequentialFuture(..., envir = envir) [01:27:33.238] if (!future$lazy) [01:27:33.238] future <- run(future) [01:27:33.238] invisible(future) [01:27:33.238] }), .cleanup = FALSE, .init = FALSE) [01:27:33.238] } [01:27:33.238] } [01:27:33.238] } [01:27:33.238] }) [01:27:33.238] if (TRUE) { [01:27:33.238] base::sink(type = "output", split = FALSE) [01:27:33.238] if (TRUE) { [01:27:33.238] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [01:27:33.238] } [01:27:33.238] else { [01:27:33.238] ...future.result["stdout"] <- base::list(NULL) [01:27:33.238] } [01:27:33.238] base::close(...future.stdout) [01:27:33.238] ...future.stdout <- NULL [01:27:33.238] } [01:27:33.238] ...future.result$conditions <- ...future.conditions [01:27:33.238] ...future.result$finished <- base::Sys.time() [01:27:33.238] ...future.result [01:27:33.238] } [01:27:33.242] plan(): Setting new future strategy stack: [01:27:33.243] List of future strategies: [01:27:33.243] 1. sequential: [01:27:33.243] - args: function (..., envir = parent.frame(), workers = "") [01:27:33.243] - tweaked: FALSE [01:27:33.243] - call: NULL [01:27:33.243] plan(): nbrOfWorkers() = 1 [01:27:33.245] plan(): Setting new future strategy stack: [01:27:33.245] List of future strategies: [01:27:33.245] 1. sequential: [01:27:33.245] - args: function (..., envir = parent.frame(), workers = "") [01:27:33.245] - tweaked: FALSE [01:27:33.245] - call: future::plan("sequential") [01:27:33.246] plan(): nbrOfWorkers() = 1 [01:27:33.246] SequentialFuture started (and completed) [01:27:33.247] - Launch lazy future ... done [01:27:33.247] run() for 'SequentialFuture' ... done [01:27:33.247] - run() ... done [01:27:33.248] - resolved() ... [01:27:33.248] resolved() for 'SequentialFuture' ... [01:27:33.248] - state: 'finished' [01:27:33.248] - run: TRUE [01:27:33.248] - result: 'FutureResult' [01:27:33.249] resolved() for 'SequentialFuture' ... done [01:27:33.249] - resolved: TRUE [01:27:33.249] - resolved() ... done [01:27:33.249] resolved() for 'SequentialFuture' ... done [1] TRUE > y <- value(f) > print(y) [1] 42 > stopifnot(y == 42L) > > > message("*** future() w/ gc = TRUE ...") *** future() w/ gc = TRUE ... > > f <- future(42L, gc = TRUE, lazy = TRUE) [01:27:33.250] getGlobalsAndPackages() ... [01:27:33.250] Searching for globals... [01:27:33.250] [01:27:33.251] Searching for globals ... DONE [01:27:33.251] - globals: [0] [01:27:33.251] getGlobalsAndPackages() ... DONE > print(f) Future: Label: '' Expression: [1] 42 Lazy evaluation: TRUE Asynchronous evaluation: TRUE Local evaluation: TRUE Environment: R_GlobalEnv Capture standard output: TRUE Capture condition classes: 'condition' (excluding 'nothing') Globals: Packages: L'Ecuyer-CMRG RNG seed: (seed = FALSE) Resolved: FALSE Value: Conditions captured: Early signaling: FALSE Owner process: 51d9c486-60e6-ff77-3117-424c5dba3193 Class: 'Future', 'environment' > y <- value(f) [01:27:33.252] run() for 'Future' ... [01:27:33.252] - state: 'created' [01:27:33.253] - Future backend: 'FutureStrategy', 'sequential', 'uniprocess', 'future', 'function' [01:27:33.253] - Future class: 'SequentialFuture', 'UniprocessFuture', 'Future', 'environment' [01:27:33.253] - Copy elements of temporary 'SequentialFuture' to final 'Future' object ... [01:27:33.253] - Field: 'label' [01:27:33.254] - Field: 'local' [01:27:33.254] - Field: 'owner' [01:27:33.254] - Field: 'envir' [01:27:33.254] - Field: 'packages' [01:27:33.254] - Field: 'gc' [01:27:33.255] - Field: 'conditions' [01:27:33.255] - Field: 'expr' [01:27:33.255] - Field: 'uuid' [01:27:33.255] - Field: 'seed' [01:27:33.255] - Field: 'version' [01:27:33.256] - Field: 'result' [01:27:33.256] - Field: 'asynchronous' [01:27:33.256] - Field: 'calls' [01:27:33.256] - Field: 'globals' [01:27:33.256] - Field: 'stdout' [01:27:33.258] - Field: 'earlySignal' [01:27:33.259] - Field: 'lazy' [01:27:33.259] - Field: 'state' [01:27:33.259] - Copy elements of temporary 'SequentialFuture' to final 'Future' object ... done [01:27:33.259] - Launch lazy future ... [01:27:33.260] Packages needed by the future expression (n = 0): [01:27:33.260] Packages needed by future strategies (n = 0): [01:27:33.260] { [01:27:33.260] { [01:27:33.260] { [01:27:33.260] ...future.startTime <- base::Sys.time() [01:27:33.260] { [01:27:33.260] { [01:27:33.260] { [01:27:33.260] base::local({ [01:27:33.260] has_future <- base::requireNamespace("future", [01:27:33.260] quietly = TRUE) [01:27:33.260] if (has_future) { [01:27:33.260] ns <- base::getNamespace("future") [01:27:33.260] version <- ns[[".package"]][["version"]] [01:27:33.260] if (is.null(version)) [01:27:33.260] version <- utils::packageVersion("future") [01:27:33.260] } [01:27:33.260] else { [01:27:33.260] version <- NULL [01:27:33.260] } [01:27:33.260] if (!has_future || version < "1.8.0") { [01:27:33.260] info <- base::c(r_version = base::gsub("R version ", [01:27:33.260] "", base::R.version$version.string), [01:27:33.260] platform = base::sprintf("%s (%s-bit)", [01:27:33.260] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [01:27:33.260] os = base::paste(base::Sys.info()[base::c("sysname", [01:27:33.260] "release", "version")], collapse = " "), [01:27:33.260] hostname = base::Sys.info()[["nodename"]]) [01:27:33.260] info <- base::sprintf("%s: %s", base::names(info), [01:27:33.260] info) [01:27:33.260] info <- base::paste(info, collapse = "; ") [01:27:33.260] if (!has_future) { [01:27:33.260] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [01:27:33.260] info) [01:27:33.260] } [01:27:33.260] else { [01:27:33.260] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [01:27:33.260] info, version) [01:27:33.260] } [01:27:33.260] base::stop(msg) [01:27:33.260] } [01:27:33.260] }) [01:27:33.260] } [01:27:33.260] options(future.plan = NULL) [01:27:33.260] Sys.unsetenv("R_FUTURE_PLAN") [01:27:33.260] future::plan("default", .cleanup = FALSE, .init = FALSE) [01:27:33.260] } [01:27:33.260] ...future.workdir <- getwd() [01:27:33.260] } [01:27:33.260] ...future.oldOptions <- base::as.list(base::.Options) [01:27:33.260] ...future.oldEnvVars <- base::Sys.getenv() [01:27:33.260] } [01:27:33.260] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [01:27:33.260] future.globals.maxSize = NULL, future.globals.method = NULL, [01:27:33.260] future.globals.onMissing = NULL, future.globals.onReference = NULL, [01:27:33.260] future.globals.resolve = NULL, future.resolve.recursive = NULL, [01:27:33.260] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [01:27:33.260] future.stdout.windows.reencode = NULL, width = 80L) [01:27:33.260] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [01:27:33.260] base::names(...future.oldOptions)) [01:27:33.260] } [01:27:33.260] if (FALSE) { [01:27:33.260] } [01:27:33.260] else { [01:27:33.260] if (TRUE) { [01:27:33.260] ...future.stdout <- base::rawConnection(base::raw(0L), [01:27:33.260] open = "w") [01:27:33.260] } [01:27:33.260] else { [01:27:33.260] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [01:27:33.260] windows = "NUL", "/dev/null"), open = "w") [01:27:33.260] } [01:27:33.260] base::sink(...future.stdout, type = "output", split = FALSE) [01:27:33.260] base::on.exit(if (!base::is.null(...future.stdout)) { [01:27:33.260] base::sink(type = "output", split = FALSE) [01:27:33.260] base::close(...future.stdout) [01:27:33.260] }, add = TRUE) [01:27:33.260] } [01:27:33.260] ...future.frame <- base::sys.nframe() [01:27:33.260] ...future.conditions <- base::list() [01:27:33.260] ...future.rng <- base::globalenv()$.Random.seed [01:27:33.260] if (FALSE) { [01:27:33.260] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [01:27:33.260] "...future.value", "...future.globalenv.names", ".Random.seed") [01:27:33.260] } [01:27:33.260] ...future.result <- base::tryCatch({ [01:27:33.260] base::withCallingHandlers({ [01:27:33.260] ...future.value <- base::withVisible(base::local(42L)) [01:27:33.260] future::FutureResult(value = ...future.value$value, [01:27:33.260] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [01:27:33.260] ...future.rng), globalenv = if (FALSE) [01:27:33.260] list(added = base::setdiff(base::names(base::.GlobalEnv), [01:27:33.260] ...future.globalenv.names)) [01:27:33.260] else NULL, started = ...future.startTime, version = "1.8") [01:27:33.260] }, condition = base::local({ [01:27:33.260] c <- base::c [01:27:33.260] inherits <- base::inherits [01:27:33.260] invokeRestart <- base::invokeRestart [01:27:33.260] length <- base::length [01:27:33.260] list <- base::list [01:27:33.260] seq.int <- base::seq.int [01:27:33.260] signalCondition <- base::signalCondition [01:27:33.260] sys.calls <- base::sys.calls [01:27:33.260] `[[` <- base::`[[` [01:27:33.260] `+` <- base::`+` [01:27:33.260] `<<-` <- base::`<<-` [01:27:33.260] sysCalls <- function(calls = sys.calls(), from = 1L) { [01:27:33.260] calls[seq.int(from = from + 12L, to = length(calls) - [01:27:33.260] 3L)] [01:27:33.260] } [01:27:33.260] function(cond) { [01:27:33.260] is_error <- inherits(cond, "error") [01:27:33.260] ignore <- !is_error && !is.null(NULL) && inherits(cond, [01:27:33.260] NULL) [01:27:33.260] if (is_error) { [01:27:33.260] sessionInformation <- function() { [01:27:33.260] list(r = base::R.Version(), locale = base::Sys.getlocale(), [01:27:33.260] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [01:27:33.260] search = base::search(), system = base::Sys.info()) [01:27:33.260] } [01:27:33.260] ...future.conditions[[length(...future.conditions) + [01:27:33.260] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [01:27:33.260] cond$call), session = sessionInformation(), [01:27:33.260] timestamp = base::Sys.time(), signaled = 0L) [01:27:33.260] signalCondition(cond) [01:27:33.260] } [01:27:33.260] else if (!ignore && TRUE && inherits(cond, c("condition", [01:27:33.260] "immediateCondition"))) { [01:27:33.260] signal <- TRUE && inherits(cond, "immediateCondition") [01:27:33.260] ...future.conditions[[length(...future.conditions) + [01:27:33.260] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [01:27:33.260] if (TRUE && !signal) { [01:27:33.260] muffleCondition <- function (cond, pattern = "^muffle") [01:27:33.260] { [01:27:33.260] inherits <- base::inherits [01:27:33.260] invokeRestart <- base::invokeRestart [01:27:33.260] is.null <- base::is.null [01:27:33.260] muffled <- FALSE [01:27:33.260] if (inherits(cond, "message")) { [01:27:33.260] muffled <- grepl(pattern, "muffleMessage") [01:27:33.260] if (muffled) [01:27:33.260] invokeRestart("muffleMessage") [01:27:33.260] } [01:27:33.260] else if (inherits(cond, "warning")) { [01:27:33.260] muffled <- grepl(pattern, "muffleWarning") [01:27:33.260] if (muffled) [01:27:33.260] invokeRestart("muffleWarning") [01:27:33.260] } [01:27:33.260] else if (inherits(cond, "condition")) { [01:27:33.260] if (!is.null(pattern)) { [01:27:33.260] computeRestarts <- base::computeRestarts [01:27:33.260] grepl <- base::grepl [01:27:33.260] restarts <- computeRestarts(cond) [01:27:33.260] for (restart in restarts) { [01:27:33.260] name <- restart$name [01:27:33.260] if (is.null(name)) [01:27:33.260] next [01:27:33.260] if (!grepl(pattern, name)) [01:27:33.260] next [01:27:33.260] invokeRestart(restart) [01:27:33.260] muffled <- TRUE [01:27:33.260] break [01:27:33.260] } [01:27:33.260] } [01:27:33.260] } [01:27:33.260] invisible(muffled) [01:27:33.260] } [01:27:33.260] muffleCondition(cond, pattern = "^muffle") [01:27:33.260] } [01:27:33.260] } [01:27:33.260] else { [01:27:33.260] if (TRUE) { [01:27:33.260] muffleCondition <- function (cond, pattern = "^muffle") [01:27:33.260] { [01:27:33.260] inherits <- base::inherits [01:27:33.260] invokeRestart <- base::invokeRestart [01:27:33.260] is.null <- base::is.null [01:27:33.260] muffled <- FALSE [01:27:33.260] if (inherits(cond, "message")) { [01:27:33.260] muffled <- grepl(pattern, "muffleMessage") [01:27:33.260] if (muffled) [01:27:33.260] invokeRestart("muffleMessage") [01:27:33.260] } [01:27:33.260] else if (inherits(cond, "warning")) { [01:27:33.260] muffled <- grepl(pattern, "muffleWarning") [01:27:33.260] if (muffled) [01:27:33.260] invokeRestart("muffleWarning") [01:27:33.260] } [01:27:33.260] else if (inherits(cond, "condition")) { [01:27:33.260] if (!is.null(pattern)) { [01:27:33.260] computeRestarts <- base::computeRestarts [01:27:33.260] grepl <- base::grepl [01:27:33.260] restarts <- computeRestarts(cond) [01:27:33.260] for (restart in restarts) { [01:27:33.260] name <- restart$name [01:27:33.260] if (is.null(name)) [01:27:33.260] next [01:27:33.260] if (!grepl(pattern, name)) [01:27:33.260] next [01:27:33.260] invokeRestart(restart) [01:27:33.260] muffled <- TRUE [01:27:33.260] break [01:27:33.260] } [01:27:33.260] } [01:27:33.260] } [01:27:33.260] invisible(muffled) [01:27:33.260] } [01:27:33.260] muffleCondition(cond, pattern = "^muffle") [01:27:33.260] } [01:27:33.260] } [01:27:33.260] } [01:27:33.260] })) [01:27:33.260] }, error = function(ex) { [01:27:33.260] base::structure(base::list(value = NULL, visible = NULL, [01:27:33.260] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [01:27:33.260] ...future.rng), started = ...future.startTime, [01:27:33.260] finished = Sys.time(), session_uuid = NA_character_, [01:27:33.260] version = "1.8"), class = "FutureResult") [01:27:33.260] }, finally = { [01:27:33.260] if (!identical(...future.workdir, getwd())) [01:27:33.260] setwd(...future.workdir) [01:27:33.260] { [01:27:33.260] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [01:27:33.260] ...future.oldOptions$nwarnings <- NULL [01:27:33.260] } [01:27:33.260] base::options(...future.oldOptions) [01:27:33.260] if (.Platform$OS.type == "windows") { [01:27:33.260] old_names <- names(...future.oldEnvVars) [01:27:33.260] envs <- base::Sys.getenv() [01:27:33.260] names <- names(envs) [01:27:33.260] common <- intersect(names, old_names) [01:27:33.260] added <- setdiff(names, old_names) [01:27:33.260] removed <- setdiff(old_names, names) [01:27:33.260] changed <- common[...future.oldEnvVars[common] != [01:27:33.260] envs[common]] [01:27:33.260] NAMES <- toupper(changed) [01:27:33.260] args <- list() [01:27:33.260] for (kk in seq_along(NAMES)) { [01:27:33.260] name <- changed[[kk]] [01:27:33.260] NAME <- NAMES[[kk]] [01:27:33.260] if (name != NAME && is.element(NAME, old_names)) [01:27:33.260] next [01:27:33.260] args[[name]] <- ...future.oldEnvVars[[name]] [01:27:33.260] } [01:27:33.260] NAMES <- toupper(added) [01:27:33.260] for (kk in seq_along(NAMES)) { [01:27:33.260] name <- added[[kk]] [01:27:33.260] NAME <- NAMES[[kk]] [01:27:33.260] if (name != NAME && is.element(NAME, old_names)) [01:27:33.260] next [01:27:33.260] args[[name]] <- "" [01:27:33.260] } [01:27:33.260] NAMES <- toupper(removed) [01:27:33.260] for (kk in seq_along(NAMES)) { [01:27:33.260] name <- removed[[kk]] [01:27:33.260] NAME <- NAMES[[kk]] [01:27:33.260] if (name != NAME && is.element(NAME, old_names)) [01:27:33.260] next [01:27:33.260] args[[name]] <- ...future.oldEnvVars[[name]] [01:27:33.260] } [01:27:33.260] if (length(args) > 0) [01:27:33.260] base::do.call(base::Sys.setenv, args = args) [01:27:33.260] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [01:27:33.260] } [01:27:33.260] else { [01:27:33.260] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [01:27:33.260] } [01:27:33.260] { [01:27:33.260] if (base::length(...future.futureOptionsAdded) > [01:27:33.260] 0L) { [01:27:33.260] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [01:27:33.260] base::names(opts) <- ...future.futureOptionsAdded [01:27:33.260] base::options(opts) [01:27:33.260] } [01:27:33.260] { [01:27:33.260] { [01:27:33.260] NULL [01:27:33.260] RNGkind("Mersenne-Twister") [01:27:33.260] base::rm(list = ".Random.seed", envir = base::globalenv(), [01:27:33.260] inherits = FALSE) [01:27:33.260] } [01:27:33.260] options(future.plan = NULL) [01:27:33.260] if (is.na(NA_character_)) [01:27:33.260] Sys.unsetenv("R_FUTURE_PLAN") [01:27:33.260] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [01:27:33.260] future::plan(list(function (..., envir = parent.frame()) [01:27:33.260] { [01:27:33.260] future <- SequentialFuture(..., envir = envir) [01:27:33.260] if (!future$lazy) [01:27:33.260] future <- run(future) [01:27:33.260] invisible(future) [01:27:33.260] }), .cleanup = FALSE, .init = FALSE) [01:27:33.260] } [01:27:33.260] } [01:27:33.260] } [01:27:33.260] }) [01:27:33.260] if (TRUE) { [01:27:33.260] base::sink(type = "output", split = FALSE) [01:27:33.260] if (TRUE) { [01:27:33.260] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [01:27:33.260] } [01:27:33.260] else { [01:27:33.260] ...future.result["stdout"] <- base::list(NULL) [01:27:33.260] } [01:27:33.260] base::close(...future.stdout) [01:27:33.260] ...future.stdout <- NULL [01:27:33.260] } [01:27:33.260] ...future.result$conditions <- ...future.conditions [01:27:33.260] ...future.result$finished <- base::Sys.time() [01:27:33.260] ...future.result [01:27:33.260] } [01:27:33.264] plan(): Setting new future strategy stack: [01:27:33.264] List of future strategies: [01:27:33.264] 1. sequential: [01:27:33.264] - args: function (..., envir = parent.frame(), workers = "") [01:27:33.264] - tweaked: FALSE [01:27:33.264] - call: NULL [01:27:33.265] plan(): nbrOfWorkers() = 1 [01:27:33.266] plan(): Setting new future strategy stack: [01:27:33.266] List of future strategies: [01:27:33.266] 1. sequential: [01:27:33.266] - args: function (..., envir = parent.frame(), workers = "") [01:27:33.266] - tweaked: FALSE [01:27:33.266] - call: future::plan("sequential") [01:27:33.267] plan(): nbrOfWorkers() = 1 [01:27:33.267] SequentialFuture started (and completed) [01:27:33.267] - Launch lazy future ... done [01:27:33.268] run() for 'SequentialFuture' ... done > print(y) [1] 42 > stopifnot(y == 42L) > > message("*** future() w/ gc = TRUE ... DONE") *** future() w/ gc = TRUE ... DONE > message("*** future() ... DONE") *** future() ... DONE > > message("*** future() ...") *** future() ... > > f <- future({ + 42L + }, lazy = TRUE) [01:27:33.268] getGlobalsAndPackages() ... [01:27:33.268] Searching for globals... [01:27:33.269] - globals found: [1] '{' [01:27:33.269] Searching for globals ... DONE [01:27:33.270] Resolving globals: FALSE [01:27:33.270] [01:27:33.270] [01:27:33.270] getGlobalsAndPackages() ... DONE > > print(resolved(f)) [01:27:33.271] resolved() for 'Future' ... [01:27:33.271] - state: 'created' [01:27:33.271] - run: TRUE [01:27:33.271] - run() ... [01:27:33.271] run() for 'Future' ... [01:27:33.271] - state: 'created' [01:27:33.272] - Future backend: 'FutureStrategy', 'sequential', 'uniprocess', 'future', 'function' [01:27:33.272] - Future class: 'SequentialFuture', 'UniprocessFuture', 'Future', 'environment' [01:27:33.272] - Copy elements of temporary 'SequentialFuture' to final 'Future' object ... [01:27:33.272] - Field: 'label' [01:27:33.273] - Field: 'local' [01:27:33.273] - Field: 'owner' [01:27:33.273] - Field: 'envir' [01:27:33.273] - Field: 'packages' [01:27:33.273] - Field: 'gc' [01:27:33.274] - Field: 'conditions' [01:27:33.274] - Field: 'expr' [01:27:33.274] - Field: 'uuid' [01:27:33.274] - Field: 'seed' [01:27:33.274] - Field: 'version' [01:27:33.274] - Field: 'result' [01:27:33.275] - Field: 'asynchronous' [01:27:33.275] - Field: 'calls' [01:27:33.275] - Field: 'globals' [01:27:33.275] - Field: 'stdout' [01:27:33.275] - Field: 'earlySignal' [01:27:33.275] - Field: 'lazy' [01:27:33.276] - Field: 'state' [01:27:33.276] - Copy elements of temporary 'SequentialFuture' to final 'Future' object ... done [01:27:33.276] - Launch lazy future ... [01:27:33.276] Packages needed by the future expression (n = 0): [01:27:33.276] Packages needed by future strategies (n = 0): [01:27:33.277] { [01:27:33.277] { [01:27:33.277] { [01:27:33.277] ...future.startTime <- base::Sys.time() [01:27:33.277] { [01:27:33.277] { [01:27:33.277] { [01:27:33.277] base::local({ [01:27:33.277] has_future <- base::requireNamespace("future", [01:27:33.277] quietly = TRUE) [01:27:33.277] if (has_future) { [01:27:33.277] ns <- base::getNamespace("future") [01:27:33.277] version <- ns[[".package"]][["version"]] [01:27:33.277] if (is.null(version)) [01:27:33.277] version <- utils::packageVersion("future") [01:27:33.277] } [01:27:33.277] else { [01:27:33.277] version <- NULL [01:27:33.277] } [01:27:33.277] if (!has_future || version < "1.8.0") { [01:27:33.277] info <- base::c(r_version = base::gsub("R version ", [01:27:33.277] "", base::R.version$version.string), [01:27:33.277] platform = base::sprintf("%s (%s-bit)", [01:27:33.277] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [01:27:33.277] os = base::paste(base::Sys.info()[base::c("sysname", [01:27:33.277] "release", "version")], collapse = " "), [01:27:33.277] hostname = base::Sys.info()[["nodename"]]) [01:27:33.277] info <- base::sprintf("%s: %s", base::names(info), [01:27:33.277] info) [01:27:33.277] info <- base::paste(info, collapse = "; ") [01:27:33.277] if (!has_future) { [01:27:33.277] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [01:27:33.277] info) [01:27:33.277] } [01:27:33.277] else { [01:27:33.277] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [01:27:33.277] info, version) [01:27:33.277] } [01:27:33.277] base::stop(msg) [01:27:33.277] } [01:27:33.277] }) [01:27:33.277] } [01:27:33.277] options(future.plan = NULL) [01:27:33.277] Sys.unsetenv("R_FUTURE_PLAN") [01:27:33.277] future::plan("default", .cleanup = FALSE, .init = FALSE) [01:27:33.277] } [01:27:33.277] ...future.workdir <- getwd() [01:27:33.277] } [01:27:33.277] ...future.oldOptions <- base::as.list(base::.Options) [01:27:33.277] ...future.oldEnvVars <- base::Sys.getenv() [01:27:33.277] } [01:27:33.277] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [01:27:33.277] future.globals.maxSize = NULL, future.globals.method = NULL, [01:27:33.277] future.globals.onMissing = NULL, future.globals.onReference = NULL, [01:27:33.277] future.globals.resolve = NULL, future.resolve.recursive = NULL, [01:27:33.277] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [01:27:33.277] future.stdout.windows.reencode = NULL, width = 80L) [01:27:33.277] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [01:27:33.277] base::names(...future.oldOptions)) [01:27:33.277] } [01:27:33.277] if (FALSE) { [01:27:33.277] } [01:27:33.277] else { [01:27:33.277] if (TRUE) { [01:27:33.277] ...future.stdout <- base::rawConnection(base::raw(0L), [01:27:33.277] open = "w") [01:27:33.277] } [01:27:33.277] else { [01:27:33.277] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [01:27:33.277] windows = "NUL", "/dev/null"), open = "w") [01:27:33.277] } [01:27:33.277] base::sink(...future.stdout, type = "output", split = FALSE) [01:27:33.277] base::on.exit(if (!base::is.null(...future.stdout)) { [01:27:33.277] base::sink(type = "output", split = FALSE) [01:27:33.277] base::close(...future.stdout) [01:27:33.277] }, add = TRUE) [01:27:33.277] } [01:27:33.277] ...future.frame <- base::sys.nframe() [01:27:33.277] ...future.conditions <- base::list() [01:27:33.277] ...future.rng <- base::globalenv()$.Random.seed [01:27:33.277] if (FALSE) { [01:27:33.277] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [01:27:33.277] "...future.value", "...future.globalenv.names", ".Random.seed") [01:27:33.277] } [01:27:33.277] ...future.result <- base::tryCatch({ [01:27:33.277] base::withCallingHandlers({ [01:27:33.277] ...future.value <- base::withVisible(base::local({ [01:27:33.277] 42L [01:27:33.277] })) [01:27:33.277] future::FutureResult(value = ...future.value$value, [01:27:33.277] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [01:27:33.277] ...future.rng), globalenv = if (FALSE) [01:27:33.277] list(added = base::setdiff(base::names(base::.GlobalEnv), [01:27:33.277] ...future.globalenv.names)) [01:27:33.277] else NULL, started = ...future.startTime, version = "1.8") [01:27:33.277] }, condition = base::local({ [01:27:33.277] c <- base::c [01:27:33.277] inherits <- base::inherits [01:27:33.277] invokeRestart <- base::invokeRestart [01:27:33.277] length <- base::length [01:27:33.277] list <- base::list [01:27:33.277] seq.int <- base::seq.int [01:27:33.277] signalCondition <- base::signalCondition [01:27:33.277] sys.calls <- base::sys.calls [01:27:33.277] `[[` <- base::`[[` [01:27:33.277] `+` <- base::`+` [01:27:33.277] `<<-` <- base::`<<-` [01:27:33.277] sysCalls <- function(calls = sys.calls(), from = 1L) { [01:27:33.277] calls[seq.int(from = from + 12L, to = length(calls) - [01:27:33.277] 3L)] [01:27:33.277] } [01:27:33.277] function(cond) { [01:27:33.277] is_error <- inherits(cond, "error") [01:27:33.277] ignore <- !is_error && !is.null(NULL) && inherits(cond, [01:27:33.277] NULL) [01:27:33.277] if (is_error) { [01:27:33.277] sessionInformation <- function() { [01:27:33.277] list(r = base::R.Version(), locale = base::Sys.getlocale(), [01:27:33.277] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [01:27:33.277] search = base::search(), system = base::Sys.info()) [01:27:33.277] } [01:27:33.277] ...future.conditions[[length(...future.conditions) + [01:27:33.277] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [01:27:33.277] cond$call), session = sessionInformation(), [01:27:33.277] timestamp = base::Sys.time(), signaled = 0L) [01:27:33.277] signalCondition(cond) [01:27:33.277] } [01:27:33.277] else if (!ignore && TRUE && inherits(cond, c("condition", [01:27:33.277] "immediateCondition"))) { [01:27:33.277] signal <- TRUE && inherits(cond, "immediateCondition") [01:27:33.277] ...future.conditions[[length(...future.conditions) + [01:27:33.277] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [01:27:33.277] if (TRUE && !signal) { [01:27:33.277] muffleCondition <- function (cond, pattern = "^muffle") [01:27:33.277] { [01:27:33.277] inherits <- base::inherits [01:27:33.277] invokeRestart <- base::invokeRestart [01:27:33.277] is.null <- base::is.null [01:27:33.277] muffled <- FALSE [01:27:33.277] if (inherits(cond, "message")) { [01:27:33.277] muffled <- grepl(pattern, "muffleMessage") [01:27:33.277] if (muffled) [01:27:33.277] invokeRestart("muffleMessage") [01:27:33.277] } [01:27:33.277] else if (inherits(cond, "warning")) { [01:27:33.277] muffled <- grepl(pattern, "muffleWarning") [01:27:33.277] if (muffled) [01:27:33.277] invokeRestart("muffleWarning") [01:27:33.277] } [01:27:33.277] else if (inherits(cond, "condition")) { [01:27:33.277] if (!is.null(pattern)) { [01:27:33.277] computeRestarts <- base::computeRestarts [01:27:33.277] grepl <- base::grepl [01:27:33.277] restarts <- computeRestarts(cond) [01:27:33.277] for (restart in restarts) { [01:27:33.277] name <- restart$name [01:27:33.277] if (is.null(name)) [01:27:33.277] next [01:27:33.277] if (!grepl(pattern, name)) [01:27:33.277] next [01:27:33.277] invokeRestart(restart) [01:27:33.277] muffled <- TRUE [01:27:33.277] break [01:27:33.277] } [01:27:33.277] } [01:27:33.277] } [01:27:33.277] invisible(muffled) [01:27:33.277] } [01:27:33.277] muffleCondition(cond, pattern = "^muffle") [01:27:33.277] } [01:27:33.277] } [01:27:33.277] else { [01:27:33.277] if (TRUE) { [01:27:33.277] muffleCondition <- function (cond, pattern = "^muffle") [01:27:33.277] { [01:27:33.277] inherits <- base::inherits [01:27:33.277] invokeRestart <- base::invokeRestart [01:27:33.277] is.null <- base::is.null [01:27:33.277] muffled <- FALSE [01:27:33.277] if (inherits(cond, "message")) { [01:27:33.277] muffled <- grepl(pattern, "muffleMessage") [01:27:33.277] if (muffled) [01:27:33.277] invokeRestart("muffleMessage") [01:27:33.277] } [01:27:33.277] else if (inherits(cond, "warning")) { [01:27:33.277] muffled <- grepl(pattern, "muffleWarning") [01:27:33.277] if (muffled) [01:27:33.277] invokeRestart("muffleWarning") [01:27:33.277] } [01:27:33.277] else if (inherits(cond, "condition")) { [01:27:33.277] if (!is.null(pattern)) { [01:27:33.277] computeRestarts <- base::computeRestarts [01:27:33.277] grepl <- base::grepl [01:27:33.277] restarts <- computeRestarts(cond) [01:27:33.277] for (restart in restarts) { [01:27:33.277] name <- restart$name [01:27:33.277] if (is.null(name)) [01:27:33.277] next [01:27:33.277] if (!grepl(pattern, name)) [01:27:33.277] next [01:27:33.277] invokeRestart(restart) [01:27:33.277] muffled <- TRUE [01:27:33.277] break [01:27:33.277] } [01:27:33.277] } [01:27:33.277] } [01:27:33.277] invisible(muffled) [01:27:33.277] } [01:27:33.277] muffleCondition(cond, pattern = "^muffle") [01:27:33.277] } [01:27:33.277] } [01:27:33.277] } [01:27:33.277] })) [01:27:33.277] }, error = function(ex) { [01:27:33.277] base::structure(base::list(value = NULL, visible = NULL, [01:27:33.277] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [01:27:33.277] ...future.rng), started = ...future.startTime, [01:27:33.277] finished = Sys.time(), session_uuid = NA_character_, [01:27:33.277] version = "1.8"), class = "FutureResult") [01:27:33.277] }, finally = { [01:27:33.277] if (!identical(...future.workdir, getwd())) [01:27:33.277] setwd(...future.workdir) [01:27:33.277] { [01:27:33.277] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [01:27:33.277] ...future.oldOptions$nwarnings <- NULL [01:27:33.277] } [01:27:33.277] base::options(...future.oldOptions) [01:27:33.277] if (.Platform$OS.type == "windows") { [01:27:33.277] old_names <- names(...future.oldEnvVars) [01:27:33.277] envs <- base::Sys.getenv() [01:27:33.277] names <- names(envs) [01:27:33.277] common <- intersect(names, old_names) [01:27:33.277] added <- setdiff(names, old_names) [01:27:33.277] removed <- setdiff(old_names, names) [01:27:33.277] changed <- common[...future.oldEnvVars[common] != [01:27:33.277] envs[common]] [01:27:33.277] NAMES <- toupper(changed) [01:27:33.277] args <- list() [01:27:33.277] for (kk in seq_along(NAMES)) { [01:27:33.277] name <- changed[[kk]] [01:27:33.277] NAME <- NAMES[[kk]] [01:27:33.277] if (name != NAME && is.element(NAME, old_names)) [01:27:33.277] next [01:27:33.277] args[[name]] <- ...future.oldEnvVars[[name]] [01:27:33.277] } [01:27:33.277] NAMES <- toupper(added) [01:27:33.277] for (kk in seq_along(NAMES)) { [01:27:33.277] name <- added[[kk]] [01:27:33.277] NAME <- NAMES[[kk]] [01:27:33.277] if (name != NAME && is.element(NAME, old_names)) [01:27:33.277] next [01:27:33.277] args[[name]] <- "" [01:27:33.277] } [01:27:33.277] NAMES <- toupper(removed) [01:27:33.277] for (kk in seq_along(NAMES)) { [01:27:33.277] name <- removed[[kk]] [01:27:33.277] NAME <- NAMES[[kk]] [01:27:33.277] if (name != NAME && is.element(NAME, old_names)) [01:27:33.277] next [01:27:33.277] args[[name]] <- ...future.oldEnvVars[[name]] [01:27:33.277] } [01:27:33.277] if (length(args) > 0) [01:27:33.277] base::do.call(base::Sys.setenv, args = args) [01:27:33.277] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [01:27:33.277] } [01:27:33.277] else { [01:27:33.277] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [01:27:33.277] } [01:27:33.277] { [01:27:33.277] if (base::length(...future.futureOptionsAdded) > [01:27:33.277] 0L) { [01:27:33.277] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [01:27:33.277] base::names(opts) <- ...future.futureOptionsAdded [01:27:33.277] base::options(opts) [01:27:33.277] } [01:27:33.277] { [01:27:33.277] { [01:27:33.277] NULL [01:27:33.277] RNGkind("Mersenne-Twister") [01:27:33.277] base::rm(list = ".Random.seed", envir = base::globalenv(), [01:27:33.277] inherits = FALSE) [01:27:33.277] } [01:27:33.277] options(future.plan = NULL) [01:27:33.277] if (is.na(NA_character_)) [01:27:33.277] Sys.unsetenv("R_FUTURE_PLAN") [01:27:33.277] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [01:27:33.277] future::plan(list(function (..., envir = parent.frame()) [01:27:33.277] { [01:27:33.277] future <- SequentialFuture(..., envir = envir) [01:27:33.277] if (!future$lazy) [01:27:33.277] future <- run(future) [01:27:33.277] invisible(future) [01:27:33.277] }), .cleanup = FALSE, .init = FALSE) [01:27:33.277] } [01:27:33.277] } [01:27:33.277] } [01:27:33.277] }) [01:27:33.277] if (TRUE) { [01:27:33.277] base::sink(type = "output", split = FALSE) [01:27:33.277] if (TRUE) { [01:27:33.277] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [01:27:33.277] } [01:27:33.277] else { [01:27:33.277] ...future.result["stdout"] <- base::list(NULL) [01:27:33.277] } [01:27:33.277] base::close(...future.stdout) [01:27:33.277] ...future.stdout <- NULL [01:27:33.277] } [01:27:33.277] ...future.result$conditions <- ...future.conditions [01:27:33.277] ...future.result$finished <- base::Sys.time() [01:27:33.277] ...future.result [01:27:33.277] } [01:27:33.281] plan(): Setting new future strategy stack: [01:27:33.281] List of future strategies: [01:27:33.281] 1. sequential: [01:27:33.281] - args: function (..., envir = parent.frame(), workers = "") [01:27:33.281] - tweaked: FALSE [01:27:33.281] - call: NULL [01:27:33.282] plan(): nbrOfWorkers() = 1 [01:27:33.283] plan(): Setting new future strategy stack: [01:27:33.283] List of future strategies: [01:27:33.283] 1. sequential: [01:27:33.283] - args: function (..., envir = parent.frame(), workers = "") [01:27:33.283] - tweaked: FALSE [01:27:33.283] - call: future::plan("sequential") [01:27:33.284] plan(): nbrOfWorkers() = 1 [01:27:33.284] SequentialFuture started (and completed) [01:27:33.284] - Launch lazy future ... done [01:27:33.284] run() for 'SequentialFuture' ... done [01:27:33.284] - run() ... done [01:27:33.285] - resolved() ... [01:27:33.285] resolved() for 'SequentialFuture' ... [01:27:33.285] - state: 'finished' [01:27:33.285] - run: TRUE [01:27:33.285] - result: 'FutureResult' [01:27:33.285] resolved() for 'SequentialFuture' ... done [01:27:33.286] - resolved: TRUE [01:27:33.286] - resolved() ... done [01:27:33.286] resolved() for 'SequentialFuture' ... done [1] TRUE > y <- value(f) > print(y) [1] 42 > stopifnot(y == 42L) > > > message("*** future() w/ gc = TRUE ...") *** future() w/ gc = TRUE ... > > f <- future(42L, gc = TRUE, lazy = TRUE) [01:27:33.286] getGlobalsAndPackages() ... [01:27:33.287] Searching for globals... [01:27:33.287] [01:27:33.287] Searching for globals ... DONE [01:27:33.287] - globals: [0] [01:27:33.287] getGlobalsAndPackages() ... DONE > print(f) Future: Label: '' Expression: [1] 42 Lazy evaluation: TRUE Asynchronous evaluation: TRUE Local evaluation: TRUE Environment: R_GlobalEnv Capture standard output: TRUE Capture condition classes: 'condition' (excluding 'nothing') Globals: Packages: L'Ecuyer-CMRG RNG seed: (seed = FALSE) Resolved: FALSE Value: Conditions captured: Early signaling: FALSE Owner process: 51d9c486-60e6-ff77-3117-424c5dba3193 Class: 'Future', 'environment' > y <- value(f) [01:27:33.288] run() for 'Future' ... [01:27:33.288] - state: 'created' [01:27:33.289] - Future backend: 'FutureStrategy', 'sequential', 'uniprocess', 'future', 'function' [01:27:33.289] - Future class: 'SequentialFuture', 'UniprocessFuture', 'Future', 'environment' [01:27:33.289] - Copy elements of temporary 'SequentialFuture' to final 'Future' object ... [01:27:33.289] - Field: 'label' [01:27:33.290] - Field: 'local' [01:27:33.290] - Field: 'owner' [01:27:33.290] - Field: 'envir' [01:27:33.290] - Field: 'packages' [01:27:33.290] - Field: 'gc' [01:27:33.290] - Field: 'conditions' [01:27:33.291] - Field: 'expr' [01:27:33.291] - Field: 'uuid' [01:27:33.291] - Field: 'seed' [01:27:33.291] - Field: 'version' [01:27:33.291] - Field: 'result' [01:27:33.291] - Field: 'asynchronous' [01:27:33.292] - Field: 'calls' [01:27:33.292] - Field: 'globals' [01:27:33.292] - Field: 'stdout' [01:27:33.292] - Field: 'earlySignal' [01:27:33.292] - Field: 'lazy' [01:27:33.292] - Field: 'state' [01:27:33.293] - Copy elements of temporary 'SequentialFuture' to final 'Future' object ... done [01:27:33.293] - Launch lazy future ... [01:27:33.293] Packages needed by the future expression (n = 0): [01:27:33.293] Packages needed by future strategies (n = 0): [01:27:33.294] { [01:27:33.294] { [01:27:33.294] { [01:27:33.294] ...future.startTime <- base::Sys.time() [01:27:33.294] { [01:27:33.294] { [01:27:33.294] { [01:27:33.294] base::local({ [01:27:33.294] has_future <- base::requireNamespace("future", [01:27:33.294] quietly = TRUE) [01:27:33.294] if (has_future) { [01:27:33.294] ns <- base::getNamespace("future") [01:27:33.294] version <- ns[[".package"]][["version"]] [01:27:33.294] if (is.null(version)) [01:27:33.294] version <- utils::packageVersion("future") [01:27:33.294] } [01:27:33.294] else { [01:27:33.294] version <- NULL [01:27:33.294] } [01:27:33.294] if (!has_future || version < "1.8.0") { [01:27:33.294] info <- base::c(r_version = base::gsub("R version ", [01:27:33.294] "", base::R.version$version.string), [01:27:33.294] platform = base::sprintf("%s (%s-bit)", [01:27:33.294] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [01:27:33.294] os = base::paste(base::Sys.info()[base::c("sysname", [01:27:33.294] "release", "version")], collapse = " "), [01:27:33.294] hostname = base::Sys.info()[["nodename"]]) [01:27:33.294] info <- base::sprintf("%s: %s", base::names(info), [01:27:33.294] info) [01:27:33.294] info <- base::paste(info, collapse = "; ") [01:27:33.294] if (!has_future) { [01:27:33.294] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [01:27:33.294] info) [01:27:33.294] } [01:27:33.294] else { [01:27:33.294] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [01:27:33.294] info, version) [01:27:33.294] } [01:27:33.294] base::stop(msg) [01:27:33.294] } [01:27:33.294] }) [01:27:33.294] } [01:27:33.294] options(future.plan = NULL) [01:27:33.294] Sys.unsetenv("R_FUTURE_PLAN") [01:27:33.294] future::plan("default", .cleanup = FALSE, .init = FALSE) [01:27:33.294] } [01:27:33.294] ...future.workdir <- getwd() [01:27:33.294] } [01:27:33.294] ...future.oldOptions <- base::as.list(base::.Options) [01:27:33.294] ...future.oldEnvVars <- base::Sys.getenv() [01:27:33.294] } [01:27:33.294] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [01:27:33.294] future.globals.maxSize = NULL, future.globals.method = NULL, [01:27:33.294] future.globals.onMissing = NULL, future.globals.onReference = NULL, [01:27:33.294] future.globals.resolve = NULL, future.resolve.recursive = NULL, [01:27:33.294] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [01:27:33.294] future.stdout.windows.reencode = NULL, width = 80L) [01:27:33.294] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [01:27:33.294] base::names(...future.oldOptions)) [01:27:33.294] } [01:27:33.294] if (FALSE) { [01:27:33.294] } [01:27:33.294] else { [01:27:33.294] if (TRUE) { [01:27:33.294] ...future.stdout <- base::rawConnection(base::raw(0L), [01:27:33.294] open = "w") [01:27:33.294] } [01:27:33.294] else { [01:27:33.294] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [01:27:33.294] windows = "NUL", "/dev/null"), open = "w") [01:27:33.294] } [01:27:33.294] base::sink(...future.stdout, type = "output", split = FALSE) [01:27:33.294] base::on.exit(if (!base::is.null(...future.stdout)) { [01:27:33.294] base::sink(type = "output", split = FALSE) [01:27:33.294] base::close(...future.stdout) [01:27:33.294] }, add = TRUE) [01:27:33.294] } [01:27:33.294] ...future.frame <- base::sys.nframe() [01:27:33.294] ...future.conditions <- base::list() [01:27:33.294] ...future.rng <- base::globalenv()$.Random.seed [01:27:33.294] if (FALSE) { [01:27:33.294] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [01:27:33.294] "...future.value", "...future.globalenv.names", ".Random.seed") [01:27:33.294] } [01:27:33.294] ...future.result <- base::tryCatch({ [01:27:33.294] base::withCallingHandlers({ [01:27:33.294] ...future.value <- base::withVisible(base::local(42L)) [01:27:33.294] future::FutureResult(value = ...future.value$value, [01:27:33.294] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [01:27:33.294] ...future.rng), globalenv = if (FALSE) [01:27:33.294] list(added = base::setdiff(base::names(base::.GlobalEnv), [01:27:33.294] ...future.globalenv.names)) [01:27:33.294] else NULL, started = ...future.startTime, version = "1.8") [01:27:33.294] }, condition = base::local({ [01:27:33.294] c <- base::c [01:27:33.294] inherits <- base::inherits [01:27:33.294] invokeRestart <- base::invokeRestart [01:27:33.294] length <- base::length [01:27:33.294] list <- base::list [01:27:33.294] seq.int <- base::seq.int [01:27:33.294] signalCondition <- base::signalCondition [01:27:33.294] sys.calls <- base::sys.calls [01:27:33.294] `[[` <- base::`[[` [01:27:33.294] `+` <- base::`+` [01:27:33.294] `<<-` <- base::`<<-` [01:27:33.294] sysCalls <- function(calls = sys.calls(), from = 1L) { [01:27:33.294] calls[seq.int(from = from + 12L, to = length(calls) - [01:27:33.294] 3L)] [01:27:33.294] } [01:27:33.294] function(cond) { [01:27:33.294] is_error <- inherits(cond, "error") [01:27:33.294] ignore <- !is_error && !is.null(NULL) && inherits(cond, [01:27:33.294] NULL) [01:27:33.294] if (is_error) { [01:27:33.294] sessionInformation <- function() { [01:27:33.294] list(r = base::R.Version(), locale = base::Sys.getlocale(), [01:27:33.294] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [01:27:33.294] search = base::search(), system = base::Sys.info()) [01:27:33.294] } [01:27:33.294] ...future.conditions[[length(...future.conditions) + [01:27:33.294] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [01:27:33.294] cond$call), session = sessionInformation(), [01:27:33.294] timestamp = base::Sys.time(), signaled = 0L) [01:27:33.294] signalCondition(cond) [01:27:33.294] } [01:27:33.294] else if (!ignore && TRUE && inherits(cond, c("condition", [01:27:33.294] "immediateCondition"))) { [01:27:33.294] signal <- TRUE && inherits(cond, "immediateCondition") [01:27:33.294] ...future.conditions[[length(...future.conditions) + [01:27:33.294] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [01:27:33.294] if (TRUE && !signal) { [01:27:33.294] muffleCondition <- function (cond, pattern = "^muffle") [01:27:33.294] { [01:27:33.294] inherits <- base::inherits [01:27:33.294] invokeRestart <- base::invokeRestart [01:27:33.294] is.null <- base::is.null [01:27:33.294] muffled <- FALSE [01:27:33.294] if (inherits(cond, "message")) { [01:27:33.294] muffled <- grepl(pattern, "muffleMessage") [01:27:33.294] if (muffled) [01:27:33.294] invokeRestart("muffleMessage") [01:27:33.294] } [01:27:33.294] else if (inherits(cond, "warning")) { [01:27:33.294] muffled <- grepl(pattern, "muffleWarning") [01:27:33.294] if (muffled) [01:27:33.294] invokeRestart("muffleWarning") [01:27:33.294] } [01:27:33.294] else if (inherits(cond, "condition")) { [01:27:33.294] if (!is.null(pattern)) { [01:27:33.294] computeRestarts <- base::computeRestarts [01:27:33.294] grepl <- base::grepl [01:27:33.294] restarts <- computeRestarts(cond) [01:27:33.294] for (restart in restarts) { [01:27:33.294] name <- restart$name [01:27:33.294] if (is.null(name)) [01:27:33.294] next [01:27:33.294] if (!grepl(pattern, name)) [01:27:33.294] next [01:27:33.294] invokeRestart(restart) [01:27:33.294] muffled <- TRUE [01:27:33.294] break [01:27:33.294] } [01:27:33.294] } [01:27:33.294] } [01:27:33.294] invisible(muffled) [01:27:33.294] } [01:27:33.294] muffleCondition(cond, pattern = "^muffle") [01:27:33.294] } [01:27:33.294] } [01:27:33.294] else { [01:27:33.294] if (TRUE) { [01:27:33.294] muffleCondition <- function (cond, pattern = "^muffle") [01:27:33.294] { [01:27:33.294] inherits <- base::inherits [01:27:33.294] invokeRestart <- base::invokeRestart [01:27:33.294] is.null <- base::is.null [01:27:33.294] muffled <- FALSE [01:27:33.294] if (inherits(cond, "message")) { [01:27:33.294] muffled <- grepl(pattern, "muffleMessage") [01:27:33.294] if (muffled) [01:27:33.294] invokeRestart("muffleMessage") [01:27:33.294] } [01:27:33.294] else if (inherits(cond, "warning")) { [01:27:33.294] muffled <- grepl(pattern, "muffleWarning") [01:27:33.294] if (muffled) [01:27:33.294] invokeRestart("muffleWarning") [01:27:33.294] } [01:27:33.294] else if (inherits(cond, "condition")) { [01:27:33.294] if (!is.null(pattern)) { [01:27:33.294] computeRestarts <- base::computeRestarts [01:27:33.294] grepl <- base::grepl [01:27:33.294] restarts <- computeRestarts(cond) [01:27:33.294] for (restart in restarts) { [01:27:33.294] name <- restart$name [01:27:33.294] if (is.null(name)) [01:27:33.294] next [01:27:33.294] if (!grepl(pattern, name)) [01:27:33.294] next [01:27:33.294] invokeRestart(restart) [01:27:33.294] muffled <- TRUE [01:27:33.294] break [01:27:33.294] } [01:27:33.294] } [01:27:33.294] } [01:27:33.294] invisible(muffled) [01:27:33.294] } [01:27:33.294] muffleCondition(cond, pattern = "^muffle") [01:27:33.294] } [01:27:33.294] } [01:27:33.294] } [01:27:33.294] })) [01:27:33.294] }, error = function(ex) { [01:27:33.294] base::structure(base::list(value = NULL, visible = NULL, [01:27:33.294] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [01:27:33.294] ...future.rng), started = ...future.startTime, [01:27:33.294] finished = Sys.time(), session_uuid = NA_character_, [01:27:33.294] version = "1.8"), class = "FutureResult") [01:27:33.294] }, finally = { [01:27:33.294] if (!identical(...future.workdir, getwd())) [01:27:33.294] setwd(...future.workdir) [01:27:33.294] { [01:27:33.294] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [01:27:33.294] ...future.oldOptions$nwarnings <- NULL [01:27:33.294] } [01:27:33.294] base::options(...future.oldOptions) [01:27:33.294] if (.Platform$OS.type == "windows") { [01:27:33.294] old_names <- names(...future.oldEnvVars) [01:27:33.294] envs <- base::Sys.getenv() [01:27:33.294] names <- names(envs) [01:27:33.294] common <- intersect(names, old_names) [01:27:33.294] added <- setdiff(names, old_names) [01:27:33.294] removed <- setdiff(old_names, names) [01:27:33.294] changed <- common[...future.oldEnvVars[common] != [01:27:33.294] envs[common]] [01:27:33.294] NAMES <- toupper(changed) [01:27:33.294] args <- list() [01:27:33.294] for (kk in seq_along(NAMES)) { [01:27:33.294] name <- changed[[kk]] [01:27:33.294] NAME <- NAMES[[kk]] [01:27:33.294] if (name != NAME && is.element(NAME, old_names)) [01:27:33.294] next [01:27:33.294] args[[name]] <- ...future.oldEnvVars[[name]] [01:27:33.294] } [01:27:33.294] NAMES <- toupper(added) [01:27:33.294] for (kk in seq_along(NAMES)) { [01:27:33.294] name <- added[[kk]] [01:27:33.294] NAME <- NAMES[[kk]] [01:27:33.294] if (name != NAME && is.element(NAME, old_names)) [01:27:33.294] next [01:27:33.294] args[[name]] <- "" [01:27:33.294] } [01:27:33.294] NAMES <- toupper(removed) [01:27:33.294] for (kk in seq_along(NAMES)) { [01:27:33.294] name <- removed[[kk]] [01:27:33.294] NAME <- NAMES[[kk]] [01:27:33.294] if (name != NAME && is.element(NAME, old_names)) [01:27:33.294] next [01:27:33.294] args[[name]] <- ...future.oldEnvVars[[name]] [01:27:33.294] } [01:27:33.294] if (length(args) > 0) [01:27:33.294] base::do.call(base::Sys.setenv, args = args) [01:27:33.294] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [01:27:33.294] } [01:27:33.294] else { [01:27:33.294] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [01:27:33.294] } [01:27:33.294] { [01:27:33.294] if (base::length(...future.futureOptionsAdded) > [01:27:33.294] 0L) { [01:27:33.294] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [01:27:33.294] base::names(opts) <- ...future.futureOptionsAdded [01:27:33.294] base::options(opts) [01:27:33.294] } [01:27:33.294] { [01:27:33.294] { [01:27:33.294] NULL [01:27:33.294] RNGkind("Mersenne-Twister") [01:27:33.294] base::rm(list = ".Random.seed", envir = base::globalenv(), [01:27:33.294] inherits = FALSE) [01:27:33.294] } [01:27:33.294] options(future.plan = NULL) [01:27:33.294] if (is.na(NA_character_)) [01:27:33.294] Sys.unsetenv("R_FUTURE_PLAN") [01:27:33.294] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [01:27:33.294] future::plan(list(function (..., envir = parent.frame()) [01:27:33.294] { [01:27:33.294] future <- SequentialFuture(..., envir = envir) [01:27:33.294] if (!future$lazy) [01:27:33.294] future <- run(future) [01:27:33.294] invisible(future) [01:27:33.294] }), .cleanup = FALSE, .init = FALSE) [01:27:33.294] } [01:27:33.294] } [01:27:33.294] } [01:27:33.294] }) [01:27:33.294] if (TRUE) { [01:27:33.294] base::sink(type = "output", split = FALSE) [01:27:33.294] if (TRUE) { [01:27:33.294] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [01:27:33.294] } [01:27:33.294] else { [01:27:33.294] ...future.result["stdout"] <- base::list(NULL) [01:27:33.294] } [01:27:33.294] base::close(...future.stdout) [01:27:33.294] ...future.stdout <- NULL [01:27:33.294] } [01:27:33.294] ...future.result$conditions <- ...future.conditions [01:27:33.294] ...future.result$finished <- base::Sys.time() [01:27:33.294] ...future.result [01:27:33.294] } [01:27:33.298] plan(): Setting new future strategy stack: [01:27:33.298] List of future strategies: [01:27:33.298] 1. sequential: [01:27:33.298] - args: function (..., envir = parent.frame(), workers = "") [01:27:33.298] - tweaked: FALSE [01:27:33.298] - call: NULL [01:27:33.299] plan(): nbrOfWorkers() = 1 [01:27:33.300] plan(): Setting new future strategy stack: [01:27:33.300] List of future strategies: [01:27:33.300] 1. sequential: [01:27:33.300] - args: function (..., envir = parent.frame(), workers = "") [01:27:33.300] - tweaked: FALSE [01:27:33.300] - call: future::plan("sequential") [01:27:33.301] plan(): nbrOfWorkers() = 1 [01:27:33.301] SequentialFuture started (and completed) [01:27:33.301] - Launch lazy future ... done [01:27:33.301] run() for 'SequentialFuture' ... done > print(y) [1] 42 > stopifnot(y == 42L) > > message("*** future() w/ gc = TRUE ... DONE") *** future() w/ gc = TRUE ... DONE > > > message("*** future() - exceptions ...") *** future() - exceptions ... > > target <- list(name = "", envir = new.env(), code = "Yo!", exists = TRUE) > res <- tryCatch(get_future(target, mustExist = TRUE), error = identity) [01:27:33.302] ERROR: Future ('') not found in environment '': 'Yo!' > stopifnot(inherits(res, "error")) > > message("*** future() - exceptions ... DONE") *** future() - exceptions ... DONE > > message("*** future() ... DONE") *** future() ... DONE > > source("incl/end.R") [01:27:33.303] plan(): Setting new future strategy stack: [01:27:33.303] List of future strategies: [01:27:33.303] 1. FutureStrategy: [01:27:33.303] - args: function (..., envir = parent.frame(), workers = "") [01:27:33.303] - tweaked: FALSE [01:27:33.303] - call: future::plan(oplan) [01:27:33.317] plan(): nbrOfWorkers() = 1 Failed to undo environment variables: - Expected environment variables: [n=204] '!ExitCode', 'ALLUSERSPROFILE', 'APPDATA', 'BIBINPUTS', 'BINDIR', 'BSTINPUTS', 'COMMONPROGRAMFILES', 'COMPUTERNAME', 'COMSPEC', 'CURL_CA_BUNDLE', 'CYGWIN', 'CommonProgramFiles(x86)', 'CommonProgramW6432', 'DriverData', 'HOME', 'HOMEDRIVE', 'HOMEPATH', 'JAGS_ROOT', 'JAVA_HOME', 'LANGUAGE', 'LC_COLLATE', 'LC_MONETARY', 'LC_TIME', 'LOCALAPPDATA', 'LOGONSERVER', 'LS_HOME', 'LS_LICENSE_PATH', 'MAKE', 'MAKEFLAGS', 'MAKELEVEL', 'MFLAGS', 'MSMPI_BENCHMARKS', 'MSMPI_BIN', 'MSYS2_ENV_CONV_EXCL', 'NUMBER_OF_PROCESSORS', 'OCL', 'OMP_THREAD_LIMIT', 'OS', 'PATH', 'PATHEXT', 'PROCESSOR_ARCHITECTURE', 'PROCESSOR_IDENTIFIER', 'PROCESSOR_LEVEL', 'PROCESSOR_REVISION', 'PROGRAMFILES', 'PROMPT', 'PSModulePath', 'PUBLIC', 'PWD', 'ProgramData', 'ProgramFiles(x86)', 'ProgramW6432', 'RTOOLS43_HOME', 'R_ARCH', 'R_BROWSER', 'R_BZIPCMD', 'R_CMD', 'R_COMPILED_BY', 'R_CRAN_WEB', 'R_CUSTOM_TOOLS_PATH', 'R_CUSTOM_TOOLS_SOFT', 'R_DOC_DIR', 'R_ENVIRON_USER', 'R_GSCMD', 'R_GZIPCMD', 'R_HOME', 'R_INCLUDE_DIR', 'R_INSTALL_TAR', 'R_LIBS', 'R_LIBS_SITE', 'R_LIBS_USER', 'R_MAX_NUM_DLLS', 'R_OSTYPE', 'R_PAPERSIZE', 'R_PAPERSIZE_USER', 'R_PARALLELLY_MAKENODEPSOCK_AUTOKILL', 'R_PARALLELLY_MAKENODEPSOCK_CONNECTTIMEOUT', 'R_PARALLELLY_MAKENODEPSOCK_RSCRIPT_LABEL', 'R_PARALLELLY_MAKENODEPSOCK_SESSIONINFO_PKGS', 'R_PARALLELLY_MAKENODEPSOCK_TIMEOUT', 'R_PARALLELLY_RANDOM_PORTS', 'R_PARALLEL_PORT', 'R_RD4PDF', 'R_RTOOLS43_PATH', 'R_SCRIPT_LEGACY', 'R_SHARE_DIR', 'R_TESTS', 'R_UNZIPCMD', 'R_USER', 'R_VERSION', 'R_ZIPCMD', 'SED', 'SHLVL', 'SYSTEMDRIVE', 'SYSTEMROOT', 'TAR', 'TAR_OPTIONS', 'TEMP', 'TERM', 'TEXINPUTS', 'TMP', 'TMPDIR', 'USERDOMAIN', 'USERDOMAIN_ROAMINGPROFILE', 'USERNAME', 'USERPROFILE', 'WINDIR', '_', '_R_CHECK_AUTOCONF_', '_R_CHECK_BOGUS_RETURN_', '_R_CHECK_BROWSER_NONINTERACTIVE_', '_R_CHECK_BUILD_VIGNETTES_SEPARATELY_', '_R_CHECK_CODETOOLS_PROFILE_', '_R_CHECK_CODE_ASSIGN_TO_GLOBALENV_', '_R_CHECK_CODE_ATTACH_', '_R_CHECK_CODE_CLASS_IS_STRING_', '_R_CHECK_CODE_DATA_INTO_GLOBALENV_', '_R_CHECK_CODE_USAGE_VIA_NAMESPACES_', '_R_CHECK_CODE_USAGE_WITHOUT_LOADING_', '_R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_', '_R_CHECK_CODOC_VARIABLES_IN_USAGES_', '_R_CHECK_COMPACT_DATA2_', '_R_CHECK_COMPILATION_FLAGS_', '_R_CHECK_CONNECTIONS_LEFT_OPEN_', '_R_CHECK_CRAN_INCOMING_', '_R_CHECK_CRAN_INCOMING_CHECK_FILE_URIS_', '_R_CHECK_CRAN_INCOMING_CHECK_URLS_IN_PARALLEL_', '_R_CHECK_CRAN_INCOMING_NOTE_GNU_MAKE_', '_R_CHECK_CRAN_INCOMING_REMOTE_', '_R_CHECK_CRAN_INCOMING_USE_ASPELL_', '_R_CHECK_DATALIST_', '_R_CHECK_DEPRECATED_DEFUNCT_', '_R_CHECK_DOC_SIZES2_', '_R_CHECK_DOT_FIRSTLIB_', '_R_CHECK_DOT_INTERNAL_', '_R_CHECK_EXAMPLE_TIMING_THRESHOLD_', '_R_CHECK_EXECUTABLES_', '_R_CHECK_EXECUTABLES_EXCLUSIONS_', '_R_CHECK_FF_CALLS_', '_R_CHECK_FF_DUP_', '_R_CHECK_FORCE_SUGGESTS_', '_R_CHECK_FUTURE_FILE_TIMESTAMPS_', '_R_CHECK_FUTURE_FILE_TIMESTAMPS_LEEWAY_', '_R_CHECK_HAVE_MYSQL_', '_R_CHECK_HAVE_ODBC_', '_R_CHECK_HAVE_PERL_', '_R_CHECK_HAVE_POSTGRES_', '_R_CHECK_INSTALL_DEPENDS_', '_R_CHECK_INTERNALS2_', '_R_CHECK_LENGTH_1_CONDITION_', '_R_CHECK_LICENSE_', '_R_CHECK_LIMIT_CORES_', '_R_CHECK_MATRIX_DATA_', '_R_CHECK_MBCS_CONVERSION_FAILURE_', '_R_CHECK_NATIVE_ROUTINE_REGISTRATION_', '_R_CHECK_NEWS_IN_PLAIN_TEXT_', '_R_CHECK_NO_RECOMMENDED_', '_R_CHECK_NO_STOP_ON_TEST_ERROR_', '_R_CHECK_ORPHANED_', '_R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_', '_R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_', '_R_CHECK_PACKAGES_USED_IN_TESTS_USE_SUBDIRS_', '_R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_', '_R_CHECK_PACKAGE_NAME_', '_R_CHECK_PKG_SIZES_', '_R_CHECK_PKG_SIZES_THRESHOLD_', '_R_CHECK_PRAGMAS_', '_R_CHECK_RD_EXAMPLES_T_AND_F_', '_R_CHECK_RD_LINE_WIDTHS_', '_R_CHECK_RD_MATH_RENDERING_', '_R_CHECK_RD_NOTE_LOST_BRACES_', '_R_CHECK_RD_VALIDATE_RD2HTML_', '_R_CHECK_REPLACING_IMPORTS_', '_R_CHECK_R_DEPENDS_', '_R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_', '_R_CHECK_SCREEN_DEVICE_', '_R_CHECK_SERIALIZATION_', '_R_CHECK_SHLIB_OPENMP_FLAGS_', '_R_CHECK_SRC_MINUS_W_IMPLICIT_', '_R_CHECK_SUBDIRS_NOCASE_', '_R_CHECK_SUBDIRS_STRICT_', '_R_CHECK_SUGGESTS_ONLY_', '_R_CHECK_SYSTEM_CLOCK_', '_R_CHECK_TESTS_NLINES_', '_R_CHECK_TEST_TIMING_', '_R_CHECK_TIMINGS_', '_R_CHECK_TOPLEVEL_FILES_', '_R_CHECK_UNDOC_USE_ALL_NAMES_', '_R_CHECK_UNSAFE_CALLS_', '_R_CHECK_URLS_SHOW_301_STATUS_', '_R_CHECK_VC_DIRS_', '_R_CHECK_VIGNETTES_NLINES_', '_R_CHECK_VIGNETTES_SKIP_RUN_MAYBE_', '_R_CHECK_VIGNETTE_TIMING_', '_R_CHECK_VIGNETTE_TITLES_', '_R_CHECK_WINDOWS_DEVICE_', '_R_CHECK_XREFS_USE_ALIASES_FROM_CRAN_', '_R_CLASS_MATRIX_ARRAY_', '_R_INSTALL_TIME_PATCHES_', '_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_', '_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_', '__R_CHECK_DOC_FILES_NOTE_IF_ALL_SPECIAL__', 'maj.version', 'nextArg--timingsnextArg--install' - Environment variables still there: [n=0] - Environment variables missing: [n=1] 'MAKEFLAGS' Differences environment variable by environment variable: List of 3 $ name : chr "MAKEFLAGS" $ expected: 'Dlist' chr "" $ actual : 'Dlist' chr NA > > proc.time() user system elapsed 0.35 0.04 0.40