R Under development (unstable) (2024-07-02 r86866 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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: future [13:31:12.044] plan(): Setting new future strategy stack: [13:31:12.045] List of future strategies: [13:31:12.045] 1. mirai_multisession: [13:31:12.045] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:12.045] - tweaked: FALSE [13:31:12.045] - call: future::plan(future.mirai::mirai_multisession) [13:31:12.057] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:12.057] < mirai [$data] > [13:31:12.062] getGlobalsAndPackages() ... [13:31:12.062] Not searching for globals [13:31:12.063] - globals: [0] [13:31:12.063] getGlobalsAndPackages() ... DONE [13:31:12.063] getGlobalsAndPackages() ... [13:31:12.064] [13:31:12.064] - globals: [0] [13:31:12.064] getGlobalsAndPackages() ... DONE [13:31:12.308] Packages needed by the future expression (n = 0): [13:31:12.309] Packages needed by future strategies (n = 0): [13:31:12.310] { [13:31:12.310] { [13:31:12.310] { [13:31:12.310] ...future.startTime <- base::Sys.time() [13:31:12.310] { [13:31:12.310] { [13:31:12.310] { [13:31:12.310] base::local({ [13:31:12.310] has_future <- base::requireNamespace("future", [13:31:12.310] quietly = TRUE) [13:31:12.310] if (has_future) { [13:31:12.310] ns <- base::getNamespace("future") [13:31:12.310] version <- ns[[".package"]][["version"]] [13:31:12.310] if (is.null(version)) [13:31:12.310] version <- utils::packageVersion("future") [13:31:12.310] } [13:31:12.310] else { [13:31:12.310] version <- NULL [13:31:12.310] } [13:31:12.310] if (!has_future || version < "1.8.0") { [13:31:12.310] info <- base::c(r_version = base::gsub("R version ", [13:31:12.310] "", base::R.version$version.string), [13:31:12.310] platform = base::sprintf("%s (%s-bit)", [13:31:12.310] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:12.310] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:12.310] "release", "version")], collapse = " "), [13:31:12.310] hostname = base::Sys.info()[["nodename"]]) [13:31:12.310] info <- base::sprintf("%s: %s", base::names(info), [13:31:12.310] info) [13:31:12.310] info <- base::paste(info, collapse = "; ") [13:31:12.310] if (!has_future) { [13:31:12.310] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:12.310] info) [13:31:12.310] } [13:31:12.310] else { [13:31:12.310] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:12.310] info, version) [13:31:12.310] } [13:31:12.310] base::stop(msg) [13:31:12.310] } [13:31:12.310] }) [13:31:12.310] } [13:31:12.310] ...future.strategy.old <- future::plan("list") [13:31:12.310] options(future.plan = NULL) [13:31:12.310] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.310] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:12.310] } [13:31:12.310] ...future.workdir <- getwd() [13:31:12.310] } [13:31:12.310] ...future.oldOptions <- base::as.list(base::.Options) [13:31:12.310] ...future.oldEnvVars <- base::Sys.getenv() [13:31:12.310] } [13:31:12.310] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:12.310] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:12.310] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:12.310] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:12.310] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:12.310] future.stdout.windows.reencode = NULL, width = 80L) [13:31:12.310] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:12.310] base::names(...future.oldOptions)) [13:31:12.310] } [13:31:12.310] if (FALSE) { [13:31:12.310] } [13:31:12.310] else { [13:31:12.310] if (TRUE) { [13:31:12.310] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:12.310] open = "w") [13:31:12.310] } [13:31:12.310] else { [13:31:12.310] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:12.310] windows = "NUL", "/dev/null"), open = "w") [13:31:12.310] } [13:31:12.310] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:12.310] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:12.310] base::sink(type = "output", split = FALSE) [13:31:12.310] base::close(...future.stdout) [13:31:12.310] }, add = TRUE) [13:31:12.310] } [13:31:12.310] ...future.frame <- base::sys.nframe() [13:31:12.310] ...future.conditions <- base::list() [13:31:12.310] ...future.rng <- base::globalenv()$.Random.seed [13:31:12.310] if (FALSE) { [13:31:12.310] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:12.310] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:12.310] } [13:31:12.310] ...future.result <- base::tryCatch({ [13:31:12.310] base::withCallingHandlers({ [13:31:12.310] ...future.value <- base::withVisible(base::local(NA)) [13:31:12.310] future::FutureResult(value = ...future.value$value, [13:31:12.310] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.310] ...future.rng), globalenv = if (FALSE) [13:31:12.310] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:12.310] ...future.globalenv.names)) [13:31:12.310] else NULL, started = ...future.startTime, version = "1.8") [13:31:12.310] }, condition = base::local({ [13:31:12.310] c <- base::c [13:31:12.310] inherits <- base::inherits [13:31:12.310] invokeRestart <- base::invokeRestart [13:31:12.310] length <- base::length [13:31:12.310] list <- base::list [13:31:12.310] seq.int <- base::seq.int [13:31:12.310] signalCondition <- base::signalCondition [13:31:12.310] sys.calls <- base::sys.calls [13:31:12.310] `[[` <- base::`[[` [13:31:12.310] `+` <- base::`+` [13:31:12.310] `<<-` <- base::`<<-` [13:31:12.310] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:12.310] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:12.310] 3L)] [13:31:12.310] } [13:31:12.310] function(cond) { [13:31:12.310] is_error <- inherits(cond, "error") [13:31:12.310] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:12.310] NULL) [13:31:12.310] if (is_error) { [13:31:12.310] sessionInformation <- function() { [13:31:12.310] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:12.310] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:12.310] search = base::search(), system = base::Sys.info()) [13:31:12.310] } [13:31:12.310] ...future.conditions[[length(...future.conditions) + [13:31:12.310] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:12.310] cond$call), session = sessionInformation(), [13:31:12.310] timestamp = base::Sys.time(), signaled = 0L) [13:31:12.310] signalCondition(cond) [13:31:12.310] } [13:31:12.310] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:12.310] signal <- FALSE && inherits(cond, character(0)) [13:31:12.310] ...future.conditions[[length(...future.conditions) + [13:31:12.310] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:12.310] if (FALSE && !signal) { [13:31:12.310] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.310] { [13:31:12.310] inherits <- base::inherits [13:31:12.310] invokeRestart <- base::invokeRestart [13:31:12.310] is.null <- base::is.null [13:31:12.310] muffled <- FALSE [13:31:12.310] if (inherits(cond, "message")) { [13:31:12.310] muffled <- grepl(pattern, "muffleMessage") [13:31:12.310] if (muffled) [13:31:12.310] invokeRestart("muffleMessage") [13:31:12.310] } [13:31:12.310] else if (inherits(cond, "warning")) { [13:31:12.310] muffled <- grepl(pattern, "muffleWarning") [13:31:12.310] if (muffled) [13:31:12.310] invokeRestart("muffleWarning") [13:31:12.310] } [13:31:12.310] else if (inherits(cond, "condition")) { [13:31:12.310] if (!is.null(pattern)) { [13:31:12.310] computeRestarts <- base::computeRestarts [13:31:12.310] grepl <- base::grepl [13:31:12.310] restarts <- computeRestarts(cond) [13:31:12.310] for (restart in restarts) { [13:31:12.310] name <- restart$name [13:31:12.310] if (is.null(name)) [13:31:12.310] next [13:31:12.310] if (!grepl(pattern, name)) [13:31:12.310] next [13:31:12.310] invokeRestart(restart) [13:31:12.310] muffled <- TRUE [13:31:12.310] break [13:31:12.310] } [13:31:12.310] } [13:31:12.310] } [13:31:12.310] invisible(muffled) [13:31:12.310] } [13:31:12.310] muffleCondition(cond, pattern = "^muffle") [13:31:12.310] } [13:31:12.310] } [13:31:12.310] else { [13:31:12.310] if (TRUE) { [13:31:12.310] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.310] { [13:31:12.310] inherits <- base::inherits [13:31:12.310] invokeRestart <- base::invokeRestart [13:31:12.310] is.null <- base::is.null [13:31:12.310] muffled <- FALSE [13:31:12.310] if (inherits(cond, "message")) { [13:31:12.310] muffled <- grepl(pattern, "muffleMessage") [13:31:12.310] if (muffled) [13:31:12.310] invokeRestart("muffleMessage") [13:31:12.310] } [13:31:12.310] else if (inherits(cond, "warning")) { [13:31:12.310] muffled <- grepl(pattern, "muffleWarning") [13:31:12.310] if (muffled) [13:31:12.310] invokeRestart("muffleWarning") [13:31:12.310] } [13:31:12.310] else if (inherits(cond, "condition")) { [13:31:12.310] if (!is.null(pattern)) { [13:31:12.310] computeRestarts <- base::computeRestarts [13:31:12.310] grepl <- base::grepl [13:31:12.310] restarts <- computeRestarts(cond) [13:31:12.310] for (restart in restarts) { [13:31:12.310] name <- restart$name [13:31:12.310] if (is.null(name)) [13:31:12.310] next [13:31:12.310] if (!grepl(pattern, name)) [13:31:12.310] next [13:31:12.310] invokeRestart(restart) [13:31:12.310] muffled <- TRUE [13:31:12.310] break [13:31:12.310] } [13:31:12.310] } [13:31:12.310] } [13:31:12.310] invisible(muffled) [13:31:12.310] } [13:31:12.310] muffleCondition(cond, pattern = "^muffle") [13:31:12.310] } [13:31:12.310] } [13:31:12.310] } [13:31:12.310] })) [13:31:12.310] }, error = function(ex) { [13:31:12.310] base::structure(base::list(value = NULL, visible = NULL, [13:31:12.310] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.310] ...future.rng), started = ...future.startTime, [13:31:12.310] finished = Sys.time(), session_uuid = NA_character_, [13:31:12.310] version = "1.8"), class = "FutureResult") [13:31:12.310] }, finally = { [13:31:12.310] if (!identical(...future.workdir, getwd())) [13:31:12.310] setwd(...future.workdir) [13:31:12.310] { [13:31:12.310] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:12.310] ...future.oldOptions$nwarnings <- NULL [13:31:12.310] } [13:31:12.310] base::options(...future.oldOptions) [13:31:12.310] if (.Platform$OS.type == "windows") { [13:31:12.310] old_names <- names(...future.oldEnvVars) [13:31:12.310] envs <- base::Sys.getenv() [13:31:12.310] names <- names(envs) [13:31:12.310] common <- intersect(names, old_names) [13:31:12.310] added <- setdiff(names, old_names) [13:31:12.310] removed <- setdiff(old_names, names) [13:31:12.310] changed <- common[...future.oldEnvVars[common] != [13:31:12.310] envs[common]] [13:31:12.310] NAMES <- toupper(changed) [13:31:12.310] args <- list() [13:31:12.310] for (kk in seq_along(NAMES)) { [13:31:12.310] name <- changed[[kk]] [13:31:12.310] NAME <- NAMES[[kk]] [13:31:12.310] if (name != NAME && is.element(NAME, old_names)) [13:31:12.310] next [13:31:12.310] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.310] } [13:31:12.310] NAMES <- toupper(added) [13:31:12.310] for (kk in seq_along(NAMES)) { [13:31:12.310] name <- added[[kk]] [13:31:12.310] NAME <- NAMES[[kk]] [13:31:12.310] if (name != NAME && is.element(NAME, old_names)) [13:31:12.310] next [13:31:12.310] args[[name]] <- "" [13:31:12.310] } [13:31:12.310] NAMES <- toupper(removed) [13:31:12.310] for (kk in seq_along(NAMES)) { [13:31:12.310] name <- removed[[kk]] [13:31:12.310] NAME <- NAMES[[kk]] [13:31:12.310] if (name != NAME && is.element(NAME, old_names)) [13:31:12.310] next [13:31:12.310] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.310] } [13:31:12.310] if (length(args) > 0) [13:31:12.310] base::do.call(base::Sys.setenv, args = args) [13:31:12.310] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:12.310] } [13:31:12.310] else { [13:31:12.310] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:12.310] } [13:31:12.310] { [13:31:12.310] if (base::length(...future.futureOptionsAdded) > [13:31:12.310] 0L) { [13:31:12.310] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:12.310] base::names(opts) <- ...future.futureOptionsAdded [13:31:12.310] base::options(opts) [13:31:12.310] } [13:31:12.310] { [13:31:12.310] NULL [13:31:12.310] options(future.plan = NULL) [13:31:12.310] if (is.na(NA_character_)) [13:31:12.310] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.310] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:12.310] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:12.310] .init = FALSE) [13:31:12.310] } [13:31:12.310] } [13:31:12.310] } [13:31:12.310] }) [13:31:12.310] if (TRUE) { [13:31:12.310] base::sink(type = "output", split = FALSE) [13:31:12.310] if (TRUE) { [13:31:12.310] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:12.310] } [13:31:12.310] else { [13:31:12.310] ...future.result["stdout"] <- base::list(NULL) [13:31:12.310] } [13:31:12.310] base::close(...future.stdout) [13:31:12.310] ...future.stdout <- NULL [13:31:12.310] } [13:31:12.310] ...future.result$conditions <- ...future.conditions [13:31:12.310] ...future.result$finished <- base::Sys.time() [13:31:12.310] ...future.result [13:31:12.310] } [13:31:12.427] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:12.428] plan(): nbrOfWorkers() = 2 > > plan(mirai_multisession) [13:31:12.428] plan(): Setting new future strategy stack: [13:31:12.429] List of future strategies: [13:31:12.429] 1. mirai_multisession: [13:31:12.429] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:12.429] - tweaked: FALSE [13:31:12.429] - call: plan(mirai_multisession) [13:31:12.442] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:12.442] < mirai [$data] > [13:31:12.444] getGlobalsAndPackages() ... [13:31:12.444] Not searching for globals [13:31:12.445] - globals: [0] [13:31:12.445] getGlobalsAndPackages() ... DONE [13:31:12.445] getGlobalsAndPackages() ... [13:31:12.445] [13:31:12.445] - globals: [0] [13:31:12.445] getGlobalsAndPackages() ... DONE [13:31:12.446] Packages needed by the future expression (n = 0): [13:31:12.446] Packages needed by future strategies (n = 0): [13:31:12.446] { [13:31:12.446] { [13:31:12.446] { [13:31:12.446] ...future.startTime <- base::Sys.time() [13:31:12.446] { [13:31:12.446] { [13:31:12.446] { [13:31:12.446] base::local({ [13:31:12.446] has_future <- base::requireNamespace("future", [13:31:12.446] quietly = TRUE) [13:31:12.446] if (has_future) { [13:31:12.446] ns <- base::getNamespace("future") [13:31:12.446] version <- ns[[".package"]][["version"]] [13:31:12.446] if (is.null(version)) [13:31:12.446] version <- utils::packageVersion("future") [13:31:12.446] } [13:31:12.446] else { [13:31:12.446] version <- NULL [13:31:12.446] } [13:31:12.446] if (!has_future || version < "1.8.0") { [13:31:12.446] info <- base::c(r_version = base::gsub("R version ", [13:31:12.446] "", base::R.version$version.string), [13:31:12.446] platform = base::sprintf("%s (%s-bit)", [13:31:12.446] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:12.446] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:12.446] "release", "version")], collapse = " "), [13:31:12.446] hostname = base::Sys.info()[["nodename"]]) [13:31:12.446] info <- base::sprintf("%s: %s", base::names(info), [13:31:12.446] info) [13:31:12.446] info <- base::paste(info, collapse = "; ") [13:31:12.446] if (!has_future) { [13:31:12.446] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:12.446] info) [13:31:12.446] } [13:31:12.446] else { [13:31:12.446] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:12.446] info, version) [13:31:12.446] } [13:31:12.446] base::stop(msg) [13:31:12.446] } [13:31:12.446] }) [13:31:12.446] } [13:31:12.446] ...future.strategy.old <- future::plan("list") [13:31:12.446] options(future.plan = NULL) [13:31:12.446] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.446] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:12.446] } [13:31:12.446] ...future.workdir <- getwd() [13:31:12.446] } [13:31:12.446] ...future.oldOptions <- base::as.list(base::.Options) [13:31:12.446] ...future.oldEnvVars <- base::Sys.getenv() [13:31:12.446] } [13:31:12.446] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:12.446] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:12.446] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:12.446] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:12.446] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:12.446] future.stdout.windows.reencode = NULL, width = 80L) [13:31:12.446] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:12.446] base::names(...future.oldOptions)) [13:31:12.446] } [13:31:12.446] if (FALSE) { [13:31:12.446] } [13:31:12.446] else { [13:31:12.446] if (TRUE) { [13:31:12.446] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:12.446] open = "w") [13:31:12.446] } [13:31:12.446] else { [13:31:12.446] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:12.446] windows = "NUL", "/dev/null"), open = "w") [13:31:12.446] } [13:31:12.446] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:12.446] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:12.446] base::sink(type = "output", split = FALSE) [13:31:12.446] base::close(...future.stdout) [13:31:12.446] }, add = TRUE) [13:31:12.446] } [13:31:12.446] ...future.frame <- base::sys.nframe() [13:31:12.446] ...future.conditions <- base::list() [13:31:12.446] ...future.rng <- base::globalenv()$.Random.seed [13:31:12.446] if (FALSE) { [13:31:12.446] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:12.446] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:12.446] } [13:31:12.446] ...future.result <- base::tryCatch({ [13:31:12.446] base::withCallingHandlers({ [13:31:12.446] ...future.value <- base::withVisible(base::local(NA)) [13:31:12.446] future::FutureResult(value = ...future.value$value, [13:31:12.446] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.446] ...future.rng), globalenv = if (FALSE) [13:31:12.446] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:12.446] ...future.globalenv.names)) [13:31:12.446] else NULL, started = ...future.startTime, version = "1.8") [13:31:12.446] }, condition = base::local({ [13:31:12.446] c <- base::c [13:31:12.446] inherits <- base::inherits [13:31:12.446] invokeRestart <- base::invokeRestart [13:31:12.446] length <- base::length [13:31:12.446] list <- base::list [13:31:12.446] seq.int <- base::seq.int [13:31:12.446] signalCondition <- base::signalCondition [13:31:12.446] sys.calls <- base::sys.calls [13:31:12.446] `[[` <- base::`[[` [13:31:12.446] `+` <- base::`+` [13:31:12.446] `<<-` <- base::`<<-` [13:31:12.446] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:12.446] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:12.446] 3L)] [13:31:12.446] } [13:31:12.446] function(cond) { [13:31:12.446] is_error <- inherits(cond, "error") [13:31:12.446] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:12.446] NULL) [13:31:12.446] if (is_error) { [13:31:12.446] sessionInformation <- function() { [13:31:12.446] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:12.446] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:12.446] search = base::search(), system = base::Sys.info()) [13:31:12.446] } [13:31:12.446] ...future.conditions[[length(...future.conditions) + [13:31:12.446] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:12.446] cond$call), session = sessionInformation(), [13:31:12.446] timestamp = base::Sys.time(), signaled = 0L) [13:31:12.446] signalCondition(cond) [13:31:12.446] } [13:31:12.446] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:12.446] signal <- FALSE && inherits(cond, character(0)) [13:31:12.446] ...future.conditions[[length(...future.conditions) + [13:31:12.446] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:12.446] if (FALSE && !signal) { [13:31:12.446] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.446] { [13:31:12.446] inherits <- base::inherits [13:31:12.446] invokeRestart <- base::invokeRestart [13:31:12.446] is.null <- base::is.null [13:31:12.446] muffled <- FALSE [13:31:12.446] if (inherits(cond, "message")) { [13:31:12.446] muffled <- grepl(pattern, "muffleMessage") [13:31:12.446] if (muffled) [13:31:12.446] invokeRestart("muffleMessage") [13:31:12.446] } [13:31:12.446] else if (inherits(cond, "warning")) { [13:31:12.446] muffled <- grepl(pattern, "muffleWarning") [13:31:12.446] if (muffled) [13:31:12.446] invokeRestart("muffleWarning") [13:31:12.446] } [13:31:12.446] else if (inherits(cond, "condition")) { [13:31:12.446] if (!is.null(pattern)) { [13:31:12.446] computeRestarts <- base::computeRestarts [13:31:12.446] grepl <- base::grepl [13:31:12.446] restarts <- computeRestarts(cond) [13:31:12.446] for (restart in restarts) { [13:31:12.446] name <- restart$name [13:31:12.446] if (is.null(name)) [13:31:12.446] next [13:31:12.446] if (!grepl(pattern, name)) [13:31:12.446] next [13:31:12.446] invokeRestart(restart) [13:31:12.446] muffled <- TRUE [13:31:12.446] break [13:31:12.446] } [13:31:12.446] } [13:31:12.446] } [13:31:12.446] invisible(muffled) [13:31:12.446] } [13:31:12.446] muffleCondition(cond, pattern = "^muffle") [13:31:12.446] } [13:31:12.446] } [13:31:12.446] else { [13:31:12.446] if (TRUE) { [13:31:12.446] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.446] { [13:31:12.446] inherits <- base::inherits [13:31:12.446] invokeRestart <- base::invokeRestart [13:31:12.446] is.null <- base::is.null [13:31:12.446] muffled <- FALSE [13:31:12.446] if (inherits(cond, "message")) { [13:31:12.446] muffled <- grepl(pattern, "muffleMessage") [13:31:12.446] if (muffled) [13:31:12.446] invokeRestart("muffleMessage") [13:31:12.446] } [13:31:12.446] else if (inherits(cond, "warning")) { [13:31:12.446] muffled <- grepl(pattern, "muffleWarning") [13:31:12.446] if (muffled) [13:31:12.446] invokeRestart("muffleWarning") [13:31:12.446] } [13:31:12.446] else if (inherits(cond, "condition")) { [13:31:12.446] if (!is.null(pattern)) { [13:31:12.446] computeRestarts <- base::computeRestarts [13:31:12.446] grepl <- base::grepl [13:31:12.446] restarts <- computeRestarts(cond) [13:31:12.446] for (restart in restarts) { [13:31:12.446] name <- restart$name [13:31:12.446] if (is.null(name)) [13:31:12.446] next [13:31:12.446] if (!grepl(pattern, name)) [13:31:12.446] next [13:31:12.446] invokeRestart(restart) [13:31:12.446] muffled <- TRUE [13:31:12.446] break [13:31:12.446] } [13:31:12.446] } [13:31:12.446] } [13:31:12.446] invisible(muffled) [13:31:12.446] } [13:31:12.446] muffleCondition(cond, pattern = "^muffle") [13:31:12.446] } [13:31:12.446] } [13:31:12.446] } [13:31:12.446] })) [13:31:12.446] }, error = function(ex) { [13:31:12.446] base::structure(base::list(value = NULL, visible = NULL, [13:31:12.446] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.446] ...future.rng), started = ...future.startTime, [13:31:12.446] finished = Sys.time(), session_uuid = NA_character_, [13:31:12.446] version = "1.8"), class = "FutureResult") [13:31:12.446] }, finally = { [13:31:12.446] if (!identical(...future.workdir, getwd())) [13:31:12.446] setwd(...future.workdir) [13:31:12.446] { [13:31:12.446] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:12.446] ...future.oldOptions$nwarnings <- NULL [13:31:12.446] } [13:31:12.446] base::options(...future.oldOptions) [13:31:12.446] if (.Platform$OS.type == "windows") { [13:31:12.446] old_names <- names(...future.oldEnvVars) [13:31:12.446] envs <- base::Sys.getenv() [13:31:12.446] names <- names(envs) [13:31:12.446] common <- intersect(names, old_names) [13:31:12.446] added <- setdiff(names, old_names) [13:31:12.446] removed <- setdiff(old_names, names) [13:31:12.446] changed <- common[...future.oldEnvVars[common] != [13:31:12.446] envs[common]] [13:31:12.446] NAMES <- toupper(changed) [13:31:12.446] args <- list() [13:31:12.446] for (kk in seq_along(NAMES)) { [13:31:12.446] name <- changed[[kk]] [13:31:12.446] NAME <- NAMES[[kk]] [13:31:12.446] if (name != NAME && is.element(NAME, old_names)) [13:31:12.446] next [13:31:12.446] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.446] } [13:31:12.446] NAMES <- toupper(added) [13:31:12.446] for (kk in seq_along(NAMES)) { [13:31:12.446] name <- added[[kk]] [13:31:12.446] NAME <- NAMES[[kk]] [13:31:12.446] if (name != NAME && is.element(NAME, old_names)) [13:31:12.446] next [13:31:12.446] args[[name]] <- "" [13:31:12.446] } [13:31:12.446] NAMES <- toupper(removed) [13:31:12.446] for (kk in seq_along(NAMES)) { [13:31:12.446] name <- removed[[kk]] [13:31:12.446] NAME <- NAMES[[kk]] [13:31:12.446] if (name != NAME && is.element(NAME, old_names)) [13:31:12.446] next [13:31:12.446] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.446] } [13:31:12.446] if (length(args) > 0) [13:31:12.446] base::do.call(base::Sys.setenv, args = args) [13:31:12.446] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:12.446] } [13:31:12.446] else { [13:31:12.446] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:12.446] } [13:31:12.446] { [13:31:12.446] if (base::length(...future.futureOptionsAdded) > [13:31:12.446] 0L) { [13:31:12.446] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:12.446] base::names(opts) <- ...future.futureOptionsAdded [13:31:12.446] base::options(opts) [13:31:12.446] } [13:31:12.446] { [13:31:12.446] NULL [13:31:12.446] options(future.plan = NULL) [13:31:12.446] if (is.na(NA_character_)) [13:31:12.446] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.446] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:12.446] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:12.446] .init = FALSE) [13:31:12.446] } [13:31:12.446] } [13:31:12.446] } [13:31:12.446] }) [13:31:12.446] if (TRUE) { [13:31:12.446] base::sink(type = "output", split = FALSE) [13:31:12.446] if (TRUE) { [13:31:12.446] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:12.446] } [13:31:12.446] else { [13:31:12.446] ...future.result["stdout"] <- base::list(NULL) [13:31:12.446] } [13:31:12.446] base::close(...future.stdout) [13:31:12.446] ...future.stdout <- NULL [13:31:12.446] } [13:31:12.446] ...future.result$conditions <- ...future.conditions [13:31:12.446] ...future.result$finished <- base::Sys.time() [13:31:12.446] ...future.result [13:31:12.446] } [13:31:12.563] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:12.563] plan(): nbrOfWorkers() = 2 > > oopts <- c(oopts, options( + future.globals.resolve = TRUE, + future.globals.onMissing = "error" + )) > > > message("*** Globals - subassignments ...") *** Globals - subassignments ... > > message("*** Globals - subassignments w/ x$a <- value ...") *** Globals - subassignments w/ x$a <- value ... > > ## Truth: > x <- x0 <- list() > y0 <- list(a = 1) > str(list(x = x, y0 = y0)) List of 2 $ x : list() $ y0:List of 1 ..$ a: num 1 > > y <- local({ + x$a <- 1 + x + }) > stopifnot(identical(y, y0)) > > y <- local({ + x[["a"]] <- 1 + x + }) > stopifnot(identical(y, y0)) > > y <- local({ + x["a"] <- list(1) + x + }) > stopifnot(identical(y, y0)) > > stopifnot(identical(x, list())) > > ## Explicit future > x <- list() > f <- future({ + x$a <- 1 + x + }) Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:31:12.568] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:31:12.568] Searching for globals... [13:31:12.579] - globals found: [5] '{', 'x', '<-', '$', '$<-' [13:31:12.579] Searching for globals ... DONE [13:31:12.579] Resolving globals: TRUE [13:31:12.579] Resolving any globals that are futures ... [13:31:12.579] - globals: [5] '{', 'x', '<-', '$', '$<-' [13:31:12.580] Resolving any globals that are futures ... DONE [13:31:12.580] Resolving futures part of globals (recursively) ... [13:31:12.581] resolve() on list ... [13:31:12.581] recursive: 99 [13:31:12.582] length: 1 [13:31:12.582] elements: 'x' [13:31:12.582] length: 0 (resolved future 1) [13:31:12.582] resolve() on list ... DONE [13:31:12.582] - globals: [1] 'x' [13:31:12.582] Resolving futures part of globals (recursively) ... DONE [13:31:12.583] The total size of the 1 globals is 0 bytes (0 bytes) [13:31:12.584] The total size of the 1 globals exported for future expression ('{; x$a <- 1; x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:31:12.584] - globals: [1] 'x' [13:31:12.584] [13:31:12.584] getGlobalsAndPackages() ... DONE [13:31:12.585] run() for 'Future' ... [13:31:12.585] - state: 'created' [13:31:12.585] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:12.587] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:12.588] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:12.588] - Field: 'label' [13:31:12.588] - Field: 'local' [13:31:12.588] - Field: 'owner' [13:31:12.588] - Field: 'envir' [13:31:12.589] - Field: 'packages' [13:31:12.589] - Field: 'gc' [13:31:12.589] - Field: 'conditions' [13:31:12.589] - Field: 'expr' [13:31:12.589] - Field: 'uuid' [13:31:12.590] - Field: 'seed' [13:31:12.590] - Field: 'version' [13:31:12.590] - Field: 'result' [13:31:12.590] - Field: 'asynchronous' [13:31:12.590] - Field: 'calls' [13:31:12.590] - Field: 'globals' [13:31:12.591] - Field: 'stdout' [13:31:12.591] - Field: 'earlySignal' [13:31:12.591] - Field: 'lazy' [13:31:12.591] - Field: 'state' [13:31:12.591] - Field: '.cluster' [13:31:12.591] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:12.592] - Launch lazy future ... [13:31:12.592] Packages needed by the future expression (n = 0): [13:31:12.592] Packages needed by future strategies (n = 0): [13:31:12.592] { [13:31:12.592] { [13:31:12.592] { [13:31:12.592] ...future.startTime <- base::Sys.time() [13:31:12.592] { [13:31:12.592] { [13:31:12.592] { [13:31:12.592] base::local({ [13:31:12.592] has_future <- base::requireNamespace("future", [13:31:12.592] quietly = TRUE) [13:31:12.592] if (has_future) { [13:31:12.592] ns <- base::getNamespace("future") [13:31:12.592] version <- ns[[".package"]][["version"]] [13:31:12.592] if (is.null(version)) [13:31:12.592] version <- utils::packageVersion("future") [13:31:12.592] } [13:31:12.592] else { [13:31:12.592] version <- NULL [13:31:12.592] } [13:31:12.592] if (!has_future || version < "1.8.0") { [13:31:12.592] info <- base::c(r_version = base::gsub("R version ", [13:31:12.592] "", base::R.version$version.string), [13:31:12.592] platform = base::sprintf("%s (%s-bit)", [13:31:12.592] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:12.592] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:12.592] "release", "version")], collapse = " "), [13:31:12.592] hostname = base::Sys.info()[["nodename"]]) [13:31:12.592] info <- base::sprintf("%s: %s", base::names(info), [13:31:12.592] info) [13:31:12.592] info <- base::paste(info, collapse = "; ") [13:31:12.592] if (!has_future) { [13:31:12.592] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:12.592] info) [13:31:12.592] } [13:31:12.592] else { [13:31:12.592] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:12.592] info, version) [13:31:12.592] } [13:31:12.592] base::stop(msg) [13:31:12.592] } [13:31:12.592] }) [13:31:12.592] } [13:31:12.592] ...future.strategy.old <- future::plan("list") [13:31:12.592] options(future.plan = NULL) [13:31:12.592] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.592] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:12.592] } [13:31:12.592] ...future.workdir <- getwd() [13:31:12.592] } [13:31:12.592] ...future.oldOptions <- base::as.list(base::.Options) [13:31:12.592] ...future.oldEnvVars <- base::Sys.getenv() [13:31:12.592] } [13:31:12.592] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:31:12.592] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:12.592] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:31:12.592] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:31:12.592] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:12.592] future.stdout.windows.reencode = NULL, width = 80L) [13:31:12.592] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:12.592] base::names(...future.oldOptions)) [13:31:12.592] } [13:31:12.592] if (FALSE) { [13:31:12.592] } [13:31:12.592] else { [13:31:12.592] if (TRUE) { [13:31:12.592] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:12.592] open = "w") [13:31:12.592] } [13:31:12.592] else { [13:31:12.592] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:12.592] windows = "NUL", "/dev/null"), open = "w") [13:31:12.592] } [13:31:12.592] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:12.592] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:12.592] base::sink(type = "output", split = FALSE) [13:31:12.592] base::close(...future.stdout) [13:31:12.592] }, add = TRUE) [13:31:12.592] } [13:31:12.592] ...future.frame <- base::sys.nframe() [13:31:12.592] ...future.conditions <- base::list() [13:31:12.592] ...future.rng <- base::globalenv()$.Random.seed [13:31:12.592] if (FALSE) { [13:31:12.592] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:12.592] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:12.592] } [13:31:12.592] ...future.result <- base::tryCatch({ [13:31:12.592] base::withCallingHandlers({ [13:31:12.592] ...future.value <- base::withVisible(base::local({ [13:31:12.592] x$a <- 1 [13:31:12.592] x [13:31:12.592] })) [13:31:12.592] future::FutureResult(value = ...future.value$value, [13:31:12.592] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.592] ...future.rng), globalenv = if (FALSE) [13:31:12.592] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:12.592] ...future.globalenv.names)) [13:31:12.592] else NULL, started = ...future.startTime, version = "1.8") [13:31:12.592] }, condition = base::local({ [13:31:12.592] c <- base::c [13:31:12.592] inherits <- base::inherits [13:31:12.592] invokeRestart <- base::invokeRestart [13:31:12.592] length <- base::length [13:31:12.592] list <- base::list [13:31:12.592] seq.int <- base::seq.int [13:31:12.592] signalCondition <- base::signalCondition [13:31:12.592] sys.calls <- base::sys.calls [13:31:12.592] `[[` <- base::`[[` [13:31:12.592] `+` <- base::`+` [13:31:12.592] `<<-` <- base::`<<-` [13:31:12.592] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:12.592] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:12.592] 3L)] [13:31:12.592] } [13:31:12.592] function(cond) { [13:31:12.592] is_error <- inherits(cond, "error") [13:31:12.592] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:12.592] NULL) [13:31:12.592] if (is_error) { [13:31:12.592] sessionInformation <- function() { [13:31:12.592] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:12.592] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:12.592] search = base::search(), system = base::Sys.info()) [13:31:12.592] } [13:31:12.592] ...future.conditions[[length(...future.conditions) + [13:31:12.592] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:12.592] cond$call), session = sessionInformation(), [13:31:12.592] timestamp = base::Sys.time(), signaled = 0L) [13:31:12.592] signalCondition(cond) [13:31:12.592] } [13:31:12.592] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:12.592] signal <- FALSE && inherits(cond, character(0)) [13:31:12.592] ...future.conditions[[length(...future.conditions) + [13:31:12.592] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:12.592] if (FALSE && !signal) { [13:31:12.592] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.592] { [13:31:12.592] inherits <- base::inherits [13:31:12.592] invokeRestart <- base::invokeRestart [13:31:12.592] is.null <- base::is.null [13:31:12.592] muffled <- FALSE [13:31:12.592] if (inherits(cond, "message")) { [13:31:12.592] muffled <- grepl(pattern, "muffleMessage") [13:31:12.592] if (muffled) [13:31:12.592] invokeRestart("muffleMessage") [13:31:12.592] } [13:31:12.592] else if (inherits(cond, "warning")) { [13:31:12.592] muffled <- grepl(pattern, "muffleWarning") [13:31:12.592] if (muffled) [13:31:12.592] invokeRestart("muffleWarning") [13:31:12.592] } [13:31:12.592] else if (inherits(cond, "condition")) { [13:31:12.592] if (!is.null(pattern)) { [13:31:12.592] computeRestarts <- base::computeRestarts [13:31:12.592] grepl <- base::grepl [13:31:12.592] restarts <- computeRestarts(cond) [13:31:12.592] for (restart in restarts) { [13:31:12.592] name <- restart$name [13:31:12.592] if (is.null(name)) [13:31:12.592] next [13:31:12.592] if (!grepl(pattern, name)) [13:31:12.592] next [13:31:12.592] invokeRestart(restart) [13:31:12.592] muffled <- TRUE [13:31:12.592] break [13:31:12.592] } [13:31:12.592] } [13:31:12.592] } [13:31:12.592] invisible(muffled) [13:31:12.592] } [13:31:12.592] muffleCondition(cond, pattern = "^muffle") [13:31:12.592] } [13:31:12.592] } [13:31:12.592] else { [13:31:12.592] if (TRUE) { [13:31:12.592] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.592] { [13:31:12.592] inherits <- base::inherits [13:31:12.592] invokeRestart <- base::invokeRestart [13:31:12.592] is.null <- base::is.null [13:31:12.592] muffled <- FALSE [13:31:12.592] if (inherits(cond, "message")) { [13:31:12.592] muffled <- grepl(pattern, "muffleMessage") [13:31:12.592] if (muffled) [13:31:12.592] invokeRestart("muffleMessage") [13:31:12.592] } [13:31:12.592] else if (inherits(cond, "warning")) { [13:31:12.592] muffled <- grepl(pattern, "muffleWarning") [13:31:12.592] if (muffled) [13:31:12.592] invokeRestart("muffleWarning") [13:31:12.592] } [13:31:12.592] else if (inherits(cond, "condition")) { [13:31:12.592] if (!is.null(pattern)) { [13:31:12.592] computeRestarts <- base::computeRestarts [13:31:12.592] grepl <- base::grepl [13:31:12.592] restarts <- computeRestarts(cond) [13:31:12.592] for (restart in restarts) { [13:31:12.592] name <- restart$name [13:31:12.592] if (is.null(name)) [13:31:12.592] next [13:31:12.592] if (!grepl(pattern, name)) [13:31:12.592] next [13:31:12.592] invokeRestart(restart) [13:31:12.592] muffled <- TRUE [13:31:12.592] break [13:31:12.592] } [13:31:12.592] } [13:31:12.592] } [13:31:12.592] invisible(muffled) [13:31:12.592] } [13:31:12.592] muffleCondition(cond, pattern = "^muffle") [13:31:12.592] } [13:31:12.592] } [13:31:12.592] } [13:31:12.592] })) [13:31:12.592] }, error = function(ex) { [13:31:12.592] base::structure(base::list(value = NULL, visible = NULL, [13:31:12.592] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.592] ...future.rng), started = ...future.startTime, [13:31:12.592] finished = Sys.time(), session_uuid = NA_character_, [13:31:12.592] version = "1.8"), class = "FutureResult") [13:31:12.592] }, finally = { [13:31:12.592] if (!identical(...future.workdir, getwd())) [13:31:12.592] setwd(...future.workdir) [13:31:12.592] { [13:31:12.592] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:12.592] ...future.oldOptions$nwarnings <- NULL [13:31:12.592] } [13:31:12.592] base::options(...future.oldOptions) [13:31:12.592] if (.Platform$OS.type == "windows") { [13:31:12.592] old_names <- names(...future.oldEnvVars) [13:31:12.592] envs <- base::Sys.getenv() [13:31:12.592] names <- names(envs) [13:31:12.592] common <- intersect(names, old_names) [13:31:12.592] added <- setdiff(names, old_names) [13:31:12.592] removed <- setdiff(old_names, names) [13:31:12.592] changed <- common[...future.oldEnvVars[common] != [13:31:12.592] envs[common]] [13:31:12.592] NAMES <- toupper(changed) [13:31:12.592] args <- list() [13:31:12.592] for (kk in seq_along(NAMES)) { [13:31:12.592] name <- changed[[kk]] [13:31:12.592] NAME <- NAMES[[kk]] [13:31:12.592] if (name != NAME && is.element(NAME, old_names)) [13:31:12.592] next [13:31:12.592] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.592] } [13:31:12.592] NAMES <- toupper(added) [13:31:12.592] for (kk in seq_along(NAMES)) { [13:31:12.592] name <- added[[kk]] [13:31:12.592] NAME <- NAMES[[kk]] [13:31:12.592] if (name != NAME && is.element(NAME, old_names)) [13:31:12.592] next [13:31:12.592] args[[name]] <- "" [13:31:12.592] } [13:31:12.592] NAMES <- toupper(removed) [13:31:12.592] for (kk in seq_along(NAMES)) { [13:31:12.592] name <- removed[[kk]] [13:31:12.592] NAME <- NAMES[[kk]] [13:31:12.592] if (name != NAME && is.element(NAME, old_names)) [13:31:12.592] next [13:31:12.592] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.592] } [13:31:12.592] if (length(args) > 0) [13:31:12.592] base::do.call(base::Sys.setenv, args = args) [13:31:12.592] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:12.592] } [13:31:12.592] else { [13:31:12.592] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:12.592] } [13:31:12.592] { [13:31:12.592] if (base::length(...future.futureOptionsAdded) > [13:31:12.592] 0L) { [13:31:12.592] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:12.592] base::names(opts) <- ...future.futureOptionsAdded [13:31:12.592] base::options(opts) [13:31:12.592] } [13:31:12.592] { [13:31:12.592] NULL [13:31:12.592] options(future.plan = NULL) [13:31:12.592] if (is.na(NA_character_)) [13:31:12.592] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.592] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:12.592] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:12.592] .init = FALSE) [13:31:12.592] } [13:31:12.592] } [13:31:12.592] } [13:31:12.592] }) [13:31:12.592] if (TRUE) { [13:31:12.592] base::sink(type = "output", split = FALSE) [13:31:12.592] if (TRUE) { [13:31:12.592] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:12.592] } [13:31:12.592] else { [13:31:12.592] ...future.result["stdout"] <- base::list(NULL) [13:31:12.592] } [13:31:12.592] base::close(...future.stdout) [13:31:12.592] ...future.stdout <- NULL [13:31:12.592] } [13:31:12.592] ...future.result$conditions <- ...future.conditions [13:31:12.592] ...future.result$finished <- base::Sys.time() [13:31:12.592] ...future.result [13:31:12.592] } [13:31:12.596] - Launch lazy future ... done [13:31:12.596] run() for 'MiraiFuture' ... done > rm(list = "x") > y <- value(f) > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## Future assignment > x <- list() > y %<-% { + x$a <- 1 + x + } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:31:12.600] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:31:12.600] Searching for globals... [13:31:12.603] - globals found: [5] '{', 'x', '<-', '$', '$<-' [13:31:12.603] Searching for globals ... DONE [13:31:12.603] Resolving globals: TRUE [13:31:12.603] Resolving any globals that are futures ... [13:31:12.603] - globals: [5] '{', 'x', '<-', '$', '$<-' [13:31:12.604] Resolving any globals that are futures ... DONE [13:31:12.604] Resolving futures part of globals (recursively) ... [13:31:12.604] resolve() on list ... [13:31:12.605] recursive: 99 [13:31:12.605] length: 1 [13:31:12.605] elements: 'x' [13:31:12.605] length: 0 (resolved future 1) [13:31:12.605] resolve() on list ... DONE [13:31:12.605] - globals: [1] 'x' [13:31:12.606] Resolving futures part of globals (recursively) ... DONE [13:31:12.606] The total size of the 1 globals is 0 bytes (0 bytes) [13:31:12.608] The total size of the 1 globals exported for future expression ('{; x$a <- 1; x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:31:12.608] - globals: [1] 'x' [13:31:12.608] [13:31:12.608] getGlobalsAndPackages() ... DONE [13:31:12.609] run() for 'Future' ... [13:31:12.609] - state: 'created' [13:31:12.609] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:12.611] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:12.611] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:12.612] - Field: 'label' [13:31:12.612] - Field: 'local' [13:31:12.612] - Field: 'owner' [13:31:12.612] - Field: 'envir' [13:31:12.612] - Field: 'packages' [13:31:12.612] - Field: 'gc' [13:31:12.613] - Field: 'conditions' [13:31:12.613] - Field: 'expr' [13:31:12.613] - Field: 'uuid' [13:31:12.613] - Field: 'seed' [13:31:12.613] - Field: 'version' [13:31:12.613] - Field: 'result' [13:31:12.614] - Field: 'asynchronous' [13:31:12.614] - Field: 'calls' [13:31:12.614] - Field: 'globals' [13:31:12.614] - Field: 'stdout' [13:31:12.614] - Field: 'earlySignal' [13:31:12.615] - Field: 'lazy' [13:31:12.615] - Field: 'state' [13:31:12.615] - Field: '.cluster' [13:31:12.615] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:12.615] - Launch lazy future ... [13:31:12.615] Packages needed by the future expression (n = 0): [13:31:12.616] Packages needed by future strategies (n = 0): [13:31:12.616] { [13:31:12.616] { [13:31:12.616] { [13:31:12.616] ...future.startTime <- base::Sys.time() [13:31:12.616] { [13:31:12.616] { [13:31:12.616] { [13:31:12.616] base::local({ [13:31:12.616] has_future <- base::requireNamespace("future", [13:31:12.616] quietly = TRUE) [13:31:12.616] if (has_future) { [13:31:12.616] ns <- base::getNamespace("future") [13:31:12.616] version <- ns[[".package"]][["version"]] [13:31:12.616] if (is.null(version)) [13:31:12.616] version <- utils::packageVersion("future") [13:31:12.616] } [13:31:12.616] else { [13:31:12.616] version <- NULL [13:31:12.616] } [13:31:12.616] if (!has_future || version < "1.8.0") { [13:31:12.616] info <- base::c(r_version = base::gsub("R version ", [13:31:12.616] "", base::R.version$version.string), [13:31:12.616] platform = base::sprintf("%s (%s-bit)", [13:31:12.616] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:12.616] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:12.616] "release", "version")], collapse = " "), [13:31:12.616] hostname = base::Sys.info()[["nodename"]]) [13:31:12.616] info <- base::sprintf("%s: %s", base::names(info), [13:31:12.616] info) [13:31:12.616] info <- base::paste(info, collapse = "; ") [13:31:12.616] if (!has_future) { [13:31:12.616] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:12.616] info) [13:31:12.616] } [13:31:12.616] else { [13:31:12.616] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:12.616] info, version) [13:31:12.616] } [13:31:12.616] base::stop(msg) [13:31:12.616] } [13:31:12.616] }) [13:31:12.616] } [13:31:12.616] ...future.strategy.old <- future::plan("list") [13:31:12.616] options(future.plan = NULL) [13:31:12.616] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.616] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:12.616] } [13:31:12.616] ...future.workdir <- getwd() [13:31:12.616] } [13:31:12.616] ...future.oldOptions <- base::as.list(base::.Options) [13:31:12.616] ...future.oldEnvVars <- base::Sys.getenv() [13:31:12.616] } [13:31:12.616] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:31:12.616] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:12.616] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:31:12.616] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:31:12.616] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:12.616] future.stdout.windows.reencode = NULL, width = 80L) [13:31:12.616] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:12.616] base::names(...future.oldOptions)) [13:31:12.616] } [13:31:12.616] if (FALSE) { [13:31:12.616] } [13:31:12.616] else { [13:31:12.616] if (TRUE) { [13:31:12.616] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:12.616] open = "w") [13:31:12.616] } [13:31:12.616] else { [13:31:12.616] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:12.616] windows = "NUL", "/dev/null"), open = "w") [13:31:12.616] } [13:31:12.616] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:12.616] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:12.616] base::sink(type = "output", split = FALSE) [13:31:12.616] base::close(...future.stdout) [13:31:12.616] }, add = TRUE) [13:31:12.616] } [13:31:12.616] ...future.frame <- base::sys.nframe() [13:31:12.616] ...future.conditions <- base::list() [13:31:12.616] ...future.rng <- base::globalenv()$.Random.seed [13:31:12.616] if (FALSE) { [13:31:12.616] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:12.616] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:12.616] } [13:31:12.616] ...future.result <- base::tryCatch({ [13:31:12.616] base::withCallingHandlers({ [13:31:12.616] ...future.value <- base::withVisible(base::local({ [13:31:12.616] x$a <- 1 [13:31:12.616] x [13:31:12.616] })) [13:31:12.616] future::FutureResult(value = ...future.value$value, [13:31:12.616] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.616] ...future.rng), globalenv = if (FALSE) [13:31:12.616] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:12.616] ...future.globalenv.names)) [13:31:12.616] else NULL, started = ...future.startTime, version = "1.8") [13:31:12.616] }, condition = base::local({ [13:31:12.616] c <- base::c [13:31:12.616] inherits <- base::inherits [13:31:12.616] invokeRestart <- base::invokeRestart [13:31:12.616] length <- base::length [13:31:12.616] list <- base::list [13:31:12.616] seq.int <- base::seq.int [13:31:12.616] signalCondition <- base::signalCondition [13:31:12.616] sys.calls <- base::sys.calls [13:31:12.616] `[[` <- base::`[[` [13:31:12.616] `+` <- base::`+` [13:31:12.616] `<<-` <- base::`<<-` [13:31:12.616] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:12.616] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:12.616] 3L)] [13:31:12.616] } [13:31:12.616] function(cond) { [13:31:12.616] is_error <- inherits(cond, "error") [13:31:12.616] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:12.616] NULL) [13:31:12.616] if (is_error) { [13:31:12.616] sessionInformation <- function() { [13:31:12.616] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:12.616] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:12.616] search = base::search(), system = base::Sys.info()) [13:31:12.616] } [13:31:12.616] ...future.conditions[[length(...future.conditions) + [13:31:12.616] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:12.616] cond$call), session = sessionInformation(), [13:31:12.616] timestamp = base::Sys.time(), signaled = 0L) [13:31:12.616] signalCondition(cond) [13:31:12.616] } [13:31:12.616] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:12.616] signal <- FALSE && inherits(cond, character(0)) [13:31:12.616] ...future.conditions[[length(...future.conditions) + [13:31:12.616] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:12.616] if (FALSE && !signal) { [13:31:12.616] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.616] { [13:31:12.616] inherits <- base::inherits [13:31:12.616] invokeRestart <- base::invokeRestart [13:31:12.616] is.null <- base::is.null [13:31:12.616] muffled <- FALSE [13:31:12.616] if (inherits(cond, "message")) { [13:31:12.616] muffled <- grepl(pattern, "muffleMessage") [13:31:12.616] if (muffled) [13:31:12.616] invokeRestart("muffleMessage") [13:31:12.616] } [13:31:12.616] else if (inherits(cond, "warning")) { [13:31:12.616] muffled <- grepl(pattern, "muffleWarning") [13:31:12.616] if (muffled) [13:31:12.616] invokeRestart("muffleWarning") [13:31:12.616] } [13:31:12.616] else if (inherits(cond, "condition")) { [13:31:12.616] if (!is.null(pattern)) { [13:31:12.616] computeRestarts <- base::computeRestarts [13:31:12.616] grepl <- base::grepl [13:31:12.616] restarts <- computeRestarts(cond) [13:31:12.616] for (restart in restarts) { [13:31:12.616] name <- restart$name [13:31:12.616] if (is.null(name)) [13:31:12.616] next [13:31:12.616] if (!grepl(pattern, name)) [13:31:12.616] next [13:31:12.616] invokeRestart(restart) [13:31:12.616] muffled <- TRUE [13:31:12.616] break [13:31:12.616] } [13:31:12.616] } [13:31:12.616] } [13:31:12.616] invisible(muffled) [13:31:12.616] } [13:31:12.616] muffleCondition(cond, pattern = "^muffle") [13:31:12.616] } [13:31:12.616] } [13:31:12.616] else { [13:31:12.616] if (TRUE) { [13:31:12.616] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.616] { [13:31:12.616] inherits <- base::inherits [13:31:12.616] invokeRestart <- base::invokeRestart [13:31:12.616] is.null <- base::is.null [13:31:12.616] muffled <- FALSE [13:31:12.616] if (inherits(cond, "message")) { [13:31:12.616] muffled <- grepl(pattern, "muffleMessage") [13:31:12.616] if (muffled) [13:31:12.616] invokeRestart("muffleMessage") [13:31:12.616] } [13:31:12.616] else if (inherits(cond, "warning")) { [13:31:12.616] muffled <- grepl(pattern, "muffleWarning") [13:31:12.616] if (muffled) [13:31:12.616] invokeRestart("muffleWarning") [13:31:12.616] } [13:31:12.616] else if (inherits(cond, "condition")) { [13:31:12.616] if (!is.null(pattern)) { [13:31:12.616] computeRestarts <- base::computeRestarts [13:31:12.616] grepl <- base::grepl [13:31:12.616] restarts <- computeRestarts(cond) [13:31:12.616] for (restart in restarts) { [13:31:12.616] name <- restart$name [13:31:12.616] if (is.null(name)) [13:31:12.616] next [13:31:12.616] if (!grepl(pattern, name)) [13:31:12.616] next [13:31:12.616] invokeRestart(restart) [13:31:12.616] muffled <- TRUE [13:31:12.616] break [13:31:12.616] } [13:31:12.616] } [13:31:12.616] } [13:31:12.616] invisible(muffled) [13:31:12.616] } [13:31:12.616] muffleCondition(cond, pattern = "^muffle") [13:31:12.616] } [13:31:12.616] } [13:31:12.616] } [13:31:12.616] })) [13:31:12.616] }, error = function(ex) { [13:31:12.616] base::structure(base::list(value = NULL, visible = NULL, [13:31:12.616] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.616] ...future.rng), started = ...future.startTime, [13:31:12.616] finished = Sys.time(), session_uuid = NA_character_, [13:31:12.616] version = "1.8"), class = "FutureResult") [13:31:12.616] }, finally = { [13:31:12.616] if (!identical(...future.workdir, getwd())) [13:31:12.616] setwd(...future.workdir) [13:31:12.616] { [13:31:12.616] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:12.616] ...future.oldOptions$nwarnings <- NULL [13:31:12.616] } [13:31:12.616] base::options(...future.oldOptions) [13:31:12.616] if (.Platform$OS.type == "windows") { [13:31:12.616] old_names <- names(...future.oldEnvVars) [13:31:12.616] envs <- base::Sys.getenv() [13:31:12.616] names <- names(envs) [13:31:12.616] common <- intersect(names, old_names) [13:31:12.616] added <- setdiff(names, old_names) [13:31:12.616] removed <- setdiff(old_names, names) [13:31:12.616] changed <- common[...future.oldEnvVars[common] != [13:31:12.616] envs[common]] [13:31:12.616] NAMES <- toupper(changed) [13:31:12.616] args <- list() [13:31:12.616] for (kk in seq_along(NAMES)) { [13:31:12.616] name <- changed[[kk]] [13:31:12.616] NAME <- NAMES[[kk]] [13:31:12.616] if (name != NAME && is.element(NAME, old_names)) [13:31:12.616] next [13:31:12.616] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.616] } [13:31:12.616] NAMES <- toupper(added) [13:31:12.616] for (kk in seq_along(NAMES)) { [13:31:12.616] name <- added[[kk]] [13:31:12.616] NAME <- NAMES[[kk]] [13:31:12.616] if (name != NAME && is.element(NAME, old_names)) [13:31:12.616] next [13:31:12.616] args[[name]] <- "" [13:31:12.616] } [13:31:12.616] NAMES <- toupper(removed) [13:31:12.616] for (kk in seq_along(NAMES)) { [13:31:12.616] name <- removed[[kk]] [13:31:12.616] NAME <- NAMES[[kk]] [13:31:12.616] if (name != NAME && is.element(NAME, old_names)) [13:31:12.616] next [13:31:12.616] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.616] } [13:31:12.616] if (length(args) > 0) [13:31:12.616] base::do.call(base::Sys.setenv, args = args) [13:31:12.616] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:12.616] } [13:31:12.616] else { [13:31:12.616] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:12.616] } [13:31:12.616] { [13:31:12.616] if (base::length(...future.futureOptionsAdded) > [13:31:12.616] 0L) { [13:31:12.616] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:12.616] base::names(opts) <- ...future.futureOptionsAdded [13:31:12.616] base::options(opts) [13:31:12.616] } [13:31:12.616] { [13:31:12.616] NULL [13:31:12.616] options(future.plan = NULL) [13:31:12.616] if (is.na(NA_character_)) [13:31:12.616] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.616] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:12.616] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:12.616] .init = FALSE) [13:31:12.616] } [13:31:12.616] } [13:31:12.616] } [13:31:12.616] }) [13:31:12.616] if (TRUE) { [13:31:12.616] base::sink(type = "output", split = FALSE) [13:31:12.616] if (TRUE) { [13:31:12.616] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:12.616] } [13:31:12.616] else { [13:31:12.616] ...future.result["stdout"] <- base::list(NULL) [13:31:12.616] } [13:31:12.616] base::close(...future.stdout) [13:31:12.616] ...future.stdout <- NULL [13:31:12.616] } [13:31:12.616] ...future.result$conditions <- ...future.conditions [13:31:12.616] ...future.result$finished <- base::Sys.time() [13:31:12.616] ...future.result [13:31:12.616] } [13:31:12.620] - Launch lazy future ... done [13:31:12.620] run() for 'MiraiFuture' ... done > rm(list = "x") > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## 'x' is _not_ a global variable here > x <- list() > y %<-% { + x <- list(b = 2) + x$a <- 1 + x + } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:31:12.622] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:31:12.623] Searching for globals... [13:31:12.626] - globals found: [5] '{', '<-', 'list', '$', '$<-' [13:31:12.626] Searching for globals ... DONE [13:31:12.626] Resolving globals: TRUE [13:31:12.626] Resolving any globals that are futures ... [13:31:12.626] - globals: [5] '{', '<-', 'list', '$', '$<-' [13:31:12.626] Resolving any globals that are futures ... DONE [13:31:12.627] [13:31:12.627] [13:31:12.627] getGlobalsAndPackages() ... DONE [13:31:12.628] run() for 'Future' ... [13:31:12.628] - state: 'created' [13:31:12.628] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:12.630] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:12.630] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:12.631] - Field: 'label' [13:31:12.631] - Field: 'local' [13:31:12.631] - Field: 'owner' [13:31:12.631] - Field: 'envir' [13:31:12.631] - Field: 'packages' [13:31:12.631] - Field: 'gc' [13:31:12.632] - Field: 'conditions' [13:31:12.632] - Field: 'expr' [13:31:12.632] - Field: 'uuid' [13:31:12.632] - Field: 'seed' [13:31:12.632] - Field: 'version' [13:31:12.632] - Field: 'result' [13:31:12.633] - Field: 'asynchronous' [13:31:12.633] - Field: 'calls' [13:31:12.633] - Field: 'globals' [13:31:12.633] - Field: 'stdout' [13:31:12.633] - Field: 'earlySignal' [13:31:12.633] - Field: 'lazy' [13:31:12.634] - Field: 'state' [13:31:12.634] - Field: '.cluster' [13:31:12.634] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:12.634] - Launch lazy future ... [13:31:12.634] Packages needed by the future expression (n = 0): [13:31:12.635] Packages needed by future strategies (n = 0): [13:31:12.635] { [13:31:12.635] { [13:31:12.635] { [13:31:12.635] ...future.startTime <- base::Sys.time() [13:31:12.635] { [13:31:12.635] { [13:31:12.635] { [13:31:12.635] base::local({ [13:31:12.635] has_future <- base::requireNamespace("future", [13:31:12.635] quietly = TRUE) [13:31:12.635] if (has_future) { [13:31:12.635] ns <- base::getNamespace("future") [13:31:12.635] version <- ns[[".package"]][["version"]] [13:31:12.635] if (is.null(version)) [13:31:12.635] version <- utils::packageVersion("future") [13:31:12.635] } [13:31:12.635] else { [13:31:12.635] version <- NULL [13:31:12.635] } [13:31:12.635] if (!has_future || version < "1.8.0") { [13:31:12.635] info <- base::c(r_version = base::gsub("R version ", [13:31:12.635] "", base::R.version$version.string), [13:31:12.635] platform = base::sprintf("%s (%s-bit)", [13:31:12.635] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:12.635] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:12.635] "release", "version")], collapse = " "), [13:31:12.635] hostname = base::Sys.info()[["nodename"]]) [13:31:12.635] info <- base::sprintf("%s: %s", base::names(info), [13:31:12.635] info) [13:31:12.635] info <- base::paste(info, collapse = "; ") [13:31:12.635] if (!has_future) { [13:31:12.635] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:12.635] info) [13:31:12.635] } [13:31:12.635] else { [13:31:12.635] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:12.635] info, version) [13:31:12.635] } [13:31:12.635] base::stop(msg) [13:31:12.635] } [13:31:12.635] }) [13:31:12.635] } [13:31:12.635] ...future.strategy.old <- future::plan("list") [13:31:12.635] options(future.plan = NULL) [13:31:12.635] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.635] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:12.635] } [13:31:12.635] ...future.workdir <- getwd() [13:31:12.635] } [13:31:12.635] ...future.oldOptions <- base::as.list(base::.Options) [13:31:12.635] ...future.oldEnvVars <- base::Sys.getenv() [13:31:12.635] } [13:31:12.635] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:31:12.635] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:12.635] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:31:12.635] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:31:12.635] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:12.635] future.stdout.windows.reencode = NULL, width = 80L) [13:31:12.635] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:12.635] base::names(...future.oldOptions)) [13:31:12.635] } [13:31:12.635] if (FALSE) { [13:31:12.635] } [13:31:12.635] else { [13:31:12.635] if (TRUE) { [13:31:12.635] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:12.635] open = "w") [13:31:12.635] } [13:31:12.635] else { [13:31:12.635] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:12.635] windows = "NUL", "/dev/null"), open = "w") [13:31:12.635] } [13:31:12.635] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:12.635] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:12.635] base::sink(type = "output", split = FALSE) [13:31:12.635] base::close(...future.stdout) [13:31:12.635] }, add = TRUE) [13:31:12.635] } [13:31:12.635] ...future.frame <- base::sys.nframe() [13:31:12.635] ...future.conditions <- base::list() [13:31:12.635] ...future.rng <- base::globalenv()$.Random.seed [13:31:12.635] if (FALSE) { [13:31:12.635] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:12.635] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:12.635] } [13:31:12.635] ...future.result <- base::tryCatch({ [13:31:12.635] base::withCallingHandlers({ [13:31:12.635] ...future.value <- base::withVisible(base::local({ [13:31:12.635] x <- list(b = 2) [13:31:12.635] x$a <- 1 [13:31:12.635] x [13:31:12.635] })) [13:31:12.635] future::FutureResult(value = ...future.value$value, [13:31:12.635] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.635] ...future.rng), globalenv = if (FALSE) [13:31:12.635] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:12.635] ...future.globalenv.names)) [13:31:12.635] else NULL, started = ...future.startTime, version = "1.8") [13:31:12.635] }, condition = base::local({ [13:31:12.635] c <- base::c [13:31:12.635] inherits <- base::inherits [13:31:12.635] invokeRestart <- base::invokeRestart [13:31:12.635] length <- base::length [13:31:12.635] list <- base::list [13:31:12.635] seq.int <- base::seq.int [13:31:12.635] signalCondition <- base::signalCondition [13:31:12.635] sys.calls <- base::sys.calls [13:31:12.635] `[[` <- base::`[[` [13:31:12.635] `+` <- base::`+` [13:31:12.635] `<<-` <- base::`<<-` [13:31:12.635] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:12.635] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:12.635] 3L)] [13:31:12.635] } [13:31:12.635] function(cond) { [13:31:12.635] is_error <- inherits(cond, "error") [13:31:12.635] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:12.635] NULL) [13:31:12.635] if (is_error) { [13:31:12.635] sessionInformation <- function() { [13:31:12.635] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:12.635] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:12.635] search = base::search(), system = base::Sys.info()) [13:31:12.635] } [13:31:12.635] ...future.conditions[[length(...future.conditions) + [13:31:12.635] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:12.635] cond$call), session = sessionInformation(), [13:31:12.635] timestamp = base::Sys.time(), signaled = 0L) [13:31:12.635] signalCondition(cond) [13:31:12.635] } [13:31:12.635] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:12.635] signal <- FALSE && inherits(cond, character(0)) [13:31:12.635] ...future.conditions[[length(...future.conditions) + [13:31:12.635] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:12.635] if (FALSE && !signal) { [13:31:12.635] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.635] { [13:31:12.635] inherits <- base::inherits [13:31:12.635] invokeRestart <- base::invokeRestart [13:31:12.635] is.null <- base::is.null [13:31:12.635] muffled <- FALSE [13:31:12.635] if (inherits(cond, "message")) { [13:31:12.635] muffled <- grepl(pattern, "muffleMessage") [13:31:12.635] if (muffled) [13:31:12.635] invokeRestart("muffleMessage") [13:31:12.635] } [13:31:12.635] else if (inherits(cond, "warning")) { [13:31:12.635] muffled <- grepl(pattern, "muffleWarning") [13:31:12.635] if (muffled) [13:31:12.635] invokeRestart("muffleWarning") [13:31:12.635] } [13:31:12.635] else if (inherits(cond, "condition")) { [13:31:12.635] if (!is.null(pattern)) { [13:31:12.635] computeRestarts <- base::computeRestarts [13:31:12.635] grepl <- base::grepl [13:31:12.635] restarts <- computeRestarts(cond) [13:31:12.635] for (restart in restarts) { [13:31:12.635] name <- restart$name [13:31:12.635] if (is.null(name)) [13:31:12.635] next [13:31:12.635] if (!grepl(pattern, name)) [13:31:12.635] next [13:31:12.635] invokeRestart(restart) [13:31:12.635] muffled <- TRUE [13:31:12.635] break [13:31:12.635] } [13:31:12.635] } [13:31:12.635] } [13:31:12.635] invisible(muffled) [13:31:12.635] } [13:31:12.635] muffleCondition(cond, pattern = "^muffle") [13:31:12.635] } [13:31:12.635] } [13:31:12.635] else { [13:31:12.635] if (TRUE) { [13:31:12.635] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.635] { [13:31:12.635] inherits <- base::inherits [13:31:12.635] invokeRestart <- base::invokeRestart [13:31:12.635] is.null <- base::is.null [13:31:12.635] muffled <- FALSE [13:31:12.635] if (inherits(cond, "message")) { [13:31:12.635] muffled <- grepl(pattern, "muffleMessage") [13:31:12.635] if (muffled) [13:31:12.635] invokeRestart("muffleMessage") [13:31:12.635] } [13:31:12.635] else if (inherits(cond, "warning")) { [13:31:12.635] muffled <- grepl(pattern, "muffleWarning") [13:31:12.635] if (muffled) [13:31:12.635] invokeRestart("muffleWarning") [13:31:12.635] } [13:31:12.635] else if (inherits(cond, "condition")) { [13:31:12.635] if (!is.null(pattern)) { [13:31:12.635] computeRestarts <- base::computeRestarts [13:31:12.635] grepl <- base::grepl [13:31:12.635] restarts <- computeRestarts(cond) [13:31:12.635] for (restart in restarts) { [13:31:12.635] name <- restart$name [13:31:12.635] if (is.null(name)) [13:31:12.635] next [13:31:12.635] if (!grepl(pattern, name)) [13:31:12.635] next [13:31:12.635] invokeRestart(restart) [13:31:12.635] muffled <- TRUE [13:31:12.635] break [13:31:12.635] } [13:31:12.635] } [13:31:12.635] } [13:31:12.635] invisible(muffled) [13:31:12.635] } [13:31:12.635] muffleCondition(cond, pattern = "^muffle") [13:31:12.635] } [13:31:12.635] } [13:31:12.635] } [13:31:12.635] })) [13:31:12.635] }, error = function(ex) { [13:31:12.635] base::structure(base::list(value = NULL, visible = NULL, [13:31:12.635] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.635] ...future.rng), started = ...future.startTime, [13:31:12.635] finished = Sys.time(), session_uuid = NA_character_, [13:31:12.635] version = "1.8"), class = "FutureResult") [13:31:12.635] }, finally = { [13:31:12.635] if (!identical(...future.workdir, getwd())) [13:31:12.635] setwd(...future.workdir) [13:31:12.635] { [13:31:12.635] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:12.635] ...future.oldOptions$nwarnings <- NULL [13:31:12.635] } [13:31:12.635] base::options(...future.oldOptions) [13:31:12.635] if (.Platform$OS.type == "windows") { [13:31:12.635] old_names <- names(...future.oldEnvVars) [13:31:12.635] envs <- base::Sys.getenv() [13:31:12.635] names <- names(envs) [13:31:12.635] common <- intersect(names, old_names) [13:31:12.635] added <- setdiff(names, old_names) [13:31:12.635] removed <- setdiff(old_names, names) [13:31:12.635] changed <- common[...future.oldEnvVars[common] != [13:31:12.635] envs[common]] [13:31:12.635] NAMES <- toupper(changed) [13:31:12.635] args <- list() [13:31:12.635] for (kk in seq_along(NAMES)) { [13:31:12.635] name <- changed[[kk]] [13:31:12.635] NAME <- NAMES[[kk]] [13:31:12.635] if (name != NAME && is.element(NAME, old_names)) [13:31:12.635] next [13:31:12.635] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.635] } [13:31:12.635] NAMES <- toupper(added) [13:31:12.635] for (kk in seq_along(NAMES)) { [13:31:12.635] name <- added[[kk]] [13:31:12.635] NAME <- NAMES[[kk]] [13:31:12.635] if (name != NAME && is.element(NAME, old_names)) [13:31:12.635] next [13:31:12.635] args[[name]] <- "" [13:31:12.635] } [13:31:12.635] NAMES <- toupper(removed) [13:31:12.635] for (kk in seq_along(NAMES)) { [13:31:12.635] name <- removed[[kk]] [13:31:12.635] NAME <- NAMES[[kk]] [13:31:12.635] if (name != NAME && is.element(NAME, old_names)) [13:31:12.635] next [13:31:12.635] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.635] } [13:31:12.635] if (length(args) > 0) [13:31:12.635] base::do.call(base::Sys.setenv, args = args) [13:31:12.635] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:12.635] } [13:31:12.635] else { [13:31:12.635] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:12.635] } [13:31:12.635] { [13:31:12.635] if (base::length(...future.futureOptionsAdded) > [13:31:12.635] 0L) { [13:31:12.635] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:12.635] base::names(opts) <- ...future.futureOptionsAdded [13:31:12.635] base::options(opts) [13:31:12.635] } [13:31:12.635] { [13:31:12.635] NULL [13:31:12.635] options(future.plan = NULL) [13:31:12.635] if (is.na(NA_character_)) [13:31:12.635] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.635] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:12.635] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:12.635] .init = FALSE) [13:31:12.635] } [13:31:12.635] } [13:31:12.635] } [13:31:12.635] }) [13:31:12.635] if (TRUE) { [13:31:12.635] base::sink(type = "output", split = FALSE) [13:31:12.635] if (TRUE) { [13:31:12.635] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:12.635] } [13:31:12.635] else { [13:31:12.635] ...future.result["stdout"] <- base::list(NULL) [13:31:12.635] } [13:31:12.635] base::close(...future.stdout) [13:31:12.635] ...future.stdout <- NULL [13:31:12.635] } [13:31:12.635] ...future.result$conditions <- ...future.conditions [13:31:12.635] ...future.result$finished <- base::Sys.time() [13:31:12.635] ...future.result [13:31:12.635] } [13:31:12.639] - Launch lazy future ... done [13:31:12.639] run() for 'MiraiFuture' ... done > rm(list = "x") > print(y) $b [1] 2 $a [1] 1 > stopifnot(identical(y, list(b = 2, a = 1))) > > ## Explicit future > x <- list() > f <- future({ + x[["a"]] <- 1 + x + }) Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:31:12.641] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:31:12.642] Searching for globals... [13:31:12.645] - globals found: [5] '{', 'x', '<-', '[[', '[[<-' [13:31:12.645] Searching for globals ... DONE [13:31:12.645] Resolving globals: TRUE [13:31:12.646] Resolving any globals that are futures ... [13:31:12.646] - globals: [5] '{', 'x', '<-', '[[', '[[<-' [13:31:12.646] Resolving any globals that are futures ... DONE [13:31:12.646] Resolving futures part of globals (recursively) ... [13:31:12.647] resolve() on list ... [13:31:12.647] recursive: 99 [13:31:12.647] length: 1 [13:31:12.647] elements: 'x' [13:31:12.647] length: 0 (resolved future 1) [13:31:12.648] resolve() on list ... DONE [13:31:12.648] - globals: [1] 'x' [13:31:12.648] Resolving futures part of globals (recursively) ... DONE [13:31:12.648] The total size of the 1 globals is 0 bytes (0 bytes) [13:31:12.648] The total size of the 1 globals exported for future expression ('{; x[["a"]] <- 1; x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:31:12.649] - globals: [1] 'x' [13:31:12.649] [13:31:12.649] getGlobalsAndPackages() ... DONE [13:31:12.649] run() for 'Future' ... [13:31:12.649] - state: 'created' [13:31:12.650] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:12.652] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:12.652] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:12.652] - Field: 'label' [13:31:12.652] - Field: 'local' [13:31:12.653] - Field: 'owner' [13:31:12.653] - Field: 'envir' [13:31:12.653] - Field: 'packages' [13:31:12.653] - Field: 'gc' [13:31:12.653] - Field: 'conditions' [13:31:12.653] - Field: 'expr' [13:31:12.654] - Field: 'uuid' [13:31:12.654] - Field: 'seed' [13:31:12.654] - Field: 'version' [13:31:12.654] - Field: 'result' [13:31:12.654] - Field: 'asynchronous' [13:31:12.654] - Field: 'calls' [13:31:12.655] - Field: 'globals' [13:31:12.655] - Field: 'stdout' [13:31:12.655] - Field: 'earlySignal' [13:31:12.655] - Field: 'lazy' [13:31:12.655] - Field: 'state' [13:31:12.655] - Field: '.cluster' [13:31:12.656] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:12.656] - Launch lazy future ... [13:31:12.656] Packages needed by the future expression (n = 0): [13:31:12.656] Packages needed by future strategies (n = 0): [13:31:12.657] { [13:31:12.657] { [13:31:12.657] { [13:31:12.657] ...future.startTime <- base::Sys.time() [13:31:12.657] { [13:31:12.657] { [13:31:12.657] { [13:31:12.657] base::local({ [13:31:12.657] has_future <- base::requireNamespace("future", [13:31:12.657] quietly = TRUE) [13:31:12.657] if (has_future) { [13:31:12.657] ns <- base::getNamespace("future") [13:31:12.657] version <- ns[[".package"]][["version"]] [13:31:12.657] if (is.null(version)) [13:31:12.657] version <- utils::packageVersion("future") [13:31:12.657] } [13:31:12.657] else { [13:31:12.657] version <- NULL [13:31:12.657] } [13:31:12.657] if (!has_future || version < "1.8.0") { [13:31:12.657] info <- base::c(r_version = base::gsub("R version ", [13:31:12.657] "", base::R.version$version.string), [13:31:12.657] platform = base::sprintf("%s (%s-bit)", [13:31:12.657] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:12.657] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:12.657] "release", "version")], collapse = " "), [13:31:12.657] hostname = base::Sys.info()[["nodename"]]) [13:31:12.657] info <- base::sprintf("%s: %s", base::names(info), [13:31:12.657] info) [13:31:12.657] info <- base::paste(info, collapse = "; ") [13:31:12.657] if (!has_future) { [13:31:12.657] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:12.657] info) [13:31:12.657] } [13:31:12.657] else { [13:31:12.657] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:12.657] info, version) [13:31:12.657] } [13:31:12.657] base::stop(msg) [13:31:12.657] } [13:31:12.657] }) [13:31:12.657] } [13:31:12.657] ...future.strategy.old <- future::plan("list") [13:31:12.657] options(future.plan = NULL) [13:31:12.657] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.657] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:12.657] } [13:31:12.657] ...future.workdir <- getwd() [13:31:12.657] } [13:31:12.657] ...future.oldOptions <- base::as.list(base::.Options) [13:31:12.657] ...future.oldEnvVars <- base::Sys.getenv() [13:31:12.657] } [13:31:12.657] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:31:12.657] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:12.657] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:31:12.657] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:31:12.657] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:12.657] future.stdout.windows.reencode = NULL, width = 80L) [13:31:12.657] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:12.657] base::names(...future.oldOptions)) [13:31:12.657] } [13:31:12.657] if (FALSE) { [13:31:12.657] } [13:31:12.657] else { [13:31:12.657] if (TRUE) { [13:31:12.657] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:12.657] open = "w") [13:31:12.657] } [13:31:12.657] else { [13:31:12.657] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:12.657] windows = "NUL", "/dev/null"), open = "w") [13:31:12.657] } [13:31:12.657] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:12.657] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:12.657] base::sink(type = "output", split = FALSE) [13:31:12.657] base::close(...future.stdout) [13:31:12.657] }, add = TRUE) [13:31:12.657] } [13:31:12.657] ...future.frame <- base::sys.nframe() [13:31:12.657] ...future.conditions <- base::list() [13:31:12.657] ...future.rng <- base::globalenv()$.Random.seed [13:31:12.657] if (FALSE) { [13:31:12.657] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:12.657] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:12.657] } [13:31:12.657] ...future.result <- base::tryCatch({ [13:31:12.657] base::withCallingHandlers({ [13:31:12.657] ...future.value <- base::withVisible(base::local({ [13:31:12.657] x[["a"]] <- 1 [13:31:12.657] x [13:31:12.657] })) [13:31:12.657] future::FutureResult(value = ...future.value$value, [13:31:12.657] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.657] ...future.rng), globalenv = if (FALSE) [13:31:12.657] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:12.657] ...future.globalenv.names)) [13:31:12.657] else NULL, started = ...future.startTime, version = "1.8") [13:31:12.657] }, condition = base::local({ [13:31:12.657] c <- base::c [13:31:12.657] inherits <- base::inherits [13:31:12.657] invokeRestart <- base::invokeRestart [13:31:12.657] length <- base::length [13:31:12.657] list <- base::list [13:31:12.657] seq.int <- base::seq.int [13:31:12.657] signalCondition <- base::signalCondition [13:31:12.657] sys.calls <- base::sys.calls [13:31:12.657] `[[` <- base::`[[` [13:31:12.657] `+` <- base::`+` [13:31:12.657] `<<-` <- base::`<<-` [13:31:12.657] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:12.657] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:12.657] 3L)] [13:31:12.657] } [13:31:12.657] function(cond) { [13:31:12.657] is_error <- inherits(cond, "error") [13:31:12.657] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:12.657] NULL) [13:31:12.657] if (is_error) { [13:31:12.657] sessionInformation <- function() { [13:31:12.657] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:12.657] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:12.657] search = base::search(), system = base::Sys.info()) [13:31:12.657] } [13:31:12.657] ...future.conditions[[length(...future.conditions) + [13:31:12.657] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:12.657] cond$call), session = sessionInformation(), [13:31:12.657] timestamp = base::Sys.time(), signaled = 0L) [13:31:12.657] signalCondition(cond) [13:31:12.657] } [13:31:12.657] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:12.657] signal <- FALSE && inherits(cond, character(0)) [13:31:12.657] ...future.conditions[[length(...future.conditions) + [13:31:12.657] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:12.657] if (FALSE && !signal) { [13:31:12.657] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.657] { [13:31:12.657] inherits <- base::inherits [13:31:12.657] invokeRestart <- base::invokeRestart [13:31:12.657] is.null <- base::is.null [13:31:12.657] muffled <- FALSE [13:31:12.657] if (inherits(cond, "message")) { [13:31:12.657] muffled <- grepl(pattern, "muffleMessage") [13:31:12.657] if (muffled) [13:31:12.657] invokeRestart("muffleMessage") [13:31:12.657] } [13:31:12.657] else if (inherits(cond, "warning")) { [13:31:12.657] muffled <- grepl(pattern, "muffleWarning") [13:31:12.657] if (muffled) [13:31:12.657] invokeRestart("muffleWarning") [13:31:12.657] } [13:31:12.657] else if (inherits(cond, "condition")) { [13:31:12.657] if (!is.null(pattern)) { [13:31:12.657] computeRestarts <- base::computeRestarts [13:31:12.657] grepl <- base::grepl [13:31:12.657] restarts <- computeRestarts(cond) [13:31:12.657] for (restart in restarts) { [13:31:12.657] name <- restart$name [13:31:12.657] if (is.null(name)) [13:31:12.657] next [13:31:12.657] if (!grepl(pattern, name)) [13:31:12.657] next [13:31:12.657] invokeRestart(restart) [13:31:12.657] muffled <- TRUE [13:31:12.657] break [13:31:12.657] } [13:31:12.657] } [13:31:12.657] } [13:31:12.657] invisible(muffled) [13:31:12.657] } [13:31:12.657] muffleCondition(cond, pattern = "^muffle") [13:31:12.657] } [13:31:12.657] } [13:31:12.657] else { [13:31:12.657] if (TRUE) { [13:31:12.657] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.657] { [13:31:12.657] inherits <- base::inherits [13:31:12.657] invokeRestart <- base::invokeRestart [13:31:12.657] is.null <- base::is.null [13:31:12.657] muffled <- FALSE [13:31:12.657] if (inherits(cond, "message")) { [13:31:12.657] muffled <- grepl(pattern, "muffleMessage") [13:31:12.657] if (muffled) [13:31:12.657] invokeRestart("muffleMessage") [13:31:12.657] } [13:31:12.657] else if (inherits(cond, "warning")) { [13:31:12.657] muffled <- grepl(pattern, "muffleWarning") [13:31:12.657] if (muffled) [13:31:12.657] invokeRestart("muffleWarning") [13:31:12.657] } [13:31:12.657] else if (inherits(cond, "condition")) { [13:31:12.657] if (!is.null(pattern)) { [13:31:12.657] computeRestarts <- base::computeRestarts [13:31:12.657] grepl <- base::grepl [13:31:12.657] restarts <- computeRestarts(cond) [13:31:12.657] for (restart in restarts) { [13:31:12.657] name <- restart$name [13:31:12.657] if (is.null(name)) [13:31:12.657] next [13:31:12.657] if (!grepl(pattern, name)) [13:31:12.657] next [13:31:12.657] invokeRestart(restart) [13:31:12.657] muffled <- TRUE [13:31:12.657] break [13:31:12.657] } [13:31:12.657] } [13:31:12.657] } [13:31:12.657] invisible(muffled) [13:31:12.657] } [13:31:12.657] muffleCondition(cond, pattern = "^muffle") [13:31:12.657] } [13:31:12.657] } [13:31:12.657] } [13:31:12.657] })) [13:31:12.657] }, error = function(ex) { [13:31:12.657] base::structure(base::list(value = NULL, visible = NULL, [13:31:12.657] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.657] ...future.rng), started = ...future.startTime, [13:31:12.657] finished = Sys.time(), session_uuid = NA_character_, [13:31:12.657] version = "1.8"), class = "FutureResult") [13:31:12.657] }, finally = { [13:31:12.657] if (!identical(...future.workdir, getwd())) [13:31:12.657] setwd(...future.workdir) [13:31:12.657] { [13:31:12.657] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:12.657] ...future.oldOptions$nwarnings <- NULL [13:31:12.657] } [13:31:12.657] base::options(...future.oldOptions) [13:31:12.657] if (.Platform$OS.type == "windows") { [13:31:12.657] old_names <- names(...future.oldEnvVars) [13:31:12.657] envs <- base::Sys.getenv() [13:31:12.657] names <- names(envs) [13:31:12.657] common <- intersect(names, old_names) [13:31:12.657] added <- setdiff(names, old_names) [13:31:12.657] removed <- setdiff(old_names, names) [13:31:12.657] changed <- common[...future.oldEnvVars[common] != [13:31:12.657] envs[common]] [13:31:12.657] NAMES <- toupper(changed) [13:31:12.657] args <- list() [13:31:12.657] for (kk in seq_along(NAMES)) { [13:31:12.657] name <- changed[[kk]] [13:31:12.657] NAME <- NAMES[[kk]] [13:31:12.657] if (name != NAME && is.element(NAME, old_names)) [13:31:12.657] next [13:31:12.657] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.657] } [13:31:12.657] NAMES <- toupper(added) [13:31:12.657] for (kk in seq_along(NAMES)) { [13:31:12.657] name <- added[[kk]] [13:31:12.657] NAME <- NAMES[[kk]] [13:31:12.657] if (name != NAME && is.element(NAME, old_names)) [13:31:12.657] next [13:31:12.657] args[[name]] <- "" [13:31:12.657] } [13:31:12.657] NAMES <- toupper(removed) [13:31:12.657] for (kk in seq_along(NAMES)) { [13:31:12.657] name <- removed[[kk]] [13:31:12.657] NAME <- NAMES[[kk]] [13:31:12.657] if (name != NAME && is.element(NAME, old_names)) [13:31:12.657] next [13:31:12.657] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.657] } [13:31:12.657] if (length(args) > 0) [13:31:12.657] base::do.call(base::Sys.setenv, args = args) [13:31:12.657] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:12.657] } [13:31:12.657] else { [13:31:12.657] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:12.657] } [13:31:12.657] { [13:31:12.657] if (base::length(...future.futureOptionsAdded) > [13:31:12.657] 0L) { [13:31:12.657] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:12.657] base::names(opts) <- ...future.futureOptionsAdded [13:31:12.657] base::options(opts) [13:31:12.657] } [13:31:12.657] { [13:31:12.657] NULL [13:31:12.657] options(future.plan = NULL) [13:31:12.657] if (is.na(NA_character_)) [13:31:12.657] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.657] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:12.657] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:12.657] .init = FALSE) [13:31:12.657] } [13:31:12.657] } [13:31:12.657] } [13:31:12.657] }) [13:31:12.657] if (TRUE) { [13:31:12.657] base::sink(type = "output", split = FALSE) [13:31:12.657] if (TRUE) { [13:31:12.657] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:12.657] } [13:31:12.657] else { [13:31:12.657] ...future.result["stdout"] <- base::list(NULL) [13:31:12.657] } [13:31:12.657] base::close(...future.stdout) [13:31:12.657] ...future.stdout <- NULL [13:31:12.657] } [13:31:12.657] ...future.result$conditions <- ...future.conditions [13:31:12.657] ...future.result$finished <- base::Sys.time() [13:31:12.657] ...future.result [13:31:12.657] } [13:31:12.660] - Launch lazy future ... done [13:31:12.661] run() for 'MiraiFuture' ... done > rm(list = "x") > y <- value(f) > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## Future assignment > x <- list() > y %<-% { + x[["a"]] <- 1 + x + } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:31:12.663] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:31:12.663] Searching for globals... [13:31:12.665] - globals found: [5] '{', 'x', '<-', '[[', '[[<-' [13:31:12.666] Searching for globals ... DONE [13:31:12.666] Resolving globals: TRUE [13:31:12.666] Resolving any globals that are futures ... [13:31:12.666] - globals: [5] '{', 'x', '<-', '[[', '[[<-' [13:31:12.666] Resolving any globals that are futures ... DONE [13:31:12.667] Resolving futures part of globals (recursively) ... [13:31:12.667] resolve() on list ... [13:31:12.667] recursive: 99 [13:31:12.667] length: 1 [13:31:12.667] elements: 'x' [13:31:12.668] length: 0 (resolved future 1) [13:31:12.668] resolve() on list ... DONE [13:31:12.668] - globals: [1] 'x' [13:31:12.668] Resolving futures part of globals (recursively) ... DONE [13:31:12.668] The total size of the 1 globals is 0 bytes (0 bytes) [13:31:12.669] The total size of the 1 globals exported for future expression ('{; x[["a"]] <- 1; x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:31:12.669] - globals: [1] 'x' [13:31:12.669] [13:31:12.669] getGlobalsAndPackages() ... DONE [13:31:12.670] run() for 'Future' ... [13:31:12.670] - state: 'created' [13:31:12.670] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:12.672] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:12.672] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:12.673] - Field: 'label' [13:31:12.673] - Field: 'local' [13:31:12.673] - Field: 'owner' [13:31:12.673] - Field: 'envir' [13:31:12.673] - Field: 'packages' [13:31:12.673] - Field: 'gc' [13:31:12.674] - Field: 'conditions' [13:31:12.674] - Field: 'expr' [13:31:12.674] - Field: 'uuid' [13:31:12.674] - Field: 'seed' [13:31:12.674] - Field: 'version' [13:31:12.674] - Field: 'result' [13:31:12.675] - Field: 'asynchronous' [13:31:12.675] - Field: 'calls' [13:31:12.675] - Field: 'globals' [13:31:12.675] - Field: 'stdout' [13:31:12.675] - Field: 'earlySignal' [13:31:12.675] - Field: 'lazy' [13:31:12.676] - Field: 'state' [13:31:12.676] - Field: '.cluster' [13:31:12.676] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:12.677] - Launch lazy future ... [13:31:12.677] Packages needed by the future expression (n = 0): [13:31:12.677] Packages needed by future strategies (n = 0): [13:31:12.678] { [13:31:12.678] { [13:31:12.678] { [13:31:12.678] ...future.startTime <- base::Sys.time() [13:31:12.678] { [13:31:12.678] { [13:31:12.678] { [13:31:12.678] base::local({ [13:31:12.678] has_future <- base::requireNamespace("future", [13:31:12.678] quietly = TRUE) [13:31:12.678] if (has_future) { [13:31:12.678] ns <- base::getNamespace("future") [13:31:12.678] version <- ns[[".package"]][["version"]] [13:31:12.678] if (is.null(version)) [13:31:12.678] version <- utils::packageVersion("future") [13:31:12.678] } [13:31:12.678] else { [13:31:12.678] version <- NULL [13:31:12.678] } [13:31:12.678] if (!has_future || version < "1.8.0") { [13:31:12.678] info <- base::c(r_version = base::gsub("R version ", [13:31:12.678] "", base::R.version$version.string), [13:31:12.678] platform = base::sprintf("%s (%s-bit)", [13:31:12.678] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:12.678] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:12.678] "release", "version")], collapse = " "), [13:31:12.678] hostname = base::Sys.info()[["nodename"]]) [13:31:12.678] info <- base::sprintf("%s: %s", base::names(info), [13:31:12.678] info) [13:31:12.678] info <- base::paste(info, collapse = "; ") [13:31:12.678] if (!has_future) { [13:31:12.678] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:12.678] info) [13:31:12.678] } [13:31:12.678] else { [13:31:12.678] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:12.678] info, version) [13:31:12.678] } [13:31:12.678] base::stop(msg) [13:31:12.678] } [13:31:12.678] }) [13:31:12.678] } [13:31:12.678] ...future.strategy.old <- future::plan("list") [13:31:12.678] options(future.plan = NULL) [13:31:12.678] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.678] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:12.678] } [13:31:12.678] ...future.workdir <- getwd() [13:31:12.678] } [13:31:12.678] ...future.oldOptions <- base::as.list(base::.Options) [13:31:12.678] ...future.oldEnvVars <- base::Sys.getenv() [13:31:12.678] } [13:31:12.678] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:31:12.678] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:12.678] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:31:12.678] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:31:12.678] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:12.678] future.stdout.windows.reencode = NULL, width = 80L) [13:31:12.678] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:12.678] base::names(...future.oldOptions)) [13:31:12.678] } [13:31:12.678] if (FALSE) { [13:31:12.678] } [13:31:12.678] else { [13:31:12.678] if (TRUE) { [13:31:12.678] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:12.678] open = "w") [13:31:12.678] } [13:31:12.678] else { [13:31:12.678] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:12.678] windows = "NUL", "/dev/null"), open = "w") [13:31:12.678] } [13:31:12.678] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:12.678] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:12.678] base::sink(type = "output", split = FALSE) [13:31:12.678] base::close(...future.stdout) [13:31:12.678] }, add = TRUE) [13:31:12.678] } [13:31:12.678] ...future.frame <- base::sys.nframe() [13:31:12.678] ...future.conditions <- base::list() [13:31:12.678] ...future.rng <- base::globalenv()$.Random.seed [13:31:12.678] if (FALSE) { [13:31:12.678] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:12.678] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:12.678] } [13:31:12.678] ...future.result <- base::tryCatch({ [13:31:12.678] base::withCallingHandlers({ [13:31:12.678] ...future.value <- base::withVisible(base::local({ [13:31:12.678] x[["a"]] <- 1 [13:31:12.678] x [13:31:12.678] })) [13:31:12.678] future::FutureResult(value = ...future.value$value, [13:31:12.678] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.678] ...future.rng), globalenv = if (FALSE) [13:31:12.678] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:12.678] ...future.globalenv.names)) [13:31:12.678] else NULL, started = ...future.startTime, version = "1.8") [13:31:12.678] }, condition = base::local({ [13:31:12.678] c <- base::c [13:31:12.678] inherits <- base::inherits [13:31:12.678] invokeRestart <- base::invokeRestart [13:31:12.678] length <- base::length [13:31:12.678] list <- base::list [13:31:12.678] seq.int <- base::seq.int [13:31:12.678] signalCondition <- base::signalCondition [13:31:12.678] sys.calls <- base::sys.calls [13:31:12.678] `[[` <- base::`[[` [13:31:12.678] `+` <- base::`+` [13:31:12.678] `<<-` <- base::`<<-` [13:31:12.678] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:12.678] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:12.678] 3L)] [13:31:12.678] } [13:31:12.678] function(cond) { [13:31:12.678] is_error <- inherits(cond, "error") [13:31:12.678] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:12.678] NULL) [13:31:12.678] if (is_error) { [13:31:12.678] sessionInformation <- function() { [13:31:12.678] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:12.678] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:12.678] search = base::search(), system = base::Sys.info()) [13:31:12.678] } [13:31:12.678] ...future.conditions[[length(...future.conditions) + [13:31:12.678] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:12.678] cond$call), session = sessionInformation(), [13:31:12.678] timestamp = base::Sys.time(), signaled = 0L) [13:31:12.678] signalCondition(cond) [13:31:12.678] } [13:31:12.678] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:12.678] signal <- FALSE && inherits(cond, character(0)) [13:31:12.678] ...future.conditions[[length(...future.conditions) + [13:31:12.678] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:12.678] if (FALSE && !signal) { [13:31:12.678] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.678] { [13:31:12.678] inherits <- base::inherits [13:31:12.678] invokeRestart <- base::invokeRestart [13:31:12.678] is.null <- base::is.null [13:31:12.678] muffled <- FALSE [13:31:12.678] if (inherits(cond, "message")) { [13:31:12.678] muffled <- grepl(pattern, "muffleMessage") [13:31:12.678] if (muffled) [13:31:12.678] invokeRestart("muffleMessage") [13:31:12.678] } [13:31:12.678] else if (inherits(cond, "warning")) { [13:31:12.678] muffled <- grepl(pattern, "muffleWarning") [13:31:12.678] if (muffled) [13:31:12.678] invokeRestart("muffleWarning") [13:31:12.678] } [13:31:12.678] else if (inherits(cond, "condition")) { [13:31:12.678] if (!is.null(pattern)) { [13:31:12.678] computeRestarts <- base::computeRestarts [13:31:12.678] grepl <- base::grepl [13:31:12.678] restarts <- computeRestarts(cond) [13:31:12.678] for (restart in restarts) { [13:31:12.678] name <- restart$name [13:31:12.678] if (is.null(name)) [13:31:12.678] next [13:31:12.678] if (!grepl(pattern, name)) [13:31:12.678] next [13:31:12.678] invokeRestart(restart) [13:31:12.678] muffled <- TRUE [13:31:12.678] break [13:31:12.678] } [13:31:12.678] } [13:31:12.678] } [13:31:12.678] invisible(muffled) [13:31:12.678] } [13:31:12.678] muffleCondition(cond, pattern = "^muffle") [13:31:12.678] } [13:31:12.678] } [13:31:12.678] else { [13:31:12.678] if (TRUE) { [13:31:12.678] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.678] { [13:31:12.678] inherits <- base::inherits [13:31:12.678] invokeRestart <- base::invokeRestart [13:31:12.678] is.null <- base::is.null [13:31:12.678] muffled <- FALSE [13:31:12.678] if (inherits(cond, "message")) { [13:31:12.678] muffled <- grepl(pattern, "muffleMessage") [13:31:12.678] if (muffled) [13:31:12.678] invokeRestart("muffleMessage") [13:31:12.678] } [13:31:12.678] else if (inherits(cond, "warning")) { [13:31:12.678] muffled <- grepl(pattern, "muffleWarning") [13:31:12.678] if (muffled) [13:31:12.678] invokeRestart("muffleWarning") [13:31:12.678] } [13:31:12.678] else if (inherits(cond, "condition")) { [13:31:12.678] if (!is.null(pattern)) { [13:31:12.678] computeRestarts <- base::computeRestarts [13:31:12.678] grepl <- base::grepl [13:31:12.678] restarts <- computeRestarts(cond) [13:31:12.678] for (restart in restarts) { [13:31:12.678] name <- restart$name [13:31:12.678] if (is.null(name)) [13:31:12.678] next [13:31:12.678] if (!grepl(pattern, name)) [13:31:12.678] next [13:31:12.678] invokeRestart(restart) [13:31:12.678] muffled <- TRUE [13:31:12.678] break [13:31:12.678] } [13:31:12.678] } [13:31:12.678] } [13:31:12.678] invisible(muffled) [13:31:12.678] } [13:31:12.678] muffleCondition(cond, pattern = "^muffle") [13:31:12.678] } [13:31:12.678] } [13:31:12.678] } [13:31:12.678] })) [13:31:12.678] }, error = function(ex) { [13:31:12.678] base::structure(base::list(value = NULL, visible = NULL, [13:31:12.678] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.678] ...future.rng), started = ...future.startTime, [13:31:12.678] finished = Sys.time(), session_uuid = NA_character_, [13:31:12.678] version = "1.8"), class = "FutureResult") [13:31:12.678] }, finally = { [13:31:12.678] if (!identical(...future.workdir, getwd())) [13:31:12.678] setwd(...future.workdir) [13:31:12.678] { [13:31:12.678] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:12.678] ...future.oldOptions$nwarnings <- NULL [13:31:12.678] } [13:31:12.678] base::options(...future.oldOptions) [13:31:12.678] if (.Platform$OS.type == "windows") { [13:31:12.678] old_names <- names(...future.oldEnvVars) [13:31:12.678] envs <- base::Sys.getenv() [13:31:12.678] names <- names(envs) [13:31:12.678] common <- intersect(names, old_names) [13:31:12.678] added <- setdiff(names, old_names) [13:31:12.678] removed <- setdiff(old_names, names) [13:31:12.678] changed <- common[...future.oldEnvVars[common] != [13:31:12.678] envs[common]] [13:31:12.678] NAMES <- toupper(changed) [13:31:12.678] args <- list() [13:31:12.678] for (kk in seq_along(NAMES)) { [13:31:12.678] name <- changed[[kk]] [13:31:12.678] NAME <- NAMES[[kk]] [13:31:12.678] if (name != NAME && is.element(NAME, old_names)) [13:31:12.678] next [13:31:12.678] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.678] } [13:31:12.678] NAMES <- toupper(added) [13:31:12.678] for (kk in seq_along(NAMES)) { [13:31:12.678] name <- added[[kk]] [13:31:12.678] NAME <- NAMES[[kk]] [13:31:12.678] if (name != NAME && is.element(NAME, old_names)) [13:31:12.678] next [13:31:12.678] args[[name]] <- "" [13:31:12.678] } [13:31:12.678] NAMES <- toupper(removed) [13:31:12.678] for (kk in seq_along(NAMES)) { [13:31:12.678] name <- removed[[kk]] [13:31:12.678] NAME <- NAMES[[kk]] [13:31:12.678] if (name != NAME && is.element(NAME, old_names)) [13:31:12.678] next [13:31:12.678] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.678] } [13:31:12.678] if (length(args) > 0) [13:31:12.678] base::do.call(base::Sys.setenv, args = args) [13:31:12.678] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:12.678] } [13:31:12.678] else { [13:31:12.678] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:12.678] } [13:31:12.678] { [13:31:12.678] if (base::length(...future.futureOptionsAdded) > [13:31:12.678] 0L) { [13:31:12.678] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:12.678] base::names(opts) <- ...future.futureOptionsAdded [13:31:12.678] base::options(opts) [13:31:12.678] } [13:31:12.678] { [13:31:12.678] NULL [13:31:12.678] options(future.plan = NULL) [13:31:12.678] if (is.na(NA_character_)) [13:31:12.678] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.678] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:12.678] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:12.678] .init = FALSE) [13:31:12.678] } [13:31:12.678] } [13:31:12.678] } [13:31:12.678] }) [13:31:12.678] if (TRUE) { [13:31:12.678] base::sink(type = "output", split = FALSE) [13:31:12.678] if (TRUE) { [13:31:12.678] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:12.678] } [13:31:12.678] else { [13:31:12.678] ...future.result["stdout"] <- base::list(NULL) [13:31:12.678] } [13:31:12.678] base::close(...future.stdout) [13:31:12.678] ...future.stdout <- NULL [13:31:12.678] } [13:31:12.678] ...future.result$conditions <- ...future.conditions [13:31:12.678] ...future.result$finished <- base::Sys.time() [13:31:12.678] ...future.result [13:31:12.678] } [13:31:12.682] - Launch lazy future ... done [13:31:12.682] run() for 'MiraiFuture' ... done > rm(list = "x") > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## Explicit future > x <- list() > f <- future({ + x["a"] <- list(1) + x + }) Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:31:12.684] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:31:12.685] Searching for globals... [13:31:12.687] - globals found: [6] '{', 'x', '<-', '[', '[<-', 'list' [13:31:12.687] Searching for globals ... DONE [13:31:12.687] Resolving globals: TRUE [13:31:12.688] Resolving any globals that are futures ... [13:31:12.688] - globals: [6] '{', 'x', '<-', '[', '[<-', 'list' [13:31:12.688] Resolving any globals that are futures ... DONE [13:31:12.688] Resolving futures part of globals (recursively) ... [13:31:12.689] resolve() on list ... [13:31:12.689] recursive: 99 [13:31:12.689] length: 1 [13:31:12.689] elements: 'x' [13:31:12.689] length: 0 (resolved future 1) [13:31:12.690] resolve() on list ... DONE [13:31:12.690] - globals: [1] 'x' [13:31:12.690] Resolving futures part of globals (recursively) ... DONE [13:31:12.690] The total size of the 1 globals is 0 bytes (0 bytes) [13:31:12.690] The total size of the 1 globals exported for future expression ('{; x["a"] <- list(1); x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:31:12.691] - globals: [1] 'x' [13:31:12.691] [13:31:12.691] getGlobalsAndPackages() ... DONE [13:31:12.691] run() for 'Future' ... [13:31:12.691] - state: 'created' [13:31:12.692] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:12.694] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:12.694] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:12.694] - Field: 'label' [13:31:12.694] - Field: 'local' [13:31:12.695] - Field: 'owner' [13:31:12.695] - Field: 'envir' [13:31:12.695] - Field: 'packages' [13:31:12.695] - Field: 'gc' [13:31:12.695] - Field: 'conditions' [13:31:12.695] - Field: 'expr' [13:31:12.696] - Field: 'uuid' [13:31:12.696] - Field: 'seed' [13:31:12.696] - Field: 'version' [13:31:12.696] - Field: 'result' [13:31:12.696] - Field: 'asynchronous' [13:31:12.696] - Field: 'calls' [13:31:12.697] - Field: 'globals' [13:31:12.697] - Field: 'stdout' [13:31:12.697] - Field: 'earlySignal' [13:31:12.697] - Field: 'lazy' [13:31:12.697] - Field: 'state' [13:31:12.697] - Field: '.cluster' [13:31:12.698] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:12.698] - Launch lazy future ... [13:31:12.698] Packages needed by the future expression (n = 0): [13:31:12.698] Packages needed by future strategies (n = 0): [13:31:12.699] { [13:31:12.699] { [13:31:12.699] { [13:31:12.699] ...future.startTime <- base::Sys.time() [13:31:12.699] { [13:31:12.699] { [13:31:12.699] { [13:31:12.699] base::local({ [13:31:12.699] has_future <- base::requireNamespace("future", [13:31:12.699] quietly = TRUE) [13:31:12.699] if (has_future) { [13:31:12.699] ns <- base::getNamespace("future") [13:31:12.699] version <- ns[[".package"]][["version"]] [13:31:12.699] if (is.null(version)) [13:31:12.699] version <- utils::packageVersion("future") [13:31:12.699] } [13:31:12.699] else { [13:31:12.699] version <- NULL [13:31:12.699] } [13:31:12.699] if (!has_future || version < "1.8.0") { [13:31:12.699] info <- base::c(r_version = base::gsub("R version ", [13:31:12.699] "", base::R.version$version.string), [13:31:12.699] platform = base::sprintf("%s (%s-bit)", [13:31:12.699] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:12.699] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:12.699] "release", "version")], collapse = " "), [13:31:12.699] hostname = base::Sys.info()[["nodename"]]) [13:31:12.699] info <- base::sprintf("%s: %s", base::names(info), [13:31:12.699] info) [13:31:12.699] info <- base::paste(info, collapse = "; ") [13:31:12.699] if (!has_future) { [13:31:12.699] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:12.699] info) [13:31:12.699] } [13:31:12.699] else { [13:31:12.699] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:12.699] info, version) [13:31:12.699] } [13:31:12.699] base::stop(msg) [13:31:12.699] } [13:31:12.699] }) [13:31:12.699] } [13:31:12.699] ...future.strategy.old <- future::plan("list") [13:31:12.699] options(future.plan = NULL) [13:31:12.699] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.699] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:12.699] } [13:31:12.699] ...future.workdir <- getwd() [13:31:12.699] } [13:31:12.699] ...future.oldOptions <- base::as.list(base::.Options) [13:31:12.699] ...future.oldEnvVars <- base::Sys.getenv() [13:31:12.699] } [13:31:12.699] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:31:12.699] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:12.699] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:31:12.699] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:31:12.699] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:12.699] future.stdout.windows.reencode = NULL, width = 80L) [13:31:12.699] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:12.699] base::names(...future.oldOptions)) [13:31:12.699] } [13:31:12.699] if (FALSE) { [13:31:12.699] } [13:31:12.699] else { [13:31:12.699] if (TRUE) { [13:31:12.699] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:12.699] open = "w") [13:31:12.699] } [13:31:12.699] else { [13:31:12.699] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:12.699] windows = "NUL", "/dev/null"), open = "w") [13:31:12.699] } [13:31:12.699] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:12.699] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:12.699] base::sink(type = "output", split = FALSE) [13:31:12.699] base::close(...future.stdout) [13:31:12.699] }, add = TRUE) [13:31:12.699] } [13:31:12.699] ...future.frame <- base::sys.nframe() [13:31:12.699] ...future.conditions <- base::list() [13:31:12.699] ...future.rng <- base::globalenv()$.Random.seed [13:31:12.699] if (FALSE) { [13:31:12.699] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:12.699] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:12.699] } [13:31:12.699] ...future.result <- base::tryCatch({ [13:31:12.699] base::withCallingHandlers({ [13:31:12.699] ...future.value <- base::withVisible(base::local({ [13:31:12.699] x["a"] <- list(1) [13:31:12.699] x [13:31:12.699] })) [13:31:12.699] future::FutureResult(value = ...future.value$value, [13:31:12.699] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.699] ...future.rng), globalenv = if (FALSE) [13:31:12.699] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:12.699] ...future.globalenv.names)) [13:31:12.699] else NULL, started = ...future.startTime, version = "1.8") [13:31:12.699] }, condition = base::local({ [13:31:12.699] c <- base::c [13:31:12.699] inherits <- base::inherits [13:31:12.699] invokeRestart <- base::invokeRestart [13:31:12.699] length <- base::length [13:31:12.699] list <- base::list [13:31:12.699] seq.int <- base::seq.int [13:31:12.699] signalCondition <- base::signalCondition [13:31:12.699] sys.calls <- base::sys.calls [13:31:12.699] `[[` <- base::`[[` [13:31:12.699] `+` <- base::`+` [13:31:12.699] `<<-` <- base::`<<-` [13:31:12.699] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:12.699] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:12.699] 3L)] [13:31:12.699] } [13:31:12.699] function(cond) { [13:31:12.699] is_error <- inherits(cond, "error") [13:31:12.699] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:12.699] NULL) [13:31:12.699] if (is_error) { [13:31:12.699] sessionInformation <- function() { [13:31:12.699] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:12.699] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:12.699] search = base::search(), system = base::Sys.info()) [13:31:12.699] } [13:31:12.699] ...future.conditions[[length(...future.conditions) + [13:31:12.699] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:12.699] cond$call), session = sessionInformation(), [13:31:12.699] timestamp = base::Sys.time(), signaled = 0L) [13:31:12.699] signalCondition(cond) [13:31:12.699] } [13:31:12.699] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:12.699] signal <- FALSE && inherits(cond, character(0)) [13:31:12.699] ...future.conditions[[length(...future.conditions) + [13:31:12.699] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:12.699] if (FALSE && !signal) { [13:31:12.699] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.699] { [13:31:12.699] inherits <- base::inherits [13:31:12.699] invokeRestart <- base::invokeRestart [13:31:12.699] is.null <- base::is.null [13:31:12.699] muffled <- FALSE [13:31:12.699] if (inherits(cond, "message")) { [13:31:12.699] muffled <- grepl(pattern, "muffleMessage") [13:31:12.699] if (muffled) [13:31:12.699] invokeRestart("muffleMessage") [13:31:12.699] } [13:31:12.699] else if (inherits(cond, "warning")) { [13:31:12.699] muffled <- grepl(pattern, "muffleWarning") [13:31:12.699] if (muffled) [13:31:12.699] invokeRestart("muffleWarning") [13:31:12.699] } [13:31:12.699] else if (inherits(cond, "condition")) { [13:31:12.699] if (!is.null(pattern)) { [13:31:12.699] computeRestarts <- base::computeRestarts [13:31:12.699] grepl <- base::grepl [13:31:12.699] restarts <- computeRestarts(cond) [13:31:12.699] for (restart in restarts) { [13:31:12.699] name <- restart$name [13:31:12.699] if (is.null(name)) [13:31:12.699] next [13:31:12.699] if (!grepl(pattern, name)) [13:31:12.699] next [13:31:12.699] invokeRestart(restart) [13:31:12.699] muffled <- TRUE [13:31:12.699] break [13:31:12.699] } [13:31:12.699] } [13:31:12.699] } [13:31:12.699] invisible(muffled) [13:31:12.699] } [13:31:12.699] muffleCondition(cond, pattern = "^muffle") [13:31:12.699] } [13:31:12.699] } [13:31:12.699] else { [13:31:12.699] if (TRUE) { [13:31:12.699] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.699] { [13:31:12.699] inherits <- base::inherits [13:31:12.699] invokeRestart <- base::invokeRestart [13:31:12.699] is.null <- base::is.null [13:31:12.699] muffled <- FALSE [13:31:12.699] if (inherits(cond, "message")) { [13:31:12.699] muffled <- grepl(pattern, "muffleMessage") [13:31:12.699] if (muffled) [13:31:12.699] invokeRestart("muffleMessage") [13:31:12.699] } [13:31:12.699] else if (inherits(cond, "warning")) { [13:31:12.699] muffled <- grepl(pattern, "muffleWarning") [13:31:12.699] if (muffled) [13:31:12.699] invokeRestart("muffleWarning") [13:31:12.699] } [13:31:12.699] else if (inherits(cond, "condition")) { [13:31:12.699] if (!is.null(pattern)) { [13:31:12.699] computeRestarts <- base::computeRestarts [13:31:12.699] grepl <- base::grepl [13:31:12.699] restarts <- computeRestarts(cond) [13:31:12.699] for (restart in restarts) { [13:31:12.699] name <- restart$name [13:31:12.699] if (is.null(name)) [13:31:12.699] next [13:31:12.699] if (!grepl(pattern, name)) [13:31:12.699] next [13:31:12.699] invokeRestart(restart) [13:31:12.699] muffled <- TRUE [13:31:12.699] break [13:31:12.699] } [13:31:12.699] } [13:31:12.699] } [13:31:12.699] invisible(muffled) [13:31:12.699] } [13:31:12.699] muffleCondition(cond, pattern = "^muffle") [13:31:12.699] } [13:31:12.699] } [13:31:12.699] } [13:31:12.699] })) [13:31:12.699] }, error = function(ex) { [13:31:12.699] base::structure(base::list(value = NULL, visible = NULL, [13:31:12.699] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.699] ...future.rng), started = ...future.startTime, [13:31:12.699] finished = Sys.time(), session_uuid = NA_character_, [13:31:12.699] version = "1.8"), class = "FutureResult") [13:31:12.699] }, finally = { [13:31:12.699] if (!identical(...future.workdir, getwd())) [13:31:12.699] setwd(...future.workdir) [13:31:12.699] { [13:31:12.699] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:12.699] ...future.oldOptions$nwarnings <- NULL [13:31:12.699] } [13:31:12.699] base::options(...future.oldOptions) [13:31:12.699] if (.Platform$OS.type == "windows") { [13:31:12.699] old_names <- names(...future.oldEnvVars) [13:31:12.699] envs <- base::Sys.getenv() [13:31:12.699] names <- names(envs) [13:31:12.699] common <- intersect(names, old_names) [13:31:12.699] added <- setdiff(names, old_names) [13:31:12.699] removed <- setdiff(old_names, names) [13:31:12.699] changed <- common[...future.oldEnvVars[common] != [13:31:12.699] envs[common]] [13:31:12.699] NAMES <- toupper(changed) [13:31:12.699] args <- list() [13:31:12.699] for (kk in seq_along(NAMES)) { [13:31:12.699] name <- changed[[kk]] [13:31:12.699] NAME <- NAMES[[kk]] [13:31:12.699] if (name != NAME && is.element(NAME, old_names)) [13:31:12.699] next [13:31:12.699] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.699] } [13:31:12.699] NAMES <- toupper(added) [13:31:12.699] for (kk in seq_along(NAMES)) { [13:31:12.699] name <- added[[kk]] [13:31:12.699] NAME <- NAMES[[kk]] [13:31:12.699] if (name != NAME && is.element(NAME, old_names)) [13:31:12.699] next [13:31:12.699] args[[name]] <- "" [13:31:12.699] } [13:31:12.699] NAMES <- toupper(removed) [13:31:12.699] for (kk in seq_along(NAMES)) { [13:31:12.699] name <- removed[[kk]] [13:31:12.699] NAME <- NAMES[[kk]] [13:31:12.699] if (name != NAME && is.element(NAME, old_names)) [13:31:12.699] next [13:31:12.699] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.699] } [13:31:12.699] if (length(args) > 0) [13:31:12.699] base::do.call(base::Sys.setenv, args = args) [13:31:12.699] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:12.699] } [13:31:12.699] else { [13:31:12.699] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:12.699] } [13:31:12.699] { [13:31:12.699] if (base::length(...future.futureOptionsAdded) > [13:31:12.699] 0L) { [13:31:12.699] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:12.699] base::names(opts) <- ...future.futureOptionsAdded [13:31:12.699] base::options(opts) [13:31:12.699] } [13:31:12.699] { [13:31:12.699] NULL [13:31:12.699] options(future.plan = NULL) [13:31:12.699] if (is.na(NA_character_)) [13:31:12.699] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.699] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:12.699] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:12.699] .init = FALSE) [13:31:12.699] } [13:31:12.699] } [13:31:12.699] } [13:31:12.699] }) [13:31:12.699] if (TRUE) { [13:31:12.699] base::sink(type = "output", split = FALSE) [13:31:12.699] if (TRUE) { [13:31:12.699] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:12.699] } [13:31:12.699] else { [13:31:12.699] ...future.result["stdout"] <- base::list(NULL) [13:31:12.699] } [13:31:12.699] base::close(...future.stdout) [13:31:12.699] ...future.stdout <- NULL [13:31:12.699] } [13:31:12.699] ...future.result$conditions <- ...future.conditions [13:31:12.699] ...future.result$finished <- base::Sys.time() [13:31:12.699] ...future.result [13:31:12.699] } [13:31:12.702] - Launch lazy future ... done [13:31:12.703] run() for 'MiraiFuture' ... done > rm(list = "x") > y <- value(f) > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## Future assignment > x <- list() > y %<-% { + x["a"] <- list(1) + x + } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:31:12.705] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:31:12.705] Searching for globals... [13:31:12.708] - globals found: [6] '{', 'x', '<-', '[', '[<-', 'list' [13:31:12.708] Searching for globals ... DONE [13:31:12.708] Resolving globals: TRUE [13:31:12.708] Resolving any globals that are futures ... [13:31:12.708] - globals: [6] '{', 'x', '<-', '[', '[<-', 'list' [13:31:12.709] Resolving any globals that are futures ... DONE [13:31:12.709] Resolving futures part of globals (recursively) ... [13:31:12.709] resolve() on list ... [13:31:12.710] recursive: 99 [13:31:12.710] length: 1 [13:31:12.710] elements: 'x' [13:31:12.710] length: 0 (resolved future 1) [13:31:12.710] resolve() on list ... DONE [13:31:12.710] - globals: [1] 'x' [13:31:12.711] Resolving futures part of globals (recursively) ... DONE [13:31:12.711] The total size of the 1 globals is 0 bytes (0 bytes) [13:31:12.712] The total size of the 1 globals exported for future expression ('{; x["a"] <- list(1); x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:31:12.712] - globals: [1] 'x' [13:31:12.713] [13:31:12.713] getGlobalsAndPackages() ... DONE [13:31:12.713] run() for 'Future' ... [13:31:12.713] - state: 'created' [13:31:12.713] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:12.716] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:12.716] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:12.716] - Field: 'label' [13:31:12.716] - Field: 'local' [13:31:12.716] - Field: 'owner' [13:31:12.717] - Field: 'envir' [13:31:12.717] - Field: 'packages' [13:31:12.717] - Field: 'gc' [13:31:12.717] - Field: 'conditions' [13:31:12.717] - Field: 'expr' [13:31:12.717] - Field: 'uuid' [13:31:12.718] - Field: 'seed' [13:31:12.718] - Field: 'version' [13:31:12.718] - Field: 'result' [13:31:12.718] - Field: 'asynchronous' [13:31:12.718] - Field: 'calls' [13:31:12.718] - Field: 'globals' [13:31:12.719] - Field: 'stdout' [13:31:12.719] - Field: 'earlySignal' [13:31:12.719] - Field: 'lazy' [13:31:12.719] - Field: 'state' [13:31:12.719] - Field: '.cluster' [13:31:12.719] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:12.720] - Launch lazy future ... [13:31:12.720] Packages needed by the future expression (n = 0): [13:31:12.720] Packages needed by future strategies (n = 0): [13:31:12.720] { [13:31:12.720] { [13:31:12.720] { [13:31:12.720] ...future.startTime <- base::Sys.time() [13:31:12.720] { [13:31:12.720] { [13:31:12.720] { [13:31:12.720] base::local({ [13:31:12.720] has_future <- base::requireNamespace("future", [13:31:12.720] quietly = TRUE) [13:31:12.720] if (has_future) { [13:31:12.720] ns <- base::getNamespace("future") [13:31:12.720] version <- ns[[".package"]][["version"]] [13:31:12.720] if (is.null(version)) [13:31:12.720] version <- utils::packageVersion("future") [13:31:12.720] } [13:31:12.720] else { [13:31:12.720] version <- NULL [13:31:12.720] } [13:31:12.720] if (!has_future || version < "1.8.0") { [13:31:12.720] info <- base::c(r_version = base::gsub("R version ", [13:31:12.720] "", base::R.version$version.string), [13:31:12.720] platform = base::sprintf("%s (%s-bit)", [13:31:12.720] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:12.720] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:12.720] "release", "version")], collapse = " "), [13:31:12.720] hostname = base::Sys.info()[["nodename"]]) [13:31:12.720] info <- base::sprintf("%s: %s", base::names(info), [13:31:12.720] info) [13:31:12.720] info <- base::paste(info, collapse = "; ") [13:31:12.720] if (!has_future) { [13:31:12.720] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:12.720] info) [13:31:12.720] } [13:31:12.720] else { [13:31:12.720] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:12.720] info, version) [13:31:12.720] } [13:31:12.720] base::stop(msg) [13:31:12.720] } [13:31:12.720] }) [13:31:12.720] } [13:31:12.720] ...future.strategy.old <- future::plan("list") [13:31:12.720] options(future.plan = NULL) [13:31:12.720] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.720] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:12.720] } [13:31:12.720] ...future.workdir <- getwd() [13:31:12.720] } [13:31:12.720] ...future.oldOptions <- base::as.list(base::.Options) [13:31:12.720] ...future.oldEnvVars <- base::Sys.getenv() [13:31:12.720] } [13:31:12.720] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:31:12.720] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:12.720] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:31:12.720] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:31:12.720] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:12.720] future.stdout.windows.reencode = NULL, width = 80L) [13:31:12.720] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:12.720] base::names(...future.oldOptions)) [13:31:12.720] } [13:31:12.720] if (FALSE) { [13:31:12.720] } [13:31:12.720] else { [13:31:12.720] if (TRUE) { [13:31:12.720] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:12.720] open = "w") [13:31:12.720] } [13:31:12.720] else { [13:31:12.720] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:12.720] windows = "NUL", "/dev/null"), open = "w") [13:31:12.720] } [13:31:12.720] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:12.720] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:12.720] base::sink(type = "output", split = FALSE) [13:31:12.720] base::close(...future.stdout) [13:31:12.720] }, add = TRUE) [13:31:12.720] } [13:31:12.720] ...future.frame <- base::sys.nframe() [13:31:12.720] ...future.conditions <- base::list() [13:31:12.720] ...future.rng <- base::globalenv()$.Random.seed [13:31:12.720] if (FALSE) { [13:31:12.720] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:12.720] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:12.720] } [13:31:12.720] ...future.result <- base::tryCatch({ [13:31:12.720] base::withCallingHandlers({ [13:31:12.720] ...future.value <- base::withVisible(base::local({ [13:31:12.720] x["a"] <- list(1) [13:31:12.720] x [13:31:12.720] })) [13:31:12.720] future::FutureResult(value = ...future.value$value, [13:31:12.720] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.720] ...future.rng), globalenv = if (FALSE) [13:31:12.720] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:12.720] ...future.globalenv.names)) [13:31:12.720] else NULL, started = ...future.startTime, version = "1.8") [13:31:12.720] }, condition = base::local({ [13:31:12.720] c <- base::c [13:31:12.720] inherits <- base::inherits [13:31:12.720] invokeRestart <- base::invokeRestart [13:31:12.720] length <- base::length [13:31:12.720] list <- base::list [13:31:12.720] seq.int <- base::seq.int [13:31:12.720] signalCondition <- base::signalCondition [13:31:12.720] sys.calls <- base::sys.calls [13:31:12.720] `[[` <- base::`[[` [13:31:12.720] `+` <- base::`+` [13:31:12.720] `<<-` <- base::`<<-` [13:31:12.720] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:12.720] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:12.720] 3L)] [13:31:12.720] } [13:31:12.720] function(cond) { [13:31:12.720] is_error <- inherits(cond, "error") [13:31:12.720] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:12.720] NULL) [13:31:12.720] if (is_error) { [13:31:12.720] sessionInformation <- function() { [13:31:12.720] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:12.720] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:12.720] search = base::search(), system = base::Sys.info()) [13:31:12.720] } [13:31:12.720] ...future.conditions[[length(...future.conditions) + [13:31:12.720] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:12.720] cond$call), session = sessionInformation(), [13:31:12.720] timestamp = base::Sys.time(), signaled = 0L) [13:31:12.720] signalCondition(cond) [13:31:12.720] } [13:31:12.720] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:12.720] signal <- FALSE && inherits(cond, character(0)) [13:31:12.720] ...future.conditions[[length(...future.conditions) + [13:31:12.720] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:12.720] if (FALSE && !signal) { [13:31:12.720] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.720] { [13:31:12.720] inherits <- base::inherits [13:31:12.720] invokeRestart <- base::invokeRestart [13:31:12.720] is.null <- base::is.null [13:31:12.720] muffled <- FALSE [13:31:12.720] if (inherits(cond, "message")) { [13:31:12.720] muffled <- grepl(pattern, "muffleMessage") [13:31:12.720] if (muffled) [13:31:12.720] invokeRestart("muffleMessage") [13:31:12.720] } [13:31:12.720] else if (inherits(cond, "warning")) { [13:31:12.720] muffled <- grepl(pattern, "muffleWarning") [13:31:12.720] if (muffled) [13:31:12.720] invokeRestart("muffleWarning") [13:31:12.720] } [13:31:12.720] else if (inherits(cond, "condition")) { [13:31:12.720] if (!is.null(pattern)) { [13:31:12.720] computeRestarts <- base::computeRestarts [13:31:12.720] grepl <- base::grepl [13:31:12.720] restarts <- computeRestarts(cond) [13:31:12.720] for (restart in restarts) { [13:31:12.720] name <- restart$name [13:31:12.720] if (is.null(name)) [13:31:12.720] next [13:31:12.720] if (!grepl(pattern, name)) [13:31:12.720] next [13:31:12.720] invokeRestart(restart) [13:31:12.720] muffled <- TRUE [13:31:12.720] break [13:31:12.720] } [13:31:12.720] } [13:31:12.720] } [13:31:12.720] invisible(muffled) [13:31:12.720] } [13:31:12.720] muffleCondition(cond, pattern = "^muffle") [13:31:12.720] } [13:31:12.720] } [13:31:12.720] else { [13:31:12.720] if (TRUE) { [13:31:12.720] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.720] { [13:31:12.720] inherits <- base::inherits [13:31:12.720] invokeRestart <- base::invokeRestart [13:31:12.720] is.null <- base::is.null [13:31:12.720] muffled <- FALSE [13:31:12.720] if (inherits(cond, "message")) { [13:31:12.720] muffled <- grepl(pattern, "muffleMessage") [13:31:12.720] if (muffled) [13:31:12.720] invokeRestart("muffleMessage") [13:31:12.720] } [13:31:12.720] else if (inherits(cond, "warning")) { [13:31:12.720] muffled <- grepl(pattern, "muffleWarning") [13:31:12.720] if (muffled) [13:31:12.720] invokeRestart("muffleWarning") [13:31:12.720] } [13:31:12.720] else if (inherits(cond, "condition")) { [13:31:12.720] if (!is.null(pattern)) { [13:31:12.720] computeRestarts <- base::computeRestarts [13:31:12.720] grepl <- base::grepl [13:31:12.720] restarts <- computeRestarts(cond) [13:31:12.720] for (restart in restarts) { [13:31:12.720] name <- restart$name [13:31:12.720] if (is.null(name)) [13:31:12.720] next [13:31:12.720] if (!grepl(pattern, name)) [13:31:12.720] next [13:31:12.720] invokeRestart(restart) [13:31:12.720] muffled <- TRUE [13:31:12.720] break [13:31:12.720] } [13:31:12.720] } [13:31:12.720] } [13:31:12.720] invisible(muffled) [13:31:12.720] } [13:31:12.720] muffleCondition(cond, pattern = "^muffle") [13:31:12.720] } [13:31:12.720] } [13:31:12.720] } [13:31:12.720] })) [13:31:12.720] }, error = function(ex) { [13:31:12.720] base::structure(base::list(value = NULL, visible = NULL, [13:31:12.720] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.720] ...future.rng), started = ...future.startTime, [13:31:12.720] finished = Sys.time(), session_uuid = NA_character_, [13:31:12.720] version = "1.8"), class = "FutureResult") [13:31:12.720] }, finally = { [13:31:12.720] if (!identical(...future.workdir, getwd())) [13:31:12.720] setwd(...future.workdir) [13:31:12.720] { [13:31:12.720] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:12.720] ...future.oldOptions$nwarnings <- NULL [13:31:12.720] } [13:31:12.720] base::options(...future.oldOptions) [13:31:12.720] if (.Platform$OS.type == "windows") { [13:31:12.720] old_names <- names(...future.oldEnvVars) [13:31:12.720] envs <- base::Sys.getenv() [13:31:12.720] names <- names(envs) [13:31:12.720] common <- intersect(names, old_names) [13:31:12.720] added <- setdiff(names, old_names) [13:31:12.720] removed <- setdiff(old_names, names) [13:31:12.720] changed <- common[...future.oldEnvVars[common] != [13:31:12.720] envs[common]] [13:31:12.720] NAMES <- toupper(changed) [13:31:12.720] args <- list() [13:31:12.720] for (kk in seq_along(NAMES)) { [13:31:12.720] name <- changed[[kk]] [13:31:12.720] NAME <- NAMES[[kk]] [13:31:12.720] if (name != NAME && is.element(NAME, old_names)) [13:31:12.720] next [13:31:12.720] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.720] } [13:31:12.720] NAMES <- toupper(added) [13:31:12.720] for (kk in seq_along(NAMES)) { [13:31:12.720] name <- added[[kk]] [13:31:12.720] NAME <- NAMES[[kk]] [13:31:12.720] if (name != NAME && is.element(NAME, old_names)) [13:31:12.720] next [13:31:12.720] args[[name]] <- "" [13:31:12.720] } [13:31:12.720] NAMES <- toupper(removed) [13:31:12.720] for (kk in seq_along(NAMES)) { [13:31:12.720] name <- removed[[kk]] [13:31:12.720] NAME <- NAMES[[kk]] [13:31:12.720] if (name != NAME && is.element(NAME, old_names)) [13:31:12.720] next [13:31:12.720] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.720] } [13:31:12.720] if (length(args) > 0) [13:31:12.720] base::do.call(base::Sys.setenv, args = args) [13:31:12.720] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:12.720] } [13:31:12.720] else { [13:31:12.720] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:12.720] } [13:31:12.720] { [13:31:12.720] if (base::length(...future.futureOptionsAdded) > [13:31:12.720] 0L) { [13:31:12.720] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:12.720] base::names(opts) <- ...future.futureOptionsAdded [13:31:12.720] base::options(opts) [13:31:12.720] } [13:31:12.720] { [13:31:12.720] NULL [13:31:12.720] options(future.plan = NULL) [13:31:12.720] if (is.na(NA_character_)) [13:31:12.720] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.720] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:12.720] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:12.720] .init = FALSE) [13:31:12.720] } [13:31:12.720] } [13:31:12.720] } [13:31:12.720] }) [13:31:12.720] if (TRUE) { [13:31:12.720] base::sink(type = "output", split = FALSE) [13:31:12.720] if (TRUE) { [13:31:12.720] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:12.720] } [13:31:12.720] else { [13:31:12.720] ...future.result["stdout"] <- base::list(NULL) [13:31:12.720] } [13:31:12.720] base::close(...future.stdout) [13:31:12.720] ...future.stdout <- NULL [13:31:12.720] } [13:31:12.720] ...future.result$conditions <- ...future.conditions [13:31:12.720] ...future.result$finished <- base::Sys.time() [13:31:12.720] ...future.result [13:31:12.720] } [13:31:12.724] - Launch lazy future ... done [13:31:12.724] run() for 'MiraiFuture' ... done > rm(list = "x") > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## Future assignment > x <- list() > name <- "a" > y %<-% { + x[name] <- list(1) + x + } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:31:12.727] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:31:12.727] Searching for globals... [13:31:12.730] - globals found: [7] '{', 'x', '<-', '[', 'name', '[<-', 'list' [13:31:12.730] Searching for globals ... DONE [13:31:12.730] Resolving globals: TRUE [13:31:12.730] Resolving any globals that are futures ... [13:31:12.730] - globals: [7] '{', 'x', '<-', '[', 'name', '[<-', 'list' [13:31:12.731] Resolving any globals that are futures ... DONE [13:31:12.731] Resolving futures part of globals (recursively) ... [13:31:12.731] resolve() on list ... [13:31:12.732] recursive: 99 [13:31:12.732] length: 2 [13:31:12.732] elements: 'x', 'name' [13:31:12.732] length: 1 (resolved future 1) [13:31:12.732] length: 0 (resolved future 2) [13:31:12.732] resolve() on list ... DONE [13:31:12.733] - globals: [2] 'x', 'name' [13:31:12.733] Resolving futures part of globals (recursively) ... DONE [13:31:12.733] The total size of the 2 globals is 112 bytes (112 bytes) [13:31:12.733] The total size of the 2 globals exported for future expression ('{; x[name] <- list(1); x; }') is 112 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are two globals: 'name' (112 bytes of class 'character') and 'x' (0 bytes of class 'list') [13:31:12.734] - globals: [2] 'x', 'name' [13:31:12.734] [13:31:12.734] getGlobalsAndPackages() ... DONE [13:31:12.734] run() for 'Future' ... [13:31:12.734] - state: 'created' [13:31:12.735] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:12.737] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:12.737] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:12.737] - Field: 'label' [13:31:12.737] - Field: 'local' [13:31:12.738] - Field: 'owner' [13:31:12.738] - Field: 'envir' [13:31:12.738] - Field: 'packages' [13:31:12.738] - Field: 'gc' [13:31:12.738] - Field: 'conditions' [13:31:12.738] - Field: 'expr' [13:31:12.739] - Field: 'uuid' [13:31:12.739] - Field: 'seed' [13:31:12.739] - Field: 'version' [13:31:12.739] - Field: 'result' [13:31:12.739] - Field: 'asynchronous' [13:31:12.739] - Field: 'calls' [13:31:12.740] - Field: 'globals' [13:31:12.740] - Field: 'stdout' [13:31:12.740] - Field: 'earlySignal' [13:31:12.740] - Field: 'lazy' [13:31:12.740] - Field: 'state' [13:31:12.741] - Field: '.cluster' [13:31:12.741] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:12.741] - Launch lazy future ... [13:31:12.741] Packages needed by the future expression (n = 0): [13:31:12.741] Packages needed by future strategies (n = 0): [13:31:12.742] { [13:31:12.742] { [13:31:12.742] { [13:31:12.742] ...future.startTime <- base::Sys.time() [13:31:12.742] { [13:31:12.742] { [13:31:12.742] { [13:31:12.742] base::local({ [13:31:12.742] has_future <- base::requireNamespace("future", [13:31:12.742] quietly = TRUE) [13:31:12.742] if (has_future) { [13:31:12.742] ns <- base::getNamespace("future") [13:31:12.742] version <- ns[[".package"]][["version"]] [13:31:12.742] if (is.null(version)) [13:31:12.742] version <- utils::packageVersion("future") [13:31:12.742] } [13:31:12.742] else { [13:31:12.742] version <- NULL [13:31:12.742] } [13:31:12.742] if (!has_future || version < "1.8.0") { [13:31:12.742] info <- base::c(r_version = base::gsub("R version ", [13:31:12.742] "", base::R.version$version.string), [13:31:12.742] platform = base::sprintf("%s (%s-bit)", [13:31:12.742] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:12.742] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:12.742] "release", "version")], collapse = " "), [13:31:12.742] hostname = base::Sys.info()[["nodename"]]) [13:31:12.742] info <- base::sprintf("%s: %s", base::names(info), [13:31:12.742] info) [13:31:12.742] info <- base::paste(info, collapse = "; ") [13:31:12.742] if (!has_future) { [13:31:12.742] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:12.742] info) [13:31:12.742] } [13:31:12.742] else { [13:31:12.742] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:12.742] info, version) [13:31:12.742] } [13:31:12.742] base::stop(msg) [13:31:12.742] } [13:31:12.742] }) [13:31:12.742] } [13:31:12.742] ...future.strategy.old <- future::plan("list") [13:31:12.742] options(future.plan = NULL) [13:31:12.742] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.742] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:12.742] } [13:31:12.742] ...future.workdir <- getwd() [13:31:12.742] } [13:31:12.742] ...future.oldOptions <- base::as.list(base::.Options) [13:31:12.742] ...future.oldEnvVars <- base::Sys.getenv() [13:31:12.742] } [13:31:12.742] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:31:12.742] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:12.742] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:31:12.742] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:31:12.742] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:12.742] future.stdout.windows.reencode = NULL, width = 80L) [13:31:12.742] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:12.742] base::names(...future.oldOptions)) [13:31:12.742] } [13:31:12.742] if (FALSE) { [13:31:12.742] } [13:31:12.742] else { [13:31:12.742] if (TRUE) { [13:31:12.742] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:12.742] open = "w") [13:31:12.742] } [13:31:12.742] else { [13:31:12.742] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:12.742] windows = "NUL", "/dev/null"), open = "w") [13:31:12.742] } [13:31:12.742] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:12.742] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:12.742] base::sink(type = "output", split = FALSE) [13:31:12.742] base::close(...future.stdout) [13:31:12.742] }, add = TRUE) [13:31:12.742] } [13:31:12.742] ...future.frame <- base::sys.nframe() [13:31:12.742] ...future.conditions <- base::list() [13:31:12.742] ...future.rng <- base::globalenv()$.Random.seed [13:31:12.742] if (FALSE) { [13:31:12.742] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:12.742] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:12.742] } [13:31:12.742] ...future.result <- base::tryCatch({ [13:31:12.742] base::withCallingHandlers({ [13:31:12.742] ...future.value <- base::withVisible(base::local({ [13:31:12.742] x[name] <- list(1) [13:31:12.742] x [13:31:12.742] })) [13:31:12.742] future::FutureResult(value = ...future.value$value, [13:31:12.742] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.742] ...future.rng), globalenv = if (FALSE) [13:31:12.742] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:12.742] ...future.globalenv.names)) [13:31:12.742] else NULL, started = ...future.startTime, version = "1.8") [13:31:12.742] }, condition = base::local({ [13:31:12.742] c <- base::c [13:31:12.742] inherits <- base::inherits [13:31:12.742] invokeRestart <- base::invokeRestart [13:31:12.742] length <- base::length [13:31:12.742] list <- base::list [13:31:12.742] seq.int <- base::seq.int [13:31:12.742] signalCondition <- base::signalCondition [13:31:12.742] sys.calls <- base::sys.calls [13:31:12.742] `[[` <- base::`[[` [13:31:12.742] `+` <- base::`+` [13:31:12.742] `<<-` <- base::`<<-` [13:31:12.742] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:12.742] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:12.742] 3L)] [13:31:12.742] } [13:31:12.742] function(cond) { [13:31:12.742] is_error <- inherits(cond, "error") [13:31:12.742] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:12.742] NULL) [13:31:12.742] if (is_error) { [13:31:12.742] sessionInformation <- function() { [13:31:12.742] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:12.742] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:12.742] search = base::search(), system = base::Sys.info()) [13:31:12.742] } [13:31:12.742] ...future.conditions[[length(...future.conditions) + [13:31:12.742] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:12.742] cond$call), session = sessionInformation(), [13:31:12.742] timestamp = base::Sys.time(), signaled = 0L) [13:31:12.742] signalCondition(cond) [13:31:12.742] } [13:31:12.742] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:12.742] signal <- FALSE && inherits(cond, character(0)) [13:31:12.742] ...future.conditions[[length(...future.conditions) + [13:31:12.742] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:12.742] if (FALSE && !signal) { [13:31:12.742] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.742] { [13:31:12.742] inherits <- base::inherits [13:31:12.742] invokeRestart <- base::invokeRestart [13:31:12.742] is.null <- base::is.null [13:31:12.742] muffled <- FALSE [13:31:12.742] if (inherits(cond, "message")) { [13:31:12.742] muffled <- grepl(pattern, "muffleMessage") [13:31:12.742] if (muffled) [13:31:12.742] invokeRestart("muffleMessage") [13:31:12.742] } [13:31:12.742] else if (inherits(cond, "warning")) { [13:31:12.742] muffled <- grepl(pattern, "muffleWarning") [13:31:12.742] if (muffled) [13:31:12.742] invokeRestart("muffleWarning") [13:31:12.742] } [13:31:12.742] else if (inherits(cond, "condition")) { [13:31:12.742] if (!is.null(pattern)) { [13:31:12.742] computeRestarts <- base::computeRestarts [13:31:12.742] grepl <- base::grepl [13:31:12.742] restarts <- computeRestarts(cond) [13:31:12.742] for (restart in restarts) { [13:31:12.742] name <- restart$name [13:31:12.742] if (is.null(name)) [13:31:12.742] next [13:31:12.742] if (!grepl(pattern, name)) [13:31:12.742] next [13:31:12.742] invokeRestart(restart) [13:31:12.742] muffled <- TRUE [13:31:12.742] break [13:31:12.742] } [13:31:12.742] } [13:31:12.742] } [13:31:12.742] invisible(muffled) [13:31:12.742] } [13:31:12.742] muffleCondition(cond, pattern = "^muffle") [13:31:12.742] } [13:31:12.742] } [13:31:12.742] else { [13:31:12.742] if (TRUE) { [13:31:12.742] muffleCondition <- function (cond, pattern = "^muffle") [13:31:12.742] { [13:31:12.742] inherits <- base::inherits [13:31:12.742] invokeRestart <- base::invokeRestart [13:31:12.742] is.null <- base::is.null [13:31:12.742] muffled <- FALSE [13:31:12.742] if (inherits(cond, "message")) { [13:31:12.742] muffled <- grepl(pattern, "muffleMessage") [13:31:12.742] if (muffled) [13:31:12.742] invokeRestart("muffleMessage") [13:31:12.742] } [13:31:12.742] else if (inherits(cond, "warning")) { [13:31:12.742] muffled <- grepl(pattern, "muffleWarning") [13:31:12.742] if (muffled) [13:31:12.742] invokeRestart("muffleWarning") [13:31:12.742] } [13:31:12.742] else if (inherits(cond, "condition")) { [13:31:12.742] if (!is.null(pattern)) { [13:31:12.742] computeRestarts <- base::computeRestarts [13:31:12.742] grepl <- base::grepl [13:31:12.742] restarts <- computeRestarts(cond) [13:31:12.742] for (restart in restarts) { [13:31:12.742] name <- restart$name [13:31:12.742] if (is.null(name)) [13:31:12.742] next [13:31:12.742] if (!grepl(pattern, name)) [13:31:12.742] next [13:31:12.742] invokeRestart(restart) [13:31:12.742] muffled <- TRUE [13:31:12.742] break [13:31:12.742] } [13:31:12.742] } [13:31:12.742] } [13:31:12.742] invisible(muffled) [13:31:12.742] } [13:31:12.742] muffleCondition(cond, pattern = "^muffle") [13:31:12.742] } [13:31:12.742] } [13:31:12.742] } [13:31:12.742] })) [13:31:12.742] }, error = function(ex) { [13:31:12.742] base::structure(base::list(value = NULL, visible = NULL, [13:31:12.742] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:12.742] ...future.rng), started = ...future.startTime, [13:31:12.742] finished = Sys.time(), session_uuid = NA_character_, [13:31:12.742] version = "1.8"), class = "FutureResult") [13:31:12.742] }, finally = { [13:31:12.742] if (!identical(...future.workdir, getwd())) [13:31:12.742] setwd(...future.workdir) [13:31:12.742] { [13:31:12.742] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:12.742] ...future.oldOptions$nwarnings <- NULL [13:31:12.742] } [13:31:12.742] base::options(...future.oldOptions) [13:31:12.742] if (.Platform$OS.type == "windows") { [13:31:12.742] old_names <- names(...future.oldEnvVars) [13:31:12.742] envs <- base::Sys.getenv() [13:31:12.742] names <- names(envs) [13:31:12.742] common <- intersect(names, old_names) [13:31:12.742] added <- setdiff(names, old_names) [13:31:12.742] removed <- setdiff(old_names, names) [13:31:12.742] changed <- common[...future.oldEnvVars[common] != [13:31:12.742] envs[common]] [13:31:12.742] NAMES <- toupper(changed) [13:31:12.742] args <- list() [13:31:12.742] for (kk in seq_along(NAMES)) { [13:31:12.742] name <- changed[[kk]] [13:31:12.742] NAME <- NAMES[[kk]] [13:31:12.742] if (name != NAME && is.element(NAME, old_names)) [13:31:12.742] next [13:31:12.742] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.742] } [13:31:12.742] NAMES <- toupper(added) [13:31:12.742] for (kk in seq_along(NAMES)) { [13:31:12.742] name <- added[[kk]] [13:31:12.742] NAME <- NAMES[[kk]] [13:31:12.742] if (name != NAME && is.element(NAME, old_names)) [13:31:12.742] next [13:31:12.742] args[[name]] <- "" [13:31:12.742] } [13:31:12.742] NAMES <- toupper(removed) [13:31:12.742] for (kk in seq_along(NAMES)) { [13:31:12.742] name <- removed[[kk]] [13:31:12.742] NAME <- NAMES[[kk]] [13:31:12.742] if (name != NAME && is.element(NAME, old_names)) [13:31:12.742] next [13:31:12.742] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:12.742] } [13:31:12.742] if (length(args) > 0) [13:31:12.742] base::do.call(base::Sys.setenv, args = args) [13:31:12.742] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:12.742] } [13:31:12.742] else { [13:31:12.742] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:12.742] } [13:31:12.742] { [13:31:12.742] if (base::length(...future.futureOptionsAdded) > [13:31:12.742] 0L) { [13:31:12.742] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:12.742] base::names(opts) <- ...future.futureOptionsAdded [13:31:12.742] base::options(opts) [13:31:12.742] } [13:31:12.742] { [13:31:12.742] NULL [13:31:12.742] options(future.plan = NULL) [13:31:12.742] if (is.na(NA_character_)) [13:31:12.742] Sys.unsetenv("R_FUTURE_PLAN") [13:31:12.742] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:12.742] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:12.742] .init = FALSE) [13:31:12.742] } [13:31:12.742] } [13:31:12.742] } [13:31:12.742] }) [13:31:12.742] if (TRUE) { [13:31:12.742] base::sink(type = "output", split = FALSE) [13:31:12.742] if (TRUE) { [13:31:12.742] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:12.742] } [13:31:12.742] else { [13:31:12.742] ...future.result["stdout"] <- base::list(NULL) [13:31:12.742] } [13:31:12.742] base::close(...future.stdout) [13:31:12.742] ...future.stdout <- NULL [13:31:12.742] } [13:31:12.742] ...future.result$conditions <- ...future.conditions [13:31:12.742] ...future.result$finished <- base::Sys.time() [13:31:12.742] ...future.result [13:31:12.742] } [13:31:12.746] - Launch lazy future ... done [13:31:12.746] run() for 'MiraiFuture' ... done > rm(list = c("x", "name")) > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > message("*** Globals - subassignments w/ x$a <- value ... DONE") *** Globals - subassignments w/ x$a <- value ... DONE > > message("*** Globals - subassignments ... DONE") *** Globals - subassignments ... DONE > > source("incl/end.R") > > proc.time() user system elapsed 0.48 0.12 1.00