R Under development (unstable) (2024-05-14 r86553 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 [10:56:17.108] plan(): Setting new future strategy stack: [10:56:17.110] List of future strategies: [10:56:17.110] 1. mirai_multisession: [10:56:17.110] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [10:56:17.110] - tweaked: FALSE [10:56:17.110] - call: future::plan(future.mirai::mirai_multisession) [10:56:17.123] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [10:56:17.123] < mirai | $data > [10:56:17.129] getGlobalsAndPackages() ... [10:56:17.129] Not searching for globals [10:56:17.129] - globals: [0] [10:56:17.129] getGlobalsAndPackages() ... DONE [10:56:17.130] getGlobalsAndPackages() ... [10:56:17.130] [10:56:17.131] - globals: [0] [10:56:17.131] getGlobalsAndPackages() ... DONE [10:56:17.424] Packages needed by the future expression (n = 0): [10:56:17.425] Packages needed by future strategies (n = 0): [10:56:17.426] { [10:56:17.426] { [10:56:17.426] { [10:56:17.426] ...future.startTime <- base::Sys.time() [10:56:17.426] { [10:56:17.426] { [10:56:17.426] { [10:56:17.426] base::local({ [10:56:17.426] has_future <- base::requireNamespace("future", [10:56:17.426] quietly = TRUE) [10:56:17.426] if (has_future) { [10:56:17.426] ns <- base::getNamespace("future") [10:56:17.426] version <- ns[[".package"]][["version"]] [10:56:17.426] if (is.null(version)) [10:56:17.426] version <- utils::packageVersion("future") [10:56:17.426] } [10:56:17.426] else { [10:56:17.426] version <- NULL [10:56:17.426] } [10:56:17.426] if (!has_future || version < "1.8.0") { [10:56:17.426] info <- base::c(r_version = base::gsub("R version ", [10:56:17.426] "", base::R.version$version.string), [10:56:17.426] platform = base::sprintf("%s (%s-bit)", [10:56:17.426] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:17.426] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:17.426] "release", "version")], collapse = " "), [10:56:17.426] hostname = base::Sys.info()[["nodename"]]) [10:56:17.426] info <- base::sprintf("%s: %s", base::names(info), [10:56:17.426] info) [10:56:17.426] info <- base::paste(info, collapse = "; ") [10:56:17.426] if (!has_future) { [10:56:17.426] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:17.426] info) [10:56:17.426] } [10:56:17.426] else { [10:56:17.426] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:17.426] info, version) [10:56:17.426] } [10:56:17.426] base::stop(msg) [10:56:17.426] } [10:56:17.426] }) [10:56:17.426] } [10:56:17.426] ...future.strategy.old <- future::plan("list") [10:56:17.426] options(future.plan = NULL) [10:56:17.426] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.426] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:17.426] } [10:56:17.426] ...future.workdir <- getwd() [10:56:17.426] } [10:56:17.426] ...future.oldOptions <- base::as.list(base::.Options) [10:56:17.426] ...future.oldEnvVars <- base::Sys.getenv() [10:56:17.426] } [10:56:17.426] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:17.426] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:17.426] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:17.426] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:17.426] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:17.426] future.stdout.windows.reencode = NULL, width = 80L) [10:56:17.426] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:17.426] base::names(...future.oldOptions)) [10:56:17.426] } [10:56:17.426] if (FALSE) { [10:56:17.426] } [10:56:17.426] else { [10:56:17.426] if (TRUE) { [10:56:17.426] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:17.426] open = "w") [10:56:17.426] } [10:56:17.426] else { [10:56:17.426] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:17.426] windows = "NUL", "/dev/null"), open = "w") [10:56:17.426] } [10:56:17.426] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:17.426] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:17.426] base::sink(type = "output", split = FALSE) [10:56:17.426] base::close(...future.stdout) [10:56:17.426] }, add = TRUE) [10:56:17.426] } [10:56:17.426] ...future.frame <- base::sys.nframe() [10:56:17.426] ...future.conditions <- base::list() [10:56:17.426] ...future.rng <- base::globalenv()$.Random.seed [10:56:17.426] if (FALSE) { [10:56:17.426] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:17.426] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:17.426] } [10:56:17.426] ...future.result <- base::tryCatch({ [10:56:17.426] base::withCallingHandlers({ [10:56:17.426] ...future.value <- base::withVisible(base::local(NA)) [10:56:17.426] future::FutureResult(value = ...future.value$value, [10:56:17.426] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.426] ...future.rng), globalenv = if (FALSE) [10:56:17.426] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:17.426] ...future.globalenv.names)) [10:56:17.426] else NULL, started = ...future.startTime, version = "1.8") [10:56:17.426] }, condition = base::local({ [10:56:17.426] c <- base::c [10:56:17.426] inherits <- base::inherits [10:56:17.426] invokeRestart <- base::invokeRestart [10:56:17.426] length <- base::length [10:56:17.426] list <- base::list [10:56:17.426] seq.int <- base::seq.int [10:56:17.426] signalCondition <- base::signalCondition [10:56:17.426] sys.calls <- base::sys.calls [10:56:17.426] `[[` <- base::`[[` [10:56:17.426] `+` <- base::`+` [10:56:17.426] `<<-` <- base::`<<-` [10:56:17.426] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:17.426] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:17.426] 3L)] [10:56:17.426] } [10:56:17.426] function(cond) { [10:56:17.426] is_error <- inherits(cond, "error") [10:56:17.426] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:17.426] NULL) [10:56:17.426] if (is_error) { [10:56:17.426] sessionInformation <- function() { [10:56:17.426] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:17.426] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:17.426] search = base::search(), system = base::Sys.info()) [10:56:17.426] } [10:56:17.426] ...future.conditions[[length(...future.conditions) + [10:56:17.426] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:17.426] cond$call), session = sessionInformation(), [10:56:17.426] timestamp = base::Sys.time(), signaled = 0L) [10:56:17.426] signalCondition(cond) [10:56:17.426] } [10:56:17.426] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:17.426] signal <- FALSE && inherits(cond, character(0)) [10:56:17.426] ...future.conditions[[length(...future.conditions) + [10:56:17.426] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:17.426] if (FALSE && !signal) { [10:56:17.426] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.426] { [10:56:17.426] inherits <- base::inherits [10:56:17.426] invokeRestart <- base::invokeRestart [10:56:17.426] is.null <- base::is.null [10:56:17.426] muffled <- FALSE [10:56:17.426] if (inherits(cond, "message")) { [10:56:17.426] muffled <- grepl(pattern, "muffleMessage") [10:56:17.426] if (muffled) [10:56:17.426] invokeRestart("muffleMessage") [10:56:17.426] } [10:56:17.426] else if (inherits(cond, "warning")) { [10:56:17.426] muffled <- grepl(pattern, "muffleWarning") [10:56:17.426] if (muffled) [10:56:17.426] invokeRestart("muffleWarning") [10:56:17.426] } [10:56:17.426] else if (inherits(cond, "condition")) { [10:56:17.426] if (!is.null(pattern)) { [10:56:17.426] computeRestarts <- base::computeRestarts [10:56:17.426] grepl <- base::grepl [10:56:17.426] restarts <- computeRestarts(cond) [10:56:17.426] for (restart in restarts) { [10:56:17.426] name <- restart$name [10:56:17.426] if (is.null(name)) [10:56:17.426] next [10:56:17.426] if (!grepl(pattern, name)) [10:56:17.426] next [10:56:17.426] invokeRestart(restart) [10:56:17.426] muffled <- TRUE [10:56:17.426] break [10:56:17.426] } [10:56:17.426] } [10:56:17.426] } [10:56:17.426] invisible(muffled) [10:56:17.426] } [10:56:17.426] muffleCondition(cond, pattern = "^muffle") [10:56:17.426] } [10:56:17.426] } [10:56:17.426] else { [10:56:17.426] if (TRUE) { [10:56:17.426] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.426] { [10:56:17.426] inherits <- base::inherits [10:56:17.426] invokeRestart <- base::invokeRestart [10:56:17.426] is.null <- base::is.null [10:56:17.426] muffled <- FALSE [10:56:17.426] if (inherits(cond, "message")) { [10:56:17.426] muffled <- grepl(pattern, "muffleMessage") [10:56:17.426] if (muffled) [10:56:17.426] invokeRestart("muffleMessage") [10:56:17.426] } [10:56:17.426] else if (inherits(cond, "warning")) { [10:56:17.426] muffled <- grepl(pattern, "muffleWarning") [10:56:17.426] if (muffled) [10:56:17.426] invokeRestart("muffleWarning") [10:56:17.426] } [10:56:17.426] else if (inherits(cond, "condition")) { [10:56:17.426] if (!is.null(pattern)) { [10:56:17.426] computeRestarts <- base::computeRestarts [10:56:17.426] grepl <- base::grepl [10:56:17.426] restarts <- computeRestarts(cond) [10:56:17.426] for (restart in restarts) { [10:56:17.426] name <- restart$name [10:56:17.426] if (is.null(name)) [10:56:17.426] next [10:56:17.426] if (!grepl(pattern, name)) [10:56:17.426] next [10:56:17.426] invokeRestart(restart) [10:56:17.426] muffled <- TRUE [10:56:17.426] break [10:56:17.426] } [10:56:17.426] } [10:56:17.426] } [10:56:17.426] invisible(muffled) [10:56:17.426] } [10:56:17.426] muffleCondition(cond, pattern = "^muffle") [10:56:17.426] } [10:56:17.426] } [10:56:17.426] } [10:56:17.426] })) [10:56:17.426] }, error = function(ex) { [10:56:17.426] base::structure(base::list(value = NULL, visible = NULL, [10:56:17.426] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.426] ...future.rng), started = ...future.startTime, [10:56:17.426] finished = Sys.time(), session_uuid = NA_character_, [10:56:17.426] version = "1.8"), class = "FutureResult") [10:56:17.426] }, finally = { [10:56:17.426] if (!identical(...future.workdir, getwd())) [10:56:17.426] setwd(...future.workdir) [10:56:17.426] { [10:56:17.426] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:17.426] ...future.oldOptions$nwarnings <- NULL [10:56:17.426] } [10:56:17.426] base::options(...future.oldOptions) [10:56:17.426] if (.Platform$OS.type == "windows") { [10:56:17.426] old_names <- names(...future.oldEnvVars) [10:56:17.426] envs <- base::Sys.getenv() [10:56:17.426] names <- names(envs) [10:56:17.426] common <- intersect(names, old_names) [10:56:17.426] added <- setdiff(names, old_names) [10:56:17.426] removed <- setdiff(old_names, names) [10:56:17.426] changed <- common[...future.oldEnvVars[common] != [10:56:17.426] envs[common]] [10:56:17.426] NAMES <- toupper(changed) [10:56:17.426] args <- list() [10:56:17.426] for (kk in seq_along(NAMES)) { [10:56:17.426] name <- changed[[kk]] [10:56:17.426] NAME <- NAMES[[kk]] [10:56:17.426] if (name != NAME && is.element(NAME, old_names)) [10:56:17.426] next [10:56:17.426] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.426] } [10:56:17.426] NAMES <- toupper(added) [10:56:17.426] for (kk in seq_along(NAMES)) { [10:56:17.426] name <- added[[kk]] [10:56:17.426] NAME <- NAMES[[kk]] [10:56:17.426] if (name != NAME && is.element(NAME, old_names)) [10:56:17.426] next [10:56:17.426] args[[name]] <- "" [10:56:17.426] } [10:56:17.426] NAMES <- toupper(removed) [10:56:17.426] for (kk in seq_along(NAMES)) { [10:56:17.426] name <- removed[[kk]] [10:56:17.426] NAME <- NAMES[[kk]] [10:56:17.426] if (name != NAME && is.element(NAME, old_names)) [10:56:17.426] next [10:56:17.426] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.426] } [10:56:17.426] if (length(args) > 0) [10:56:17.426] base::do.call(base::Sys.setenv, args = args) [10:56:17.426] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:17.426] } [10:56:17.426] else { [10:56:17.426] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:17.426] } [10:56:17.426] { [10:56:17.426] if (base::length(...future.futureOptionsAdded) > [10:56:17.426] 0L) { [10:56:17.426] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:17.426] base::names(opts) <- ...future.futureOptionsAdded [10:56:17.426] base::options(opts) [10:56:17.426] } [10:56:17.426] { [10:56:17.426] NULL [10:56:17.426] options(future.plan = NULL) [10:56:17.426] if (is.na(NA_character_)) [10:56:17.426] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.426] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:17.426] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:17.426] .init = FALSE) [10:56:17.426] } [10:56:17.426] } [10:56:17.426] } [10:56:17.426] }) [10:56:17.426] if (TRUE) { [10:56:17.426] base::sink(type = "output", split = FALSE) [10:56:17.426] if (TRUE) { [10:56:17.426] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:17.426] } [10:56:17.426] else { [10:56:17.426] ...future.result["stdout"] <- base::list(NULL) [10:56:17.426] } [10:56:17.426] base::close(...future.stdout) [10:56:17.426] ...future.stdout <- NULL [10:56:17.426] } [10:56:17.426] ...future.result$conditions <- ...future.conditions [10:56:17.426] ...future.result$finished <- base::Sys.time() [10:56:17.426] ...future.result [10:56:17.426] } [10:56:17.539] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [10:56:17.540] plan(): nbrOfWorkers() = 2 > > plan(mirai_multisession) [10:56:17.541] plan(): Setting new future strategy stack: [10:56:17.541] List of future strategies: [10:56:17.541] 1. mirai_multisession: [10:56:17.541] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [10:56:17.541] - tweaked: FALSE [10:56:17.541] - call: plan(mirai_multisession) [10:56:17.554] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [10:56:17.555] < mirai | $data > [10:56:17.557] getGlobalsAndPackages() ... [10:56:17.557] Not searching for globals [10:56:17.557] - globals: [0] [10:56:17.558] getGlobalsAndPackages() ... DONE [10:56:17.558] getGlobalsAndPackages() ... [10:56:17.558] [10:56:17.558] - globals: [0] [10:56:17.558] getGlobalsAndPackages() ... DONE [10:56:17.559] Packages needed by the future expression (n = 0): [10:56:17.559] Packages needed by future strategies (n = 0): [10:56:17.560] { [10:56:17.560] { [10:56:17.560] { [10:56:17.560] ...future.startTime <- base::Sys.time() [10:56:17.560] { [10:56:17.560] { [10:56:17.560] { [10:56:17.560] base::local({ [10:56:17.560] has_future <- base::requireNamespace("future", [10:56:17.560] quietly = TRUE) [10:56:17.560] if (has_future) { [10:56:17.560] ns <- base::getNamespace("future") [10:56:17.560] version <- ns[[".package"]][["version"]] [10:56:17.560] if (is.null(version)) [10:56:17.560] version <- utils::packageVersion("future") [10:56:17.560] } [10:56:17.560] else { [10:56:17.560] version <- NULL [10:56:17.560] } [10:56:17.560] if (!has_future || version < "1.8.0") { [10:56:17.560] info <- base::c(r_version = base::gsub("R version ", [10:56:17.560] "", base::R.version$version.string), [10:56:17.560] platform = base::sprintf("%s (%s-bit)", [10:56:17.560] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:17.560] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:17.560] "release", "version")], collapse = " "), [10:56:17.560] hostname = base::Sys.info()[["nodename"]]) [10:56:17.560] info <- base::sprintf("%s: %s", base::names(info), [10:56:17.560] info) [10:56:17.560] info <- base::paste(info, collapse = "; ") [10:56:17.560] if (!has_future) { [10:56:17.560] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:17.560] info) [10:56:17.560] } [10:56:17.560] else { [10:56:17.560] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:17.560] info, version) [10:56:17.560] } [10:56:17.560] base::stop(msg) [10:56:17.560] } [10:56:17.560] }) [10:56:17.560] } [10:56:17.560] ...future.strategy.old <- future::plan("list") [10:56:17.560] options(future.plan = NULL) [10:56:17.560] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.560] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:17.560] } [10:56:17.560] ...future.workdir <- getwd() [10:56:17.560] } [10:56:17.560] ...future.oldOptions <- base::as.list(base::.Options) [10:56:17.560] ...future.oldEnvVars <- base::Sys.getenv() [10:56:17.560] } [10:56:17.560] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:17.560] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:17.560] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:17.560] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:17.560] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:17.560] future.stdout.windows.reencode = NULL, width = 80L) [10:56:17.560] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:17.560] base::names(...future.oldOptions)) [10:56:17.560] } [10:56:17.560] if (FALSE) { [10:56:17.560] } [10:56:17.560] else { [10:56:17.560] if (TRUE) { [10:56:17.560] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:17.560] open = "w") [10:56:17.560] } [10:56:17.560] else { [10:56:17.560] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:17.560] windows = "NUL", "/dev/null"), open = "w") [10:56:17.560] } [10:56:17.560] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:17.560] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:17.560] base::sink(type = "output", split = FALSE) [10:56:17.560] base::close(...future.stdout) [10:56:17.560] }, add = TRUE) [10:56:17.560] } [10:56:17.560] ...future.frame <- base::sys.nframe() [10:56:17.560] ...future.conditions <- base::list() [10:56:17.560] ...future.rng <- base::globalenv()$.Random.seed [10:56:17.560] if (FALSE) { [10:56:17.560] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:17.560] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:17.560] } [10:56:17.560] ...future.result <- base::tryCatch({ [10:56:17.560] base::withCallingHandlers({ [10:56:17.560] ...future.value <- base::withVisible(base::local(NA)) [10:56:17.560] future::FutureResult(value = ...future.value$value, [10:56:17.560] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.560] ...future.rng), globalenv = if (FALSE) [10:56:17.560] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:17.560] ...future.globalenv.names)) [10:56:17.560] else NULL, started = ...future.startTime, version = "1.8") [10:56:17.560] }, condition = base::local({ [10:56:17.560] c <- base::c [10:56:17.560] inherits <- base::inherits [10:56:17.560] invokeRestart <- base::invokeRestart [10:56:17.560] length <- base::length [10:56:17.560] list <- base::list [10:56:17.560] seq.int <- base::seq.int [10:56:17.560] signalCondition <- base::signalCondition [10:56:17.560] sys.calls <- base::sys.calls [10:56:17.560] `[[` <- base::`[[` [10:56:17.560] `+` <- base::`+` [10:56:17.560] `<<-` <- base::`<<-` [10:56:17.560] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:17.560] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:17.560] 3L)] [10:56:17.560] } [10:56:17.560] function(cond) { [10:56:17.560] is_error <- inherits(cond, "error") [10:56:17.560] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:17.560] NULL) [10:56:17.560] if (is_error) { [10:56:17.560] sessionInformation <- function() { [10:56:17.560] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:17.560] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:17.560] search = base::search(), system = base::Sys.info()) [10:56:17.560] } [10:56:17.560] ...future.conditions[[length(...future.conditions) + [10:56:17.560] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:17.560] cond$call), session = sessionInformation(), [10:56:17.560] timestamp = base::Sys.time(), signaled = 0L) [10:56:17.560] signalCondition(cond) [10:56:17.560] } [10:56:17.560] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:17.560] signal <- FALSE && inherits(cond, character(0)) [10:56:17.560] ...future.conditions[[length(...future.conditions) + [10:56:17.560] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:17.560] if (FALSE && !signal) { [10:56:17.560] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.560] { [10:56:17.560] inherits <- base::inherits [10:56:17.560] invokeRestart <- base::invokeRestart [10:56:17.560] is.null <- base::is.null [10:56:17.560] muffled <- FALSE [10:56:17.560] if (inherits(cond, "message")) { [10:56:17.560] muffled <- grepl(pattern, "muffleMessage") [10:56:17.560] if (muffled) [10:56:17.560] invokeRestart("muffleMessage") [10:56:17.560] } [10:56:17.560] else if (inherits(cond, "warning")) { [10:56:17.560] muffled <- grepl(pattern, "muffleWarning") [10:56:17.560] if (muffled) [10:56:17.560] invokeRestart("muffleWarning") [10:56:17.560] } [10:56:17.560] else if (inherits(cond, "condition")) { [10:56:17.560] if (!is.null(pattern)) { [10:56:17.560] computeRestarts <- base::computeRestarts [10:56:17.560] grepl <- base::grepl [10:56:17.560] restarts <- computeRestarts(cond) [10:56:17.560] for (restart in restarts) { [10:56:17.560] name <- restart$name [10:56:17.560] if (is.null(name)) [10:56:17.560] next [10:56:17.560] if (!grepl(pattern, name)) [10:56:17.560] next [10:56:17.560] invokeRestart(restart) [10:56:17.560] muffled <- TRUE [10:56:17.560] break [10:56:17.560] } [10:56:17.560] } [10:56:17.560] } [10:56:17.560] invisible(muffled) [10:56:17.560] } [10:56:17.560] muffleCondition(cond, pattern = "^muffle") [10:56:17.560] } [10:56:17.560] } [10:56:17.560] else { [10:56:17.560] if (TRUE) { [10:56:17.560] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.560] { [10:56:17.560] inherits <- base::inherits [10:56:17.560] invokeRestart <- base::invokeRestart [10:56:17.560] is.null <- base::is.null [10:56:17.560] muffled <- FALSE [10:56:17.560] if (inherits(cond, "message")) { [10:56:17.560] muffled <- grepl(pattern, "muffleMessage") [10:56:17.560] if (muffled) [10:56:17.560] invokeRestart("muffleMessage") [10:56:17.560] } [10:56:17.560] else if (inherits(cond, "warning")) { [10:56:17.560] muffled <- grepl(pattern, "muffleWarning") [10:56:17.560] if (muffled) [10:56:17.560] invokeRestart("muffleWarning") [10:56:17.560] } [10:56:17.560] else if (inherits(cond, "condition")) { [10:56:17.560] if (!is.null(pattern)) { [10:56:17.560] computeRestarts <- base::computeRestarts [10:56:17.560] grepl <- base::grepl [10:56:17.560] restarts <- computeRestarts(cond) [10:56:17.560] for (restart in restarts) { [10:56:17.560] name <- restart$name [10:56:17.560] if (is.null(name)) [10:56:17.560] next [10:56:17.560] if (!grepl(pattern, name)) [10:56:17.560] next [10:56:17.560] invokeRestart(restart) [10:56:17.560] muffled <- TRUE [10:56:17.560] break [10:56:17.560] } [10:56:17.560] } [10:56:17.560] } [10:56:17.560] invisible(muffled) [10:56:17.560] } [10:56:17.560] muffleCondition(cond, pattern = "^muffle") [10:56:17.560] } [10:56:17.560] } [10:56:17.560] } [10:56:17.560] })) [10:56:17.560] }, error = function(ex) { [10:56:17.560] base::structure(base::list(value = NULL, visible = NULL, [10:56:17.560] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.560] ...future.rng), started = ...future.startTime, [10:56:17.560] finished = Sys.time(), session_uuid = NA_character_, [10:56:17.560] version = "1.8"), class = "FutureResult") [10:56:17.560] }, finally = { [10:56:17.560] if (!identical(...future.workdir, getwd())) [10:56:17.560] setwd(...future.workdir) [10:56:17.560] { [10:56:17.560] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:17.560] ...future.oldOptions$nwarnings <- NULL [10:56:17.560] } [10:56:17.560] base::options(...future.oldOptions) [10:56:17.560] if (.Platform$OS.type == "windows") { [10:56:17.560] old_names <- names(...future.oldEnvVars) [10:56:17.560] envs <- base::Sys.getenv() [10:56:17.560] names <- names(envs) [10:56:17.560] common <- intersect(names, old_names) [10:56:17.560] added <- setdiff(names, old_names) [10:56:17.560] removed <- setdiff(old_names, names) [10:56:17.560] changed <- common[...future.oldEnvVars[common] != [10:56:17.560] envs[common]] [10:56:17.560] NAMES <- toupper(changed) [10:56:17.560] args <- list() [10:56:17.560] for (kk in seq_along(NAMES)) { [10:56:17.560] name <- changed[[kk]] [10:56:17.560] NAME <- NAMES[[kk]] [10:56:17.560] if (name != NAME && is.element(NAME, old_names)) [10:56:17.560] next [10:56:17.560] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.560] } [10:56:17.560] NAMES <- toupper(added) [10:56:17.560] for (kk in seq_along(NAMES)) { [10:56:17.560] name <- added[[kk]] [10:56:17.560] NAME <- NAMES[[kk]] [10:56:17.560] if (name != NAME && is.element(NAME, old_names)) [10:56:17.560] next [10:56:17.560] args[[name]] <- "" [10:56:17.560] } [10:56:17.560] NAMES <- toupper(removed) [10:56:17.560] for (kk in seq_along(NAMES)) { [10:56:17.560] name <- removed[[kk]] [10:56:17.560] NAME <- NAMES[[kk]] [10:56:17.560] if (name != NAME && is.element(NAME, old_names)) [10:56:17.560] next [10:56:17.560] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.560] } [10:56:17.560] if (length(args) > 0) [10:56:17.560] base::do.call(base::Sys.setenv, args = args) [10:56:17.560] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:17.560] } [10:56:17.560] else { [10:56:17.560] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:17.560] } [10:56:17.560] { [10:56:17.560] if (base::length(...future.futureOptionsAdded) > [10:56:17.560] 0L) { [10:56:17.560] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:17.560] base::names(opts) <- ...future.futureOptionsAdded [10:56:17.560] base::options(opts) [10:56:17.560] } [10:56:17.560] { [10:56:17.560] NULL [10:56:17.560] options(future.plan = NULL) [10:56:17.560] if (is.na(NA_character_)) [10:56:17.560] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.560] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:17.560] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:17.560] .init = FALSE) [10:56:17.560] } [10:56:17.560] } [10:56:17.560] } [10:56:17.560] }) [10:56:17.560] if (TRUE) { [10:56:17.560] base::sink(type = "output", split = FALSE) [10:56:17.560] if (TRUE) { [10:56:17.560] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:17.560] } [10:56:17.560] else { [10:56:17.560] ...future.result["stdout"] <- base::list(NULL) [10:56:17.560] } [10:56:17.560] base::close(...future.stdout) [10:56:17.560] ...future.stdout <- NULL [10:56:17.560] } [10:56:17.560] ...future.result$conditions <- ...future.conditions [10:56:17.560] ...future.result$finished <- base::Sys.time() [10:56:17.560] ...future.result [10:56:17.560] } [10:56:17.680] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [10:56:17.681] 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' [10:56:17.687] 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' [10:56:17.687] Searching for globals... [10:56:17.699] - globals found: [5] '{', 'x', '<-', '$', '$<-' [10:56:17.700] Searching for globals ... DONE [10:56:17.700] Resolving globals: TRUE [10:56:17.700] Resolving any globals that are futures ... [10:56:17.700] - globals: [5] '{', 'x', '<-', '$', '$<-' [10:56:17.700] Resolving any globals that are futures ... DONE [10:56:17.701] Resolving futures part of globals (recursively) ... [10:56:17.702] resolve() on list ... [10:56:17.702] recursive: 99 [10:56:17.703] length: 1 [10:56:17.703] elements: 'x' [10:56:17.703] length: 0 (resolved future 1) [10:56:17.703] resolve() on list ... DONE [10:56:17.704] - globals: [1] 'x' [10:56:17.704] Resolving futures part of globals (recursively) ... DONE [10:56:17.704] The total size of the 1 globals is 0 bytes (0 bytes) [10:56:17.705] 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') [10:56:17.705] - globals: [1] 'x' [10:56:17.705] [10:56:17.706] getGlobalsAndPackages() ... DONE [10:56:17.706] run() for 'Future' ... [10:56:17.706] - state: 'created' [10:56:17.707] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:17.710] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:17.710] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:17.711] - Field: 'label' [10:56:17.711] - Field: 'local' [10:56:17.711] - Field: 'owner' [10:56:17.711] - Field: 'envir' [10:56:17.711] - Field: 'packages' [10:56:17.712] - Field: 'gc' [10:56:17.712] - Field: 'conditions' [10:56:17.712] - Field: 'expr' [10:56:17.712] - Field: 'uuid' [10:56:17.712] - Field: 'seed' [10:56:17.713] - Field: 'version' [10:56:17.713] - Field: 'result' [10:56:17.713] - Field: 'asynchronous' [10:56:17.713] - Field: 'calls' [10:56:17.713] - Field: 'globals' [10:56:17.714] - Field: 'stdout' [10:56:17.714] - Field: 'earlySignal' [10:56:17.714] - Field: 'lazy' [10:56:17.714] - Field: 'state' [10:56:17.714] - Field: '.cluster' [10:56:17.715] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:17.715] - Launch lazy future ... [10:56:17.715] Packages needed by the future expression (n = 0): [10:56:17.715] Packages needed by future strategies (n = 0): [10:56:17.716] { [10:56:17.716] { [10:56:17.716] { [10:56:17.716] ...future.startTime <- base::Sys.time() [10:56:17.716] { [10:56:17.716] { [10:56:17.716] { [10:56:17.716] base::local({ [10:56:17.716] has_future <- base::requireNamespace("future", [10:56:17.716] quietly = TRUE) [10:56:17.716] if (has_future) { [10:56:17.716] ns <- base::getNamespace("future") [10:56:17.716] version <- ns[[".package"]][["version"]] [10:56:17.716] if (is.null(version)) [10:56:17.716] version <- utils::packageVersion("future") [10:56:17.716] } [10:56:17.716] else { [10:56:17.716] version <- NULL [10:56:17.716] } [10:56:17.716] if (!has_future || version < "1.8.0") { [10:56:17.716] info <- base::c(r_version = base::gsub("R version ", [10:56:17.716] "", base::R.version$version.string), [10:56:17.716] platform = base::sprintf("%s (%s-bit)", [10:56:17.716] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:17.716] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:17.716] "release", "version")], collapse = " "), [10:56:17.716] hostname = base::Sys.info()[["nodename"]]) [10:56:17.716] info <- base::sprintf("%s: %s", base::names(info), [10:56:17.716] info) [10:56:17.716] info <- base::paste(info, collapse = "; ") [10:56:17.716] if (!has_future) { [10:56:17.716] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:17.716] info) [10:56:17.716] } [10:56:17.716] else { [10:56:17.716] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:17.716] info, version) [10:56:17.716] } [10:56:17.716] base::stop(msg) [10:56:17.716] } [10:56:17.716] }) [10:56:17.716] } [10:56:17.716] ...future.strategy.old <- future::plan("list") [10:56:17.716] options(future.plan = NULL) [10:56:17.716] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.716] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:17.716] } [10:56:17.716] ...future.workdir <- getwd() [10:56:17.716] } [10:56:17.716] ...future.oldOptions <- base::as.list(base::.Options) [10:56:17.716] ...future.oldEnvVars <- base::Sys.getenv() [10:56:17.716] } [10:56:17.716] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [10:56:17.716] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:17.716] future.globals.onMissing = "error", future.globals.onReference = NULL, [10:56:17.716] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [10:56:17.716] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:17.716] future.stdout.windows.reencode = NULL, width = 80L) [10:56:17.716] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:17.716] base::names(...future.oldOptions)) [10:56:17.716] } [10:56:17.716] if (FALSE) { [10:56:17.716] } [10:56:17.716] else { [10:56:17.716] if (TRUE) { [10:56:17.716] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:17.716] open = "w") [10:56:17.716] } [10:56:17.716] else { [10:56:17.716] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:17.716] windows = "NUL", "/dev/null"), open = "w") [10:56:17.716] } [10:56:17.716] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:17.716] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:17.716] base::sink(type = "output", split = FALSE) [10:56:17.716] base::close(...future.stdout) [10:56:17.716] }, add = TRUE) [10:56:17.716] } [10:56:17.716] ...future.frame <- base::sys.nframe() [10:56:17.716] ...future.conditions <- base::list() [10:56:17.716] ...future.rng <- base::globalenv()$.Random.seed [10:56:17.716] if (FALSE) { [10:56:17.716] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:17.716] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:17.716] } [10:56:17.716] ...future.result <- base::tryCatch({ [10:56:17.716] base::withCallingHandlers({ [10:56:17.716] ...future.value <- base::withVisible(base::local({ [10:56:17.716] x$a <- 1 [10:56:17.716] x [10:56:17.716] })) [10:56:17.716] future::FutureResult(value = ...future.value$value, [10:56:17.716] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.716] ...future.rng), globalenv = if (FALSE) [10:56:17.716] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:17.716] ...future.globalenv.names)) [10:56:17.716] else NULL, started = ...future.startTime, version = "1.8") [10:56:17.716] }, condition = base::local({ [10:56:17.716] c <- base::c [10:56:17.716] inherits <- base::inherits [10:56:17.716] invokeRestart <- base::invokeRestart [10:56:17.716] length <- base::length [10:56:17.716] list <- base::list [10:56:17.716] seq.int <- base::seq.int [10:56:17.716] signalCondition <- base::signalCondition [10:56:17.716] sys.calls <- base::sys.calls [10:56:17.716] `[[` <- base::`[[` [10:56:17.716] `+` <- base::`+` [10:56:17.716] `<<-` <- base::`<<-` [10:56:17.716] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:17.716] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:17.716] 3L)] [10:56:17.716] } [10:56:17.716] function(cond) { [10:56:17.716] is_error <- inherits(cond, "error") [10:56:17.716] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:17.716] NULL) [10:56:17.716] if (is_error) { [10:56:17.716] sessionInformation <- function() { [10:56:17.716] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:17.716] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:17.716] search = base::search(), system = base::Sys.info()) [10:56:17.716] } [10:56:17.716] ...future.conditions[[length(...future.conditions) + [10:56:17.716] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:17.716] cond$call), session = sessionInformation(), [10:56:17.716] timestamp = base::Sys.time(), signaled = 0L) [10:56:17.716] signalCondition(cond) [10:56:17.716] } [10:56:17.716] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:17.716] signal <- FALSE && inherits(cond, character(0)) [10:56:17.716] ...future.conditions[[length(...future.conditions) + [10:56:17.716] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:17.716] if (FALSE && !signal) { [10:56:17.716] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.716] { [10:56:17.716] inherits <- base::inherits [10:56:17.716] invokeRestart <- base::invokeRestart [10:56:17.716] is.null <- base::is.null [10:56:17.716] muffled <- FALSE [10:56:17.716] if (inherits(cond, "message")) { [10:56:17.716] muffled <- grepl(pattern, "muffleMessage") [10:56:17.716] if (muffled) [10:56:17.716] invokeRestart("muffleMessage") [10:56:17.716] } [10:56:17.716] else if (inherits(cond, "warning")) { [10:56:17.716] muffled <- grepl(pattern, "muffleWarning") [10:56:17.716] if (muffled) [10:56:17.716] invokeRestart("muffleWarning") [10:56:17.716] } [10:56:17.716] else if (inherits(cond, "condition")) { [10:56:17.716] if (!is.null(pattern)) { [10:56:17.716] computeRestarts <- base::computeRestarts [10:56:17.716] grepl <- base::grepl [10:56:17.716] restarts <- computeRestarts(cond) [10:56:17.716] for (restart in restarts) { [10:56:17.716] name <- restart$name [10:56:17.716] if (is.null(name)) [10:56:17.716] next [10:56:17.716] if (!grepl(pattern, name)) [10:56:17.716] next [10:56:17.716] invokeRestart(restart) [10:56:17.716] muffled <- TRUE [10:56:17.716] break [10:56:17.716] } [10:56:17.716] } [10:56:17.716] } [10:56:17.716] invisible(muffled) [10:56:17.716] } [10:56:17.716] muffleCondition(cond, pattern = "^muffle") [10:56:17.716] } [10:56:17.716] } [10:56:17.716] else { [10:56:17.716] if (TRUE) { [10:56:17.716] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.716] { [10:56:17.716] inherits <- base::inherits [10:56:17.716] invokeRestart <- base::invokeRestart [10:56:17.716] is.null <- base::is.null [10:56:17.716] muffled <- FALSE [10:56:17.716] if (inherits(cond, "message")) { [10:56:17.716] muffled <- grepl(pattern, "muffleMessage") [10:56:17.716] if (muffled) [10:56:17.716] invokeRestart("muffleMessage") [10:56:17.716] } [10:56:17.716] else if (inherits(cond, "warning")) { [10:56:17.716] muffled <- grepl(pattern, "muffleWarning") [10:56:17.716] if (muffled) [10:56:17.716] invokeRestart("muffleWarning") [10:56:17.716] } [10:56:17.716] else if (inherits(cond, "condition")) { [10:56:17.716] if (!is.null(pattern)) { [10:56:17.716] computeRestarts <- base::computeRestarts [10:56:17.716] grepl <- base::grepl [10:56:17.716] restarts <- computeRestarts(cond) [10:56:17.716] for (restart in restarts) { [10:56:17.716] name <- restart$name [10:56:17.716] if (is.null(name)) [10:56:17.716] next [10:56:17.716] if (!grepl(pattern, name)) [10:56:17.716] next [10:56:17.716] invokeRestart(restart) [10:56:17.716] muffled <- TRUE [10:56:17.716] break [10:56:17.716] } [10:56:17.716] } [10:56:17.716] } [10:56:17.716] invisible(muffled) [10:56:17.716] } [10:56:17.716] muffleCondition(cond, pattern = "^muffle") [10:56:17.716] } [10:56:17.716] } [10:56:17.716] } [10:56:17.716] })) [10:56:17.716] }, error = function(ex) { [10:56:17.716] base::structure(base::list(value = NULL, visible = NULL, [10:56:17.716] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.716] ...future.rng), started = ...future.startTime, [10:56:17.716] finished = Sys.time(), session_uuid = NA_character_, [10:56:17.716] version = "1.8"), class = "FutureResult") [10:56:17.716] }, finally = { [10:56:17.716] if (!identical(...future.workdir, getwd())) [10:56:17.716] setwd(...future.workdir) [10:56:17.716] { [10:56:17.716] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:17.716] ...future.oldOptions$nwarnings <- NULL [10:56:17.716] } [10:56:17.716] base::options(...future.oldOptions) [10:56:17.716] if (.Platform$OS.type == "windows") { [10:56:17.716] old_names <- names(...future.oldEnvVars) [10:56:17.716] envs <- base::Sys.getenv() [10:56:17.716] names <- names(envs) [10:56:17.716] common <- intersect(names, old_names) [10:56:17.716] added <- setdiff(names, old_names) [10:56:17.716] removed <- setdiff(old_names, names) [10:56:17.716] changed <- common[...future.oldEnvVars[common] != [10:56:17.716] envs[common]] [10:56:17.716] NAMES <- toupper(changed) [10:56:17.716] args <- list() [10:56:17.716] for (kk in seq_along(NAMES)) { [10:56:17.716] name <- changed[[kk]] [10:56:17.716] NAME <- NAMES[[kk]] [10:56:17.716] if (name != NAME && is.element(NAME, old_names)) [10:56:17.716] next [10:56:17.716] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.716] } [10:56:17.716] NAMES <- toupper(added) [10:56:17.716] for (kk in seq_along(NAMES)) { [10:56:17.716] name <- added[[kk]] [10:56:17.716] NAME <- NAMES[[kk]] [10:56:17.716] if (name != NAME && is.element(NAME, old_names)) [10:56:17.716] next [10:56:17.716] args[[name]] <- "" [10:56:17.716] } [10:56:17.716] NAMES <- toupper(removed) [10:56:17.716] for (kk in seq_along(NAMES)) { [10:56:17.716] name <- removed[[kk]] [10:56:17.716] NAME <- NAMES[[kk]] [10:56:17.716] if (name != NAME && is.element(NAME, old_names)) [10:56:17.716] next [10:56:17.716] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.716] } [10:56:17.716] if (length(args) > 0) [10:56:17.716] base::do.call(base::Sys.setenv, args = args) [10:56:17.716] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:17.716] } [10:56:17.716] else { [10:56:17.716] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:17.716] } [10:56:17.716] { [10:56:17.716] if (base::length(...future.futureOptionsAdded) > [10:56:17.716] 0L) { [10:56:17.716] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:17.716] base::names(opts) <- ...future.futureOptionsAdded [10:56:17.716] base::options(opts) [10:56:17.716] } [10:56:17.716] { [10:56:17.716] NULL [10:56:17.716] options(future.plan = NULL) [10:56:17.716] if (is.na(NA_character_)) [10:56:17.716] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.716] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:17.716] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:17.716] .init = FALSE) [10:56:17.716] } [10:56:17.716] } [10:56:17.716] } [10:56:17.716] }) [10:56:17.716] if (TRUE) { [10:56:17.716] base::sink(type = "output", split = FALSE) [10:56:17.716] if (TRUE) { [10:56:17.716] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:17.716] } [10:56:17.716] else { [10:56:17.716] ...future.result["stdout"] <- base::list(NULL) [10:56:17.716] } [10:56:17.716] base::close(...future.stdout) [10:56:17.716] ...future.stdout <- NULL [10:56:17.716] } [10:56:17.716] ...future.result$conditions <- ...future.conditions [10:56:17.716] ...future.result$finished <- base::Sys.time() [10:56:17.716] ...future.result [10:56:17.716] } [10:56:17.720] - Launch lazy future ... done [10:56:17.721] 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' [10:56:17.724] 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' [10:56:17.725] Searching for globals... [10:56:17.727] - globals found: [5] '{', 'x', '<-', '$', '$<-' [10:56:17.727] Searching for globals ... DONE [10:56:17.728] Resolving globals: TRUE [10:56:17.728] Resolving any globals that are futures ... [10:56:17.728] - globals: [5] '{', 'x', '<-', '$', '$<-' [10:56:17.728] Resolving any globals that are futures ... DONE [10:56:17.729] Resolving futures part of globals (recursively) ... [10:56:17.729] resolve() on list ... [10:56:17.729] recursive: 99 [10:56:17.729] length: 1 [10:56:17.729] elements: 'x' [10:56:17.730] length: 0 (resolved future 1) [10:56:17.730] resolve() on list ... DONE [10:56:17.730] - globals: [1] 'x' [10:56:17.730] Resolving futures part of globals (recursively) ... DONE [10:56:17.730] The total size of the 1 globals is 0 bytes (0 bytes) [10:56:17.731] 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') [10:56:17.733] - globals: [1] 'x' [10:56:17.733] [10:56:17.734] getGlobalsAndPackages() ... DONE [10:56:17.734] run() for 'Future' ... [10:56:17.734] - state: 'created' [10:56:17.734] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:17.737] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:17.737] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:17.737] - Field: 'label' [10:56:17.737] - Field: 'local' [10:56:17.737] - Field: 'owner' [10:56:17.738] - Field: 'envir' [10:56:17.738] - Field: 'packages' [10:56:17.738] - Field: 'gc' [10:56:17.738] - Field: 'conditions' [10:56:17.738] - Field: 'expr' [10:56:17.738] - Field: 'uuid' [10:56:17.739] - Field: 'seed' [10:56:17.739] - Field: 'version' [10:56:17.739] - Field: 'result' [10:56:17.739] - Field: 'asynchronous' [10:56:17.739] - Field: 'calls' [10:56:17.739] - Field: 'globals' [10:56:17.740] - Field: 'stdout' [10:56:17.740] - Field: 'earlySignal' [10:56:17.740] - Field: 'lazy' [10:56:17.740] - Field: 'state' [10:56:17.740] - Field: '.cluster' [10:56:17.740] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:17.741] - Launch lazy future ... [10:56:17.741] Packages needed by the future expression (n = 0): [10:56:17.741] Packages needed by future strategies (n = 0): [10:56:17.742] { [10:56:17.742] { [10:56:17.742] { [10:56:17.742] ...future.startTime <- base::Sys.time() [10:56:17.742] { [10:56:17.742] { [10:56:17.742] { [10:56:17.742] base::local({ [10:56:17.742] has_future <- base::requireNamespace("future", [10:56:17.742] quietly = TRUE) [10:56:17.742] if (has_future) { [10:56:17.742] ns <- base::getNamespace("future") [10:56:17.742] version <- ns[[".package"]][["version"]] [10:56:17.742] if (is.null(version)) [10:56:17.742] version <- utils::packageVersion("future") [10:56:17.742] } [10:56:17.742] else { [10:56:17.742] version <- NULL [10:56:17.742] } [10:56:17.742] if (!has_future || version < "1.8.0") { [10:56:17.742] info <- base::c(r_version = base::gsub("R version ", [10:56:17.742] "", base::R.version$version.string), [10:56:17.742] platform = base::sprintf("%s (%s-bit)", [10:56:17.742] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:17.742] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:17.742] "release", "version")], collapse = " "), [10:56:17.742] hostname = base::Sys.info()[["nodename"]]) [10:56:17.742] info <- base::sprintf("%s: %s", base::names(info), [10:56:17.742] info) [10:56:17.742] info <- base::paste(info, collapse = "; ") [10:56:17.742] if (!has_future) { [10:56:17.742] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:17.742] info) [10:56:17.742] } [10:56:17.742] else { [10:56:17.742] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:17.742] info, version) [10:56:17.742] } [10:56:17.742] base::stop(msg) [10:56:17.742] } [10:56:17.742] }) [10:56:17.742] } [10:56:17.742] ...future.strategy.old <- future::plan("list") [10:56:17.742] options(future.plan = NULL) [10:56:17.742] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.742] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:17.742] } [10:56:17.742] ...future.workdir <- getwd() [10:56:17.742] } [10:56:17.742] ...future.oldOptions <- base::as.list(base::.Options) [10:56:17.742] ...future.oldEnvVars <- base::Sys.getenv() [10:56:17.742] } [10:56:17.742] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [10:56:17.742] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:17.742] future.globals.onMissing = "error", future.globals.onReference = NULL, [10:56:17.742] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [10:56:17.742] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:17.742] future.stdout.windows.reencode = NULL, width = 80L) [10:56:17.742] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:17.742] base::names(...future.oldOptions)) [10:56:17.742] } [10:56:17.742] if (FALSE) { [10:56:17.742] } [10:56:17.742] else { [10:56:17.742] if (TRUE) { [10:56:17.742] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:17.742] open = "w") [10:56:17.742] } [10:56:17.742] else { [10:56:17.742] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:17.742] windows = "NUL", "/dev/null"), open = "w") [10:56:17.742] } [10:56:17.742] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:17.742] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:17.742] base::sink(type = "output", split = FALSE) [10:56:17.742] base::close(...future.stdout) [10:56:17.742] }, add = TRUE) [10:56:17.742] } [10:56:17.742] ...future.frame <- base::sys.nframe() [10:56:17.742] ...future.conditions <- base::list() [10:56:17.742] ...future.rng <- base::globalenv()$.Random.seed [10:56:17.742] if (FALSE) { [10:56:17.742] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:17.742] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:17.742] } [10:56:17.742] ...future.result <- base::tryCatch({ [10:56:17.742] base::withCallingHandlers({ [10:56:17.742] ...future.value <- base::withVisible(base::local({ [10:56:17.742] x$a <- 1 [10:56:17.742] x [10:56:17.742] })) [10:56:17.742] future::FutureResult(value = ...future.value$value, [10:56:17.742] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.742] ...future.rng), globalenv = if (FALSE) [10:56:17.742] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:17.742] ...future.globalenv.names)) [10:56:17.742] else NULL, started = ...future.startTime, version = "1.8") [10:56:17.742] }, condition = base::local({ [10:56:17.742] c <- base::c [10:56:17.742] inherits <- base::inherits [10:56:17.742] invokeRestart <- base::invokeRestart [10:56:17.742] length <- base::length [10:56:17.742] list <- base::list [10:56:17.742] seq.int <- base::seq.int [10:56:17.742] signalCondition <- base::signalCondition [10:56:17.742] sys.calls <- base::sys.calls [10:56:17.742] `[[` <- base::`[[` [10:56:17.742] `+` <- base::`+` [10:56:17.742] `<<-` <- base::`<<-` [10:56:17.742] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:17.742] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:17.742] 3L)] [10:56:17.742] } [10:56:17.742] function(cond) { [10:56:17.742] is_error <- inherits(cond, "error") [10:56:17.742] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:17.742] NULL) [10:56:17.742] if (is_error) { [10:56:17.742] sessionInformation <- function() { [10:56:17.742] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:17.742] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:17.742] search = base::search(), system = base::Sys.info()) [10:56:17.742] } [10:56:17.742] ...future.conditions[[length(...future.conditions) + [10:56:17.742] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:17.742] cond$call), session = sessionInformation(), [10:56:17.742] timestamp = base::Sys.time(), signaled = 0L) [10:56:17.742] signalCondition(cond) [10:56:17.742] } [10:56:17.742] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:17.742] signal <- FALSE && inherits(cond, character(0)) [10:56:17.742] ...future.conditions[[length(...future.conditions) + [10:56:17.742] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:17.742] if (FALSE && !signal) { [10:56:17.742] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.742] { [10:56:17.742] inherits <- base::inherits [10:56:17.742] invokeRestart <- base::invokeRestart [10:56:17.742] is.null <- base::is.null [10:56:17.742] muffled <- FALSE [10:56:17.742] if (inherits(cond, "message")) { [10:56:17.742] muffled <- grepl(pattern, "muffleMessage") [10:56:17.742] if (muffled) [10:56:17.742] invokeRestart("muffleMessage") [10:56:17.742] } [10:56:17.742] else if (inherits(cond, "warning")) { [10:56:17.742] muffled <- grepl(pattern, "muffleWarning") [10:56:17.742] if (muffled) [10:56:17.742] invokeRestart("muffleWarning") [10:56:17.742] } [10:56:17.742] else if (inherits(cond, "condition")) { [10:56:17.742] if (!is.null(pattern)) { [10:56:17.742] computeRestarts <- base::computeRestarts [10:56:17.742] grepl <- base::grepl [10:56:17.742] restarts <- computeRestarts(cond) [10:56:17.742] for (restart in restarts) { [10:56:17.742] name <- restart$name [10:56:17.742] if (is.null(name)) [10:56:17.742] next [10:56:17.742] if (!grepl(pattern, name)) [10:56:17.742] next [10:56:17.742] invokeRestart(restart) [10:56:17.742] muffled <- TRUE [10:56:17.742] break [10:56:17.742] } [10:56:17.742] } [10:56:17.742] } [10:56:17.742] invisible(muffled) [10:56:17.742] } [10:56:17.742] muffleCondition(cond, pattern = "^muffle") [10:56:17.742] } [10:56:17.742] } [10:56:17.742] else { [10:56:17.742] if (TRUE) { [10:56:17.742] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.742] { [10:56:17.742] inherits <- base::inherits [10:56:17.742] invokeRestart <- base::invokeRestart [10:56:17.742] is.null <- base::is.null [10:56:17.742] muffled <- FALSE [10:56:17.742] if (inherits(cond, "message")) { [10:56:17.742] muffled <- grepl(pattern, "muffleMessage") [10:56:17.742] if (muffled) [10:56:17.742] invokeRestart("muffleMessage") [10:56:17.742] } [10:56:17.742] else if (inherits(cond, "warning")) { [10:56:17.742] muffled <- grepl(pattern, "muffleWarning") [10:56:17.742] if (muffled) [10:56:17.742] invokeRestart("muffleWarning") [10:56:17.742] } [10:56:17.742] else if (inherits(cond, "condition")) { [10:56:17.742] if (!is.null(pattern)) { [10:56:17.742] computeRestarts <- base::computeRestarts [10:56:17.742] grepl <- base::grepl [10:56:17.742] restarts <- computeRestarts(cond) [10:56:17.742] for (restart in restarts) { [10:56:17.742] name <- restart$name [10:56:17.742] if (is.null(name)) [10:56:17.742] next [10:56:17.742] if (!grepl(pattern, name)) [10:56:17.742] next [10:56:17.742] invokeRestart(restart) [10:56:17.742] muffled <- TRUE [10:56:17.742] break [10:56:17.742] } [10:56:17.742] } [10:56:17.742] } [10:56:17.742] invisible(muffled) [10:56:17.742] } [10:56:17.742] muffleCondition(cond, pattern = "^muffle") [10:56:17.742] } [10:56:17.742] } [10:56:17.742] } [10:56:17.742] })) [10:56:17.742] }, error = function(ex) { [10:56:17.742] base::structure(base::list(value = NULL, visible = NULL, [10:56:17.742] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.742] ...future.rng), started = ...future.startTime, [10:56:17.742] finished = Sys.time(), session_uuid = NA_character_, [10:56:17.742] version = "1.8"), class = "FutureResult") [10:56:17.742] }, finally = { [10:56:17.742] if (!identical(...future.workdir, getwd())) [10:56:17.742] setwd(...future.workdir) [10:56:17.742] { [10:56:17.742] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:17.742] ...future.oldOptions$nwarnings <- NULL [10:56:17.742] } [10:56:17.742] base::options(...future.oldOptions) [10:56:17.742] if (.Platform$OS.type == "windows") { [10:56:17.742] old_names <- names(...future.oldEnvVars) [10:56:17.742] envs <- base::Sys.getenv() [10:56:17.742] names <- names(envs) [10:56:17.742] common <- intersect(names, old_names) [10:56:17.742] added <- setdiff(names, old_names) [10:56:17.742] removed <- setdiff(old_names, names) [10:56:17.742] changed <- common[...future.oldEnvVars[common] != [10:56:17.742] envs[common]] [10:56:17.742] NAMES <- toupper(changed) [10:56:17.742] args <- list() [10:56:17.742] for (kk in seq_along(NAMES)) { [10:56:17.742] name <- changed[[kk]] [10:56:17.742] NAME <- NAMES[[kk]] [10:56:17.742] if (name != NAME && is.element(NAME, old_names)) [10:56:17.742] next [10:56:17.742] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.742] } [10:56:17.742] NAMES <- toupper(added) [10:56:17.742] for (kk in seq_along(NAMES)) { [10:56:17.742] name <- added[[kk]] [10:56:17.742] NAME <- NAMES[[kk]] [10:56:17.742] if (name != NAME && is.element(NAME, old_names)) [10:56:17.742] next [10:56:17.742] args[[name]] <- "" [10:56:17.742] } [10:56:17.742] NAMES <- toupper(removed) [10:56:17.742] for (kk in seq_along(NAMES)) { [10:56:17.742] name <- removed[[kk]] [10:56:17.742] NAME <- NAMES[[kk]] [10:56:17.742] if (name != NAME && is.element(NAME, old_names)) [10:56:17.742] next [10:56:17.742] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.742] } [10:56:17.742] if (length(args) > 0) [10:56:17.742] base::do.call(base::Sys.setenv, args = args) [10:56:17.742] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:17.742] } [10:56:17.742] else { [10:56:17.742] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:17.742] } [10:56:17.742] { [10:56:17.742] if (base::length(...future.futureOptionsAdded) > [10:56:17.742] 0L) { [10:56:17.742] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:17.742] base::names(opts) <- ...future.futureOptionsAdded [10:56:17.742] base::options(opts) [10:56:17.742] } [10:56:17.742] { [10:56:17.742] NULL [10:56:17.742] options(future.plan = NULL) [10:56:17.742] if (is.na(NA_character_)) [10:56:17.742] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.742] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:17.742] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:17.742] .init = FALSE) [10:56:17.742] } [10:56:17.742] } [10:56:17.742] } [10:56:17.742] }) [10:56:17.742] if (TRUE) { [10:56:17.742] base::sink(type = "output", split = FALSE) [10:56:17.742] if (TRUE) { [10:56:17.742] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:17.742] } [10:56:17.742] else { [10:56:17.742] ...future.result["stdout"] <- base::list(NULL) [10:56:17.742] } [10:56:17.742] base::close(...future.stdout) [10:56:17.742] ...future.stdout <- NULL [10:56:17.742] } [10:56:17.742] ...future.result$conditions <- ...future.conditions [10:56:17.742] ...future.result$finished <- base::Sys.time() [10:56:17.742] ...future.result [10:56:17.742] } [10:56:17.745] - Launch lazy future ... done [10:56:17.746] 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' [10:56:17.748] 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' [10:56:17.749] Searching for globals... [10:56:17.752] - globals found: [5] '{', '<-', 'list', '$', '$<-' [10:56:17.752] Searching for globals ... DONE [10:56:17.752] Resolving globals: TRUE [10:56:17.752] Resolving any globals that are futures ... [10:56:17.752] - globals: [5] '{', '<-', 'list', '$', '$<-' [10:56:17.753] Resolving any globals that are futures ... DONE [10:56:17.753] [10:56:17.753] [10:56:17.753] getGlobalsAndPackages() ... DONE [10:56:17.754] run() for 'Future' ... [10:56:17.754] - state: 'created' [10:56:17.754] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:17.756] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:17.757] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:17.757] - Field: 'label' [10:56:17.757] - Field: 'local' [10:56:17.757] - Field: 'owner' [10:56:17.757] - Field: 'envir' [10:56:17.758] - Field: 'packages' [10:56:17.758] - Field: 'gc' [10:56:17.758] - Field: 'conditions' [10:56:17.758] - Field: 'expr' [10:56:17.758] - Field: 'uuid' [10:56:17.758] - Field: 'seed' [10:56:17.759] - Field: 'version' [10:56:17.759] - Field: 'result' [10:56:17.759] - Field: 'asynchronous' [10:56:17.759] - Field: 'calls' [10:56:17.759] - Field: 'globals' [10:56:17.759] - Field: 'stdout' [10:56:17.760] - Field: 'earlySignal' [10:56:17.760] - Field: 'lazy' [10:56:17.760] - Field: 'state' [10:56:17.760] - Field: '.cluster' [10:56:17.760] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:17.760] - Launch lazy future ... [10:56:17.761] Packages needed by the future expression (n = 0): [10:56:17.761] Packages needed by future strategies (n = 0): [10:56:17.761] { [10:56:17.761] { [10:56:17.761] { [10:56:17.761] ...future.startTime <- base::Sys.time() [10:56:17.761] { [10:56:17.761] { [10:56:17.761] { [10:56:17.761] base::local({ [10:56:17.761] has_future <- base::requireNamespace("future", [10:56:17.761] quietly = TRUE) [10:56:17.761] if (has_future) { [10:56:17.761] ns <- base::getNamespace("future") [10:56:17.761] version <- ns[[".package"]][["version"]] [10:56:17.761] if (is.null(version)) [10:56:17.761] version <- utils::packageVersion("future") [10:56:17.761] } [10:56:17.761] else { [10:56:17.761] version <- NULL [10:56:17.761] } [10:56:17.761] if (!has_future || version < "1.8.0") { [10:56:17.761] info <- base::c(r_version = base::gsub("R version ", [10:56:17.761] "", base::R.version$version.string), [10:56:17.761] platform = base::sprintf("%s (%s-bit)", [10:56:17.761] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:17.761] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:17.761] "release", "version")], collapse = " "), [10:56:17.761] hostname = base::Sys.info()[["nodename"]]) [10:56:17.761] info <- base::sprintf("%s: %s", base::names(info), [10:56:17.761] info) [10:56:17.761] info <- base::paste(info, collapse = "; ") [10:56:17.761] if (!has_future) { [10:56:17.761] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:17.761] info) [10:56:17.761] } [10:56:17.761] else { [10:56:17.761] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:17.761] info, version) [10:56:17.761] } [10:56:17.761] base::stop(msg) [10:56:17.761] } [10:56:17.761] }) [10:56:17.761] } [10:56:17.761] ...future.strategy.old <- future::plan("list") [10:56:17.761] options(future.plan = NULL) [10:56:17.761] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.761] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:17.761] } [10:56:17.761] ...future.workdir <- getwd() [10:56:17.761] } [10:56:17.761] ...future.oldOptions <- base::as.list(base::.Options) [10:56:17.761] ...future.oldEnvVars <- base::Sys.getenv() [10:56:17.761] } [10:56:17.761] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [10:56:17.761] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:17.761] future.globals.onMissing = "error", future.globals.onReference = NULL, [10:56:17.761] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [10:56:17.761] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:17.761] future.stdout.windows.reencode = NULL, width = 80L) [10:56:17.761] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:17.761] base::names(...future.oldOptions)) [10:56:17.761] } [10:56:17.761] if (FALSE) { [10:56:17.761] } [10:56:17.761] else { [10:56:17.761] if (TRUE) { [10:56:17.761] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:17.761] open = "w") [10:56:17.761] } [10:56:17.761] else { [10:56:17.761] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:17.761] windows = "NUL", "/dev/null"), open = "w") [10:56:17.761] } [10:56:17.761] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:17.761] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:17.761] base::sink(type = "output", split = FALSE) [10:56:17.761] base::close(...future.stdout) [10:56:17.761] }, add = TRUE) [10:56:17.761] } [10:56:17.761] ...future.frame <- base::sys.nframe() [10:56:17.761] ...future.conditions <- base::list() [10:56:17.761] ...future.rng <- base::globalenv()$.Random.seed [10:56:17.761] if (FALSE) { [10:56:17.761] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:17.761] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:17.761] } [10:56:17.761] ...future.result <- base::tryCatch({ [10:56:17.761] base::withCallingHandlers({ [10:56:17.761] ...future.value <- base::withVisible(base::local({ [10:56:17.761] x <- list(b = 2) [10:56:17.761] x$a <- 1 [10:56:17.761] x [10:56:17.761] })) [10:56:17.761] future::FutureResult(value = ...future.value$value, [10:56:17.761] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.761] ...future.rng), globalenv = if (FALSE) [10:56:17.761] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:17.761] ...future.globalenv.names)) [10:56:17.761] else NULL, started = ...future.startTime, version = "1.8") [10:56:17.761] }, condition = base::local({ [10:56:17.761] c <- base::c [10:56:17.761] inherits <- base::inherits [10:56:17.761] invokeRestart <- base::invokeRestart [10:56:17.761] length <- base::length [10:56:17.761] list <- base::list [10:56:17.761] seq.int <- base::seq.int [10:56:17.761] signalCondition <- base::signalCondition [10:56:17.761] sys.calls <- base::sys.calls [10:56:17.761] `[[` <- base::`[[` [10:56:17.761] `+` <- base::`+` [10:56:17.761] `<<-` <- base::`<<-` [10:56:17.761] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:17.761] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:17.761] 3L)] [10:56:17.761] } [10:56:17.761] function(cond) { [10:56:17.761] is_error <- inherits(cond, "error") [10:56:17.761] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:17.761] NULL) [10:56:17.761] if (is_error) { [10:56:17.761] sessionInformation <- function() { [10:56:17.761] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:17.761] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:17.761] search = base::search(), system = base::Sys.info()) [10:56:17.761] } [10:56:17.761] ...future.conditions[[length(...future.conditions) + [10:56:17.761] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:17.761] cond$call), session = sessionInformation(), [10:56:17.761] timestamp = base::Sys.time(), signaled = 0L) [10:56:17.761] signalCondition(cond) [10:56:17.761] } [10:56:17.761] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:17.761] signal <- FALSE && inherits(cond, character(0)) [10:56:17.761] ...future.conditions[[length(...future.conditions) + [10:56:17.761] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:17.761] if (FALSE && !signal) { [10:56:17.761] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.761] { [10:56:17.761] inherits <- base::inherits [10:56:17.761] invokeRestart <- base::invokeRestart [10:56:17.761] is.null <- base::is.null [10:56:17.761] muffled <- FALSE [10:56:17.761] if (inherits(cond, "message")) { [10:56:17.761] muffled <- grepl(pattern, "muffleMessage") [10:56:17.761] if (muffled) [10:56:17.761] invokeRestart("muffleMessage") [10:56:17.761] } [10:56:17.761] else if (inherits(cond, "warning")) { [10:56:17.761] muffled <- grepl(pattern, "muffleWarning") [10:56:17.761] if (muffled) [10:56:17.761] invokeRestart("muffleWarning") [10:56:17.761] } [10:56:17.761] else if (inherits(cond, "condition")) { [10:56:17.761] if (!is.null(pattern)) { [10:56:17.761] computeRestarts <- base::computeRestarts [10:56:17.761] grepl <- base::grepl [10:56:17.761] restarts <- computeRestarts(cond) [10:56:17.761] for (restart in restarts) { [10:56:17.761] name <- restart$name [10:56:17.761] if (is.null(name)) [10:56:17.761] next [10:56:17.761] if (!grepl(pattern, name)) [10:56:17.761] next [10:56:17.761] invokeRestart(restart) [10:56:17.761] muffled <- TRUE [10:56:17.761] break [10:56:17.761] } [10:56:17.761] } [10:56:17.761] } [10:56:17.761] invisible(muffled) [10:56:17.761] } [10:56:17.761] muffleCondition(cond, pattern = "^muffle") [10:56:17.761] } [10:56:17.761] } [10:56:17.761] else { [10:56:17.761] if (TRUE) { [10:56:17.761] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.761] { [10:56:17.761] inherits <- base::inherits [10:56:17.761] invokeRestart <- base::invokeRestart [10:56:17.761] is.null <- base::is.null [10:56:17.761] muffled <- FALSE [10:56:17.761] if (inherits(cond, "message")) { [10:56:17.761] muffled <- grepl(pattern, "muffleMessage") [10:56:17.761] if (muffled) [10:56:17.761] invokeRestart("muffleMessage") [10:56:17.761] } [10:56:17.761] else if (inherits(cond, "warning")) { [10:56:17.761] muffled <- grepl(pattern, "muffleWarning") [10:56:17.761] if (muffled) [10:56:17.761] invokeRestart("muffleWarning") [10:56:17.761] } [10:56:17.761] else if (inherits(cond, "condition")) { [10:56:17.761] if (!is.null(pattern)) { [10:56:17.761] computeRestarts <- base::computeRestarts [10:56:17.761] grepl <- base::grepl [10:56:17.761] restarts <- computeRestarts(cond) [10:56:17.761] for (restart in restarts) { [10:56:17.761] name <- restart$name [10:56:17.761] if (is.null(name)) [10:56:17.761] next [10:56:17.761] if (!grepl(pattern, name)) [10:56:17.761] next [10:56:17.761] invokeRestart(restart) [10:56:17.761] muffled <- TRUE [10:56:17.761] break [10:56:17.761] } [10:56:17.761] } [10:56:17.761] } [10:56:17.761] invisible(muffled) [10:56:17.761] } [10:56:17.761] muffleCondition(cond, pattern = "^muffle") [10:56:17.761] } [10:56:17.761] } [10:56:17.761] } [10:56:17.761] })) [10:56:17.761] }, error = function(ex) { [10:56:17.761] base::structure(base::list(value = NULL, visible = NULL, [10:56:17.761] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.761] ...future.rng), started = ...future.startTime, [10:56:17.761] finished = Sys.time(), session_uuid = NA_character_, [10:56:17.761] version = "1.8"), class = "FutureResult") [10:56:17.761] }, finally = { [10:56:17.761] if (!identical(...future.workdir, getwd())) [10:56:17.761] setwd(...future.workdir) [10:56:17.761] { [10:56:17.761] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:17.761] ...future.oldOptions$nwarnings <- NULL [10:56:17.761] } [10:56:17.761] base::options(...future.oldOptions) [10:56:17.761] if (.Platform$OS.type == "windows") { [10:56:17.761] old_names <- names(...future.oldEnvVars) [10:56:17.761] envs <- base::Sys.getenv() [10:56:17.761] names <- names(envs) [10:56:17.761] common <- intersect(names, old_names) [10:56:17.761] added <- setdiff(names, old_names) [10:56:17.761] removed <- setdiff(old_names, names) [10:56:17.761] changed <- common[...future.oldEnvVars[common] != [10:56:17.761] envs[common]] [10:56:17.761] NAMES <- toupper(changed) [10:56:17.761] args <- list() [10:56:17.761] for (kk in seq_along(NAMES)) { [10:56:17.761] name <- changed[[kk]] [10:56:17.761] NAME <- NAMES[[kk]] [10:56:17.761] if (name != NAME && is.element(NAME, old_names)) [10:56:17.761] next [10:56:17.761] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.761] } [10:56:17.761] NAMES <- toupper(added) [10:56:17.761] for (kk in seq_along(NAMES)) { [10:56:17.761] name <- added[[kk]] [10:56:17.761] NAME <- NAMES[[kk]] [10:56:17.761] if (name != NAME && is.element(NAME, old_names)) [10:56:17.761] next [10:56:17.761] args[[name]] <- "" [10:56:17.761] } [10:56:17.761] NAMES <- toupper(removed) [10:56:17.761] for (kk in seq_along(NAMES)) { [10:56:17.761] name <- removed[[kk]] [10:56:17.761] NAME <- NAMES[[kk]] [10:56:17.761] if (name != NAME && is.element(NAME, old_names)) [10:56:17.761] next [10:56:17.761] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.761] } [10:56:17.761] if (length(args) > 0) [10:56:17.761] base::do.call(base::Sys.setenv, args = args) [10:56:17.761] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:17.761] } [10:56:17.761] else { [10:56:17.761] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:17.761] } [10:56:17.761] { [10:56:17.761] if (base::length(...future.futureOptionsAdded) > [10:56:17.761] 0L) { [10:56:17.761] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:17.761] base::names(opts) <- ...future.futureOptionsAdded [10:56:17.761] base::options(opts) [10:56:17.761] } [10:56:17.761] { [10:56:17.761] NULL [10:56:17.761] options(future.plan = NULL) [10:56:17.761] if (is.na(NA_character_)) [10:56:17.761] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.761] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:17.761] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:17.761] .init = FALSE) [10:56:17.761] } [10:56:17.761] } [10:56:17.761] } [10:56:17.761] }) [10:56:17.761] if (TRUE) { [10:56:17.761] base::sink(type = "output", split = FALSE) [10:56:17.761] if (TRUE) { [10:56:17.761] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:17.761] } [10:56:17.761] else { [10:56:17.761] ...future.result["stdout"] <- base::list(NULL) [10:56:17.761] } [10:56:17.761] base::close(...future.stdout) [10:56:17.761] ...future.stdout <- NULL [10:56:17.761] } [10:56:17.761] ...future.result$conditions <- ...future.conditions [10:56:17.761] ...future.result$finished <- base::Sys.time() [10:56:17.761] ...future.result [10:56:17.761] } [10:56:17.765] - Launch lazy future ... done [10:56:17.765] 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' [10:56:17.768] 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' [10:56:17.769] Searching for globals... [10:56:17.772] - globals found: [5] '{', 'x', '<-', '[[', '[[<-' [10:56:17.773] Searching for globals ... DONE [10:56:17.773] Resolving globals: TRUE [10:56:17.773] Resolving any globals that are futures ... [10:56:17.773] - globals: [5] '{', 'x', '<-', '[[', '[[<-' [10:56:17.773] Resolving any globals that are futures ... DONE [10:56:17.774] Resolving futures part of globals (recursively) ... [10:56:17.774] resolve() on list ... [10:56:17.774] recursive: 99 [10:56:17.774] length: 1 [10:56:17.775] elements: 'x' [10:56:17.775] length: 0 (resolved future 1) [10:56:17.775] resolve() on list ... DONE [10:56:17.775] - globals: [1] 'x' [10:56:17.775] Resolving futures part of globals (recursively) ... DONE [10:56:17.775] The total size of the 1 globals is 0 bytes (0 bytes) [10:56:17.776] 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') [10:56:17.776] - globals: [1] 'x' [10:56:17.776] [10:56:17.776] getGlobalsAndPackages() ... DONE [10:56:17.777] run() for 'Future' ... [10:56:17.777] - state: 'created' [10:56:17.777] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:17.779] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:17.780] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:17.780] - Field: 'label' [10:56:17.780] - Field: 'local' [10:56:17.780] - Field: 'owner' [10:56:17.780] - Field: 'envir' [10:56:17.780] - Field: 'packages' [10:56:17.781] - Field: 'gc' [10:56:17.781] - Field: 'conditions' [10:56:17.781] - Field: 'expr' [10:56:17.781] - Field: 'uuid' [10:56:17.781] - Field: 'seed' [10:56:17.782] - Field: 'version' [10:56:17.782] - Field: 'result' [10:56:17.782] - Field: 'asynchronous' [10:56:17.782] - Field: 'calls' [10:56:17.782] - Field: 'globals' [10:56:17.782] - Field: 'stdout' [10:56:17.783] - Field: 'earlySignal' [10:56:17.783] - Field: 'lazy' [10:56:17.783] - Field: 'state' [10:56:17.783] - Field: '.cluster' [10:56:17.783] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:17.783] - Launch lazy future ... [10:56:17.784] Packages needed by the future expression (n = 0): [10:56:17.784] Packages needed by future strategies (n = 0): [10:56:17.784] { [10:56:17.784] { [10:56:17.784] { [10:56:17.784] ...future.startTime <- base::Sys.time() [10:56:17.784] { [10:56:17.784] { [10:56:17.784] { [10:56:17.784] base::local({ [10:56:17.784] has_future <- base::requireNamespace("future", [10:56:17.784] quietly = TRUE) [10:56:17.784] if (has_future) { [10:56:17.784] ns <- base::getNamespace("future") [10:56:17.784] version <- ns[[".package"]][["version"]] [10:56:17.784] if (is.null(version)) [10:56:17.784] version <- utils::packageVersion("future") [10:56:17.784] } [10:56:17.784] else { [10:56:17.784] version <- NULL [10:56:17.784] } [10:56:17.784] if (!has_future || version < "1.8.0") { [10:56:17.784] info <- base::c(r_version = base::gsub("R version ", [10:56:17.784] "", base::R.version$version.string), [10:56:17.784] platform = base::sprintf("%s (%s-bit)", [10:56:17.784] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:17.784] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:17.784] "release", "version")], collapse = " "), [10:56:17.784] hostname = base::Sys.info()[["nodename"]]) [10:56:17.784] info <- base::sprintf("%s: %s", base::names(info), [10:56:17.784] info) [10:56:17.784] info <- base::paste(info, collapse = "; ") [10:56:17.784] if (!has_future) { [10:56:17.784] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:17.784] info) [10:56:17.784] } [10:56:17.784] else { [10:56:17.784] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:17.784] info, version) [10:56:17.784] } [10:56:17.784] base::stop(msg) [10:56:17.784] } [10:56:17.784] }) [10:56:17.784] } [10:56:17.784] ...future.strategy.old <- future::plan("list") [10:56:17.784] options(future.plan = NULL) [10:56:17.784] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.784] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:17.784] } [10:56:17.784] ...future.workdir <- getwd() [10:56:17.784] } [10:56:17.784] ...future.oldOptions <- base::as.list(base::.Options) [10:56:17.784] ...future.oldEnvVars <- base::Sys.getenv() [10:56:17.784] } [10:56:17.784] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [10:56:17.784] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:17.784] future.globals.onMissing = "error", future.globals.onReference = NULL, [10:56:17.784] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [10:56:17.784] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:17.784] future.stdout.windows.reencode = NULL, width = 80L) [10:56:17.784] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:17.784] base::names(...future.oldOptions)) [10:56:17.784] } [10:56:17.784] if (FALSE) { [10:56:17.784] } [10:56:17.784] else { [10:56:17.784] if (TRUE) { [10:56:17.784] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:17.784] open = "w") [10:56:17.784] } [10:56:17.784] else { [10:56:17.784] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:17.784] windows = "NUL", "/dev/null"), open = "w") [10:56:17.784] } [10:56:17.784] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:17.784] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:17.784] base::sink(type = "output", split = FALSE) [10:56:17.784] base::close(...future.stdout) [10:56:17.784] }, add = TRUE) [10:56:17.784] } [10:56:17.784] ...future.frame <- base::sys.nframe() [10:56:17.784] ...future.conditions <- base::list() [10:56:17.784] ...future.rng <- base::globalenv()$.Random.seed [10:56:17.784] if (FALSE) { [10:56:17.784] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:17.784] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:17.784] } [10:56:17.784] ...future.result <- base::tryCatch({ [10:56:17.784] base::withCallingHandlers({ [10:56:17.784] ...future.value <- base::withVisible(base::local({ [10:56:17.784] x[["a"]] <- 1 [10:56:17.784] x [10:56:17.784] })) [10:56:17.784] future::FutureResult(value = ...future.value$value, [10:56:17.784] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.784] ...future.rng), globalenv = if (FALSE) [10:56:17.784] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:17.784] ...future.globalenv.names)) [10:56:17.784] else NULL, started = ...future.startTime, version = "1.8") [10:56:17.784] }, condition = base::local({ [10:56:17.784] c <- base::c [10:56:17.784] inherits <- base::inherits [10:56:17.784] invokeRestart <- base::invokeRestart [10:56:17.784] length <- base::length [10:56:17.784] list <- base::list [10:56:17.784] seq.int <- base::seq.int [10:56:17.784] signalCondition <- base::signalCondition [10:56:17.784] sys.calls <- base::sys.calls [10:56:17.784] `[[` <- base::`[[` [10:56:17.784] `+` <- base::`+` [10:56:17.784] `<<-` <- base::`<<-` [10:56:17.784] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:17.784] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:17.784] 3L)] [10:56:17.784] } [10:56:17.784] function(cond) { [10:56:17.784] is_error <- inherits(cond, "error") [10:56:17.784] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:17.784] NULL) [10:56:17.784] if (is_error) { [10:56:17.784] sessionInformation <- function() { [10:56:17.784] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:17.784] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:17.784] search = base::search(), system = base::Sys.info()) [10:56:17.784] } [10:56:17.784] ...future.conditions[[length(...future.conditions) + [10:56:17.784] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:17.784] cond$call), session = sessionInformation(), [10:56:17.784] timestamp = base::Sys.time(), signaled = 0L) [10:56:17.784] signalCondition(cond) [10:56:17.784] } [10:56:17.784] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:17.784] signal <- FALSE && inherits(cond, character(0)) [10:56:17.784] ...future.conditions[[length(...future.conditions) + [10:56:17.784] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:17.784] if (FALSE && !signal) { [10:56:17.784] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.784] { [10:56:17.784] inherits <- base::inherits [10:56:17.784] invokeRestart <- base::invokeRestart [10:56:17.784] is.null <- base::is.null [10:56:17.784] muffled <- FALSE [10:56:17.784] if (inherits(cond, "message")) { [10:56:17.784] muffled <- grepl(pattern, "muffleMessage") [10:56:17.784] if (muffled) [10:56:17.784] invokeRestart("muffleMessage") [10:56:17.784] } [10:56:17.784] else if (inherits(cond, "warning")) { [10:56:17.784] muffled <- grepl(pattern, "muffleWarning") [10:56:17.784] if (muffled) [10:56:17.784] invokeRestart("muffleWarning") [10:56:17.784] } [10:56:17.784] else if (inherits(cond, "condition")) { [10:56:17.784] if (!is.null(pattern)) { [10:56:17.784] computeRestarts <- base::computeRestarts [10:56:17.784] grepl <- base::grepl [10:56:17.784] restarts <- computeRestarts(cond) [10:56:17.784] for (restart in restarts) { [10:56:17.784] name <- restart$name [10:56:17.784] if (is.null(name)) [10:56:17.784] next [10:56:17.784] if (!grepl(pattern, name)) [10:56:17.784] next [10:56:17.784] invokeRestart(restart) [10:56:17.784] muffled <- TRUE [10:56:17.784] break [10:56:17.784] } [10:56:17.784] } [10:56:17.784] } [10:56:17.784] invisible(muffled) [10:56:17.784] } [10:56:17.784] muffleCondition(cond, pattern = "^muffle") [10:56:17.784] } [10:56:17.784] } [10:56:17.784] else { [10:56:17.784] if (TRUE) { [10:56:17.784] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.784] { [10:56:17.784] inherits <- base::inherits [10:56:17.784] invokeRestart <- base::invokeRestart [10:56:17.784] is.null <- base::is.null [10:56:17.784] muffled <- FALSE [10:56:17.784] if (inherits(cond, "message")) { [10:56:17.784] muffled <- grepl(pattern, "muffleMessage") [10:56:17.784] if (muffled) [10:56:17.784] invokeRestart("muffleMessage") [10:56:17.784] } [10:56:17.784] else if (inherits(cond, "warning")) { [10:56:17.784] muffled <- grepl(pattern, "muffleWarning") [10:56:17.784] if (muffled) [10:56:17.784] invokeRestart("muffleWarning") [10:56:17.784] } [10:56:17.784] else if (inherits(cond, "condition")) { [10:56:17.784] if (!is.null(pattern)) { [10:56:17.784] computeRestarts <- base::computeRestarts [10:56:17.784] grepl <- base::grepl [10:56:17.784] restarts <- computeRestarts(cond) [10:56:17.784] for (restart in restarts) { [10:56:17.784] name <- restart$name [10:56:17.784] if (is.null(name)) [10:56:17.784] next [10:56:17.784] if (!grepl(pattern, name)) [10:56:17.784] next [10:56:17.784] invokeRestart(restart) [10:56:17.784] muffled <- TRUE [10:56:17.784] break [10:56:17.784] } [10:56:17.784] } [10:56:17.784] } [10:56:17.784] invisible(muffled) [10:56:17.784] } [10:56:17.784] muffleCondition(cond, pattern = "^muffle") [10:56:17.784] } [10:56:17.784] } [10:56:17.784] } [10:56:17.784] })) [10:56:17.784] }, error = function(ex) { [10:56:17.784] base::structure(base::list(value = NULL, visible = NULL, [10:56:17.784] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.784] ...future.rng), started = ...future.startTime, [10:56:17.784] finished = Sys.time(), session_uuid = NA_character_, [10:56:17.784] version = "1.8"), class = "FutureResult") [10:56:17.784] }, finally = { [10:56:17.784] if (!identical(...future.workdir, getwd())) [10:56:17.784] setwd(...future.workdir) [10:56:17.784] { [10:56:17.784] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:17.784] ...future.oldOptions$nwarnings <- NULL [10:56:17.784] } [10:56:17.784] base::options(...future.oldOptions) [10:56:17.784] if (.Platform$OS.type == "windows") { [10:56:17.784] old_names <- names(...future.oldEnvVars) [10:56:17.784] envs <- base::Sys.getenv() [10:56:17.784] names <- names(envs) [10:56:17.784] common <- intersect(names, old_names) [10:56:17.784] added <- setdiff(names, old_names) [10:56:17.784] removed <- setdiff(old_names, names) [10:56:17.784] changed <- common[...future.oldEnvVars[common] != [10:56:17.784] envs[common]] [10:56:17.784] NAMES <- toupper(changed) [10:56:17.784] args <- list() [10:56:17.784] for (kk in seq_along(NAMES)) { [10:56:17.784] name <- changed[[kk]] [10:56:17.784] NAME <- NAMES[[kk]] [10:56:17.784] if (name != NAME && is.element(NAME, old_names)) [10:56:17.784] next [10:56:17.784] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.784] } [10:56:17.784] NAMES <- toupper(added) [10:56:17.784] for (kk in seq_along(NAMES)) { [10:56:17.784] name <- added[[kk]] [10:56:17.784] NAME <- NAMES[[kk]] [10:56:17.784] if (name != NAME && is.element(NAME, old_names)) [10:56:17.784] next [10:56:17.784] args[[name]] <- "" [10:56:17.784] } [10:56:17.784] NAMES <- toupper(removed) [10:56:17.784] for (kk in seq_along(NAMES)) { [10:56:17.784] name <- removed[[kk]] [10:56:17.784] NAME <- NAMES[[kk]] [10:56:17.784] if (name != NAME && is.element(NAME, old_names)) [10:56:17.784] next [10:56:17.784] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.784] } [10:56:17.784] if (length(args) > 0) [10:56:17.784] base::do.call(base::Sys.setenv, args = args) [10:56:17.784] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:17.784] } [10:56:17.784] else { [10:56:17.784] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:17.784] } [10:56:17.784] { [10:56:17.784] if (base::length(...future.futureOptionsAdded) > [10:56:17.784] 0L) { [10:56:17.784] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:17.784] base::names(opts) <- ...future.futureOptionsAdded [10:56:17.784] base::options(opts) [10:56:17.784] } [10:56:17.784] { [10:56:17.784] NULL [10:56:17.784] options(future.plan = NULL) [10:56:17.784] if (is.na(NA_character_)) [10:56:17.784] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.784] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:17.784] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:17.784] .init = FALSE) [10:56:17.784] } [10:56:17.784] } [10:56:17.784] } [10:56:17.784] }) [10:56:17.784] if (TRUE) { [10:56:17.784] base::sink(type = "output", split = FALSE) [10:56:17.784] if (TRUE) { [10:56:17.784] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:17.784] } [10:56:17.784] else { [10:56:17.784] ...future.result["stdout"] <- base::list(NULL) [10:56:17.784] } [10:56:17.784] base::close(...future.stdout) [10:56:17.784] ...future.stdout <- NULL [10:56:17.784] } [10:56:17.784] ...future.result$conditions <- ...future.conditions [10:56:17.784] ...future.result$finished <- base::Sys.time() [10:56:17.784] ...future.result [10:56:17.784] } [10:56:17.788] - Launch lazy future ... done [10:56:17.788] 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' [10:56:17.792] 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' [10:56:17.792] Searching for globals... [10:56:17.795] - globals found: [5] '{', 'x', '<-', '[[', '[[<-' [10:56:17.795] Searching for globals ... DONE [10:56:17.795] Resolving globals: TRUE [10:56:17.795] Resolving any globals that are futures ... [10:56:17.795] - globals: [5] '{', 'x', '<-', '[[', '[[<-' [10:56:17.795] Resolving any globals that are futures ... DONE [10:56:17.796] Resolving futures part of globals (recursively) ... [10:56:17.796] resolve() on list ... [10:56:17.796] recursive: 99 [10:56:17.797] length: 1 [10:56:17.797] elements: 'x' [10:56:17.797] length: 0 (resolved future 1) [10:56:17.797] resolve() on list ... DONE [10:56:17.797] - globals: [1] 'x' [10:56:17.797] Resolving futures part of globals (recursively) ... DONE [10:56:17.798] The total size of the 1 globals is 0 bytes (0 bytes) [10:56:17.798] 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') [10:56:17.798] - globals: [1] 'x' [10:56:17.798] [10:56:17.799] getGlobalsAndPackages() ... DONE [10:56:17.799] run() for 'Future' ... [10:56:17.799] - state: 'created' [10:56:17.799] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:17.801] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:17.802] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:17.802] - Field: 'label' [10:56:17.802] - Field: 'local' [10:56:17.802] - Field: 'owner' [10:56:17.802] - Field: 'envir' [10:56:17.803] - Field: 'packages' [10:56:17.803] - Field: 'gc' [10:56:17.803] - Field: 'conditions' [10:56:17.803] - Field: 'expr' [10:56:17.803] - Field: 'uuid' [10:56:17.803] - Field: 'seed' [10:56:17.804] - Field: 'version' [10:56:17.804] - Field: 'result' [10:56:17.804] - Field: 'asynchronous' [10:56:17.804] - Field: 'calls' [10:56:17.804] - Field: 'globals' [10:56:17.804] - Field: 'stdout' [10:56:17.805] - Field: 'earlySignal' [10:56:17.805] - Field: 'lazy' [10:56:17.805] - Field: 'state' [10:56:17.805] - Field: '.cluster' [10:56:17.805] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:17.805] - Launch lazy future ... [10:56:17.806] Packages needed by the future expression (n = 0): [10:56:17.806] Packages needed by future strategies (n = 0): [10:56:17.808] { [10:56:17.808] { [10:56:17.808] { [10:56:17.808] ...future.startTime <- base::Sys.time() [10:56:17.808] { [10:56:17.808] { [10:56:17.808] { [10:56:17.808] base::local({ [10:56:17.808] has_future <- base::requireNamespace("future", [10:56:17.808] quietly = TRUE) [10:56:17.808] if (has_future) { [10:56:17.808] ns <- base::getNamespace("future") [10:56:17.808] version <- ns[[".package"]][["version"]] [10:56:17.808] if (is.null(version)) [10:56:17.808] version <- utils::packageVersion("future") [10:56:17.808] } [10:56:17.808] else { [10:56:17.808] version <- NULL [10:56:17.808] } [10:56:17.808] if (!has_future || version < "1.8.0") { [10:56:17.808] info <- base::c(r_version = base::gsub("R version ", [10:56:17.808] "", base::R.version$version.string), [10:56:17.808] platform = base::sprintf("%s (%s-bit)", [10:56:17.808] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:17.808] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:17.808] "release", "version")], collapse = " "), [10:56:17.808] hostname = base::Sys.info()[["nodename"]]) [10:56:17.808] info <- base::sprintf("%s: %s", base::names(info), [10:56:17.808] info) [10:56:17.808] info <- base::paste(info, collapse = "; ") [10:56:17.808] if (!has_future) { [10:56:17.808] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:17.808] info) [10:56:17.808] } [10:56:17.808] else { [10:56:17.808] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:17.808] info, version) [10:56:17.808] } [10:56:17.808] base::stop(msg) [10:56:17.808] } [10:56:17.808] }) [10:56:17.808] } [10:56:17.808] ...future.strategy.old <- future::plan("list") [10:56:17.808] options(future.plan = NULL) [10:56:17.808] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.808] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:17.808] } [10:56:17.808] ...future.workdir <- getwd() [10:56:17.808] } [10:56:17.808] ...future.oldOptions <- base::as.list(base::.Options) [10:56:17.808] ...future.oldEnvVars <- base::Sys.getenv() [10:56:17.808] } [10:56:17.808] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [10:56:17.808] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:17.808] future.globals.onMissing = "error", future.globals.onReference = NULL, [10:56:17.808] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [10:56:17.808] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:17.808] future.stdout.windows.reencode = NULL, width = 80L) [10:56:17.808] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:17.808] base::names(...future.oldOptions)) [10:56:17.808] } [10:56:17.808] if (FALSE) { [10:56:17.808] } [10:56:17.808] else { [10:56:17.808] if (TRUE) { [10:56:17.808] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:17.808] open = "w") [10:56:17.808] } [10:56:17.808] else { [10:56:17.808] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:17.808] windows = "NUL", "/dev/null"), open = "w") [10:56:17.808] } [10:56:17.808] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:17.808] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:17.808] base::sink(type = "output", split = FALSE) [10:56:17.808] base::close(...future.stdout) [10:56:17.808] }, add = TRUE) [10:56:17.808] } [10:56:17.808] ...future.frame <- base::sys.nframe() [10:56:17.808] ...future.conditions <- base::list() [10:56:17.808] ...future.rng <- base::globalenv()$.Random.seed [10:56:17.808] if (FALSE) { [10:56:17.808] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:17.808] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:17.808] } [10:56:17.808] ...future.result <- base::tryCatch({ [10:56:17.808] base::withCallingHandlers({ [10:56:17.808] ...future.value <- base::withVisible(base::local({ [10:56:17.808] x[["a"]] <- 1 [10:56:17.808] x [10:56:17.808] })) [10:56:17.808] future::FutureResult(value = ...future.value$value, [10:56:17.808] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.808] ...future.rng), globalenv = if (FALSE) [10:56:17.808] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:17.808] ...future.globalenv.names)) [10:56:17.808] else NULL, started = ...future.startTime, version = "1.8") [10:56:17.808] }, condition = base::local({ [10:56:17.808] c <- base::c [10:56:17.808] inherits <- base::inherits [10:56:17.808] invokeRestart <- base::invokeRestart [10:56:17.808] length <- base::length [10:56:17.808] list <- base::list [10:56:17.808] seq.int <- base::seq.int [10:56:17.808] signalCondition <- base::signalCondition [10:56:17.808] sys.calls <- base::sys.calls [10:56:17.808] `[[` <- base::`[[` [10:56:17.808] `+` <- base::`+` [10:56:17.808] `<<-` <- base::`<<-` [10:56:17.808] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:17.808] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:17.808] 3L)] [10:56:17.808] } [10:56:17.808] function(cond) { [10:56:17.808] is_error <- inherits(cond, "error") [10:56:17.808] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:17.808] NULL) [10:56:17.808] if (is_error) { [10:56:17.808] sessionInformation <- function() { [10:56:17.808] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:17.808] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:17.808] search = base::search(), system = base::Sys.info()) [10:56:17.808] } [10:56:17.808] ...future.conditions[[length(...future.conditions) + [10:56:17.808] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:17.808] cond$call), session = sessionInformation(), [10:56:17.808] timestamp = base::Sys.time(), signaled = 0L) [10:56:17.808] signalCondition(cond) [10:56:17.808] } [10:56:17.808] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:17.808] signal <- FALSE && inherits(cond, character(0)) [10:56:17.808] ...future.conditions[[length(...future.conditions) + [10:56:17.808] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:17.808] if (FALSE && !signal) { [10:56:17.808] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.808] { [10:56:17.808] inherits <- base::inherits [10:56:17.808] invokeRestart <- base::invokeRestart [10:56:17.808] is.null <- base::is.null [10:56:17.808] muffled <- FALSE [10:56:17.808] if (inherits(cond, "message")) { [10:56:17.808] muffled <- grepl(pattern, "muffleMessage") [10:56:17.808] if (muffled) [10:56:17.808] invokeRestart("muffleMessage") [10:56:17.808] } [10:56:17.808] else if (inherits(cond, "warning")) { [10:56:17.808] muffled <- grepl(pattern, "muffleWarning") [10:56:17.808] if (muffled) [10:56:17.808] invokeRestart("muffleWarning") [10:56:17.808] } [10:56:17.808] else if (inherits(cond, "condition")) { [10:56:17.808] if (!is.null(pattern)) { [10:56:17.808] computeRestarts <- base::computeRestarts [10:56:17.808] grepl <- base::grepl [10:56:17.808] restarts <- computeRestarts(cond) [10:56:17.808] for (restart in restarts) { [10:56:17.808] name <- restart$name [10:56:17.808] if (is.null(name)) [10:56:17.808] next [10:56:17.808] if (!grepl(pattern, name)) [10:56:17.808] next [10:56:17.808] invokeRestart(restart) [10:56:17.808] muffled <- TRUE [10:56:17.808] break [10:56:17.808] } [10:56:17.808] } [10:56:17.808] } [10:56:17.808] invisible(muffled) [10:56:17.808] } [10:56:17.808] muffleCondition(cond, pattern = "^muffle") [10:56:17.808] } [10:56:17.808] } [10:56:17.808] else { [10:56:17.808] if (TRUE) { [10:56:17.808] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.808] { [10:56:17.808] inherits <- base::inherits [10:56:17.808] invokeRestart <- base::invokeRestart [10:56:17.808] is.null <- base::is.null [10:56:17.808] muffled <- FALSE [10:56:17.808] if (inherits(cond, "message")) { [10:56:17.808] muffled <- grepl(pattern, "muffleMessage") [10:56:17.808] if (muffled) [10:56:17.808] invokeRestart("muffleMessage") [10:56:17.808] } [10:56:17.808] else if (inherits(cond, "warning")) { [10:56:17.808] muffled <- grepl(pattern, "muffleWarning") [10:56:17.808] if (muffled) [10:56:17.808] invokeRestart("muffleWarning") [10:56:17.808] } [10:56:17.808] else if (inherits(cond, "condition")) { [10:56:17.808] if (!is.null(pattern)) { [10:56:17.808] computeRestarts <- base::computeRestarts [10:56:17.808] grepl <- base::grepl [10:56:17.808] restarts <- computeRestarts(cond) [10:56:17.808] for (restart in restarts) { [10:56:17.808] name <- restart$name [10:56:17.808] if (is.null(name)) [10:56:17.808] next [10:56:17.808] if (!grepl(pattern, name)) [10:56:17.808] next [10:56:17.808] invokeRestart(restart) [10:56:17.808] muffled <- TRUE [10:56:17.808] break [10:56:17.808] } [10:56:17.808] } [10:56:17.808] } [10:56:17.808] invisible(muffled) [10:56:17.808] } [10:56:17.808] muffleCondition(cond, pattern = "^muffle") [10:56:17.808] } [10:56:17.808] } [10:56:17.808] } [10:56:17.808] })) [10:56:17.808] }, error = function(ex) { [10:56:17.808] base::structure(base::list(value = NULL, visible = NULL, [10:56:17.808] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.808] ...future.rng), started = ...future.startTime, [10:56:17.808] finished = Sys.time(), session_uuid = NA_character_, [10:56:17.808] version = "1.8"), class = "FutureResult") [10:56:17.808] }, finally = { [10:56:17.808] if (!identical(...future.workdir, getwd())) [10:56:17.808] setwd(...future.workdir) [10:56:17.808] { [10:56:17.808] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:17.808] ...future.oldOptions$nwarnings <- NULL [10:56:17.808] } [10:56:17.808] base::options(...future.oldOptions) [10:56:17.808] if (.Platform$OS.type == "windows") { [10:56:17.808] old_names <- names(...future.oldEnvVars) [10:56:17.808] envs <- base::Sys.getenv() [10:56:17.808] names <- names(envs) [10:56:17.808] common <- intersect(names, old_names) [10:56:17.808] added <- setdiff(names, old_names) [10:56:17.808] removed <- setdiff(old_names, names) [10:56:17.808] changed <- common[...future.oldEnvVars[common] != [10:56:17.808] envs[common]] [10:56:17.808] NAMES <- toupper(changed) [10:56:17.808] args <- list() [10:56:17.808] for (kk in seq_along(NAMES)) { [10:56:17.808] name <- changed[[kk]] [10:56:17.808] NAME <- NAMES[[kk]] [10:56:17.808] if (name != NAME && is.element(NAME, old_names)) [10:56:17.808] next [10:56:17.808] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.808] } [10:56:17.808] NAMES <- toupper(added) [10:56:17.808] for (kk in seq_along(NAMES)) { [10:56:17.808] name <- added[[kk]] [10:56:17.808] NAME <- NAMES[[kk]] [10:56:17.808] if (name != NAME && is.element(NAME, old_names)) [10:56:17.808] next [10:56:17.808] args[[name]] <- "" [10:56:17.808] } [10:56:17.808] NAMES <- toupper(removed) [10:56:17.808] for (kk in seq_along(NAMES)) { [10:56:17.808] name <- removed[[kk]] [10:56:17.808] NAME <- NAMES[[kk]] [10:56:17.808] if (name != NAME && is.element(NAME, old_names)) [10:56:17.808] next [10:56:17.808] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.808] } [10:56:17.808] if (length(args) > 0) [10:56:17.808] base::do.call(base::Sys.setenv, args = args) [10:56:17.808] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:17.808] } [10:56:17.808] else { [10:56:17.808] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:17.808] } [10:56:17.808] { [10:56:17.808] if (base::length(...future.futureOptionsAdded) > [10:56:17.808] 0L) { [10:56:17.808] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:17.808] base::names(opts) <- ...future.futureOptionsAdded [10:56:17.808] base::options(opts) [10:56:17.808] } [10:56:17.808] { [10:56:17.808] NULL [10:56:17.808] options(future.plan = NULL) [10:56:17.808] if (is.na(NA_character_)) [10:56:17.808] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.808] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:17.808] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:17.808] .init = FALSE) [10:56:17.808] } [10:56:17.808] } [10:56:17.808] } [10:56:17.808] }) [10:56:17.808] if (TRUE) { [10:56:17.808] base::sink(type = "output", split = FALSE) [10:56:17.808] if (TRUE) { [10:56:17.808] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:17.808] } [10:56:17.808] else { [10:56:17.808] ...future.result["stdout"] <- base::list(NULL) [10:56:17.808] } [10:56:17.808] base::close(...future.stdout) [10:56:17.808] ...future.stdout <- NULL [10:56:17.808] } [10:56:17.808] ...future.result$conditions <- ...future.conditions [10:56:17.808] ...future.result$finished <- base::Sys.time() [10:56:17.808] ...future.result [10:56:17.808] } [10:56:17.812] - Launch lazy future ... done [10:56:17.812] 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' [10:56:17.814] 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' [10:56:17.814] Searching for globals... [10:56:17.817] - globals found: [6] '{', 'x', '<-', '[', '[<-', 'list' [10:56:17.817] Searching for globals ... DONE [10:56:17.817] Resolving globals: TRUE [10:56:17.818] Resolving any globals that are futures ... [10:56:17.818] - globals: [6] '{', 'x', '<-', '[', '[<-', 'list' [10:56:17.818] Resolving any globals that are futures ... DONE [10:56:17.818] Resolving futures part of globals (recursively) ... [10:56:17.819] resolve() on list ... [10:56:17.819] recursive: 99 [10:56:17.819] length: 1 [10:56:17.819] elements: 'x' [10:56:17.819] length: 0 (resolved future 1) [10:56:17.819] resolve() on list ... DONE [10:56:17.820] - globals: [1] 'x' [10:56:17.820] Resolving futures part of globals (recursively) ... DONE [10:56:17.820] The total size of the 1 globals is 0 bytes (0 bytes) [10:56:17.820] 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') [10:56:17.821] - globals: [1] 'x' [10:56:17.821] [10:56:17.821] getGlobalsAndPackages() ... DONE [10:56:17.821] run() for 'Future' ... [10:56:17.822] - state: 'created' [10:56:17.822] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:17.824] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:17.824] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:17.825] - Field: 'label' [10:56:17.825] - Field: 'local' [10:56:17.825] - Field: 'owner' [10:56:17.825] - Field: 'envir' [10:56:17.825] - Field: 'packages' [10:56:17.826] - Field: 'gc' [10:56:17.826] - Field: 'conditions' [10:56:17.826] - Field: 'expr' [10:56:17.826] - Field: 'uuid' [10:56:17.826] - Field: 'seed' [10:56:17.826] - Field: 'version' [10:56:17.827] - Field: 'result' [10:56:17.827] - Field: 'asynchronous' [10:56:17.827] - Field: 'calls' [10:56:17.827] - Field: 'globals' [10:56:17.827] - Field: 'stdout' [10:56:17.827] - Field: 'earlySignal' [10:56:17.828] - Field: 'lazy' [10:56:17.828] - Field: 'state' [10:56:17.828] - Field: '.cluster' [10:56:17.828] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:17.828] - Launch lazy future ... [10:56:17.828] Packages needed by the future expression (n = 0): [10:56:17.829] Packages needed by future strategies (n = 0): [10:56:17.829] { [10:56:17.829] { [10:56:17.829] { [10:56:17.829] ...future.startTime <- base::Sys.time() [10:56:17.829] { [10:56:17.829] { [10:56:17.829] { [10:56:17.829] base::local({ [10:56:17.829] has_future <- base::requireNamespace("future", [10:56:17.829] quietly = TRUE) [10:56:17.829] if (has_future) { [10:56:17.829] ns <- base::getNamespace("future") [10:56:17.829] version <- ns[[".package"]][["version"]] [10:56:17.829] if (is.null(version)) [10:56:17.829] version <- utils::packageVersion("future") [10:56:17.829] } [10:56:17.829] else { [10:56:17.829] version <- NULL [10:56:17.829] } [10:56:17.829] if (!has_future || version < "1.8.0") { [10:56:17.829] info <- base::c(r_version = base::gsub("R version ", [10:56:17.829] "", base::R.version$version.string), [10:56:17.829] platform = base::sprintf("%s (%s-bit)", [10:56:17.829] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:17.829] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:17.829] "release", "version")], collapse = " "), [10:56:17.829] hostname = base::Sys.info()[["nodename"]]) [10:56:17.829] info <- base::sprintf("%s: %s", base::names(info), [10:56:17.829] info) [10:56:17.829] info <- base::paste(info, collapse = "; ") [10:56:17.829] if (!has_future) { [10:56:17.829] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:17.829] info) [10:56:17.829] } [10:56:17.829] else { [10:56:17.829] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:17.829] info, version) [10:56:17.829] } [10:56:17.829] base::stop(msg) [10:56:17.829] } [10:56:17.829] }) [10:56:17.829] } [10:56:17.829] ...future.strategy.old <- future::plan("list") [10:56:17.829] options(future.plan = NULL) [10:56:17.829] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.829] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:17.829] } [10:56:17.829] ...future.workdir <- getwd() [10:56:17.829] } [10:56:17.829] ...future.oldOptions <- base::as.list(base::.Options) [10:56:17.829] ...future.oldEnvVars <- base::Sys.getenv() [10:56:17.829] } [10:56:17.829] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [10:56:17.829] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:17.829] future.globals.onMissing = "error", future.globals.onReference = NULL, [10:56:17.829] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [10:56:17.829] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:17.829] future.stdout.windows.reencode = NULL, width = 80L) [10:56:17.829] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:17.829] base::names(...future.oldOptions)) [10:56:17.829] } [10:56:17.829] if (FALSE) { [10:56:17.829] } [10:56:17.829] else { [10:56:17.829] if (TRUE) { [10:56:17.829] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:17.829] open = "w") [10:56:17.829] } [10:56:17.829] else { [10:56:17.829] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:17.829] windows = "NUL", "/dev/null"), open = "w") [10:56:17.829] } [10:56:17.829] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:17.829] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:17.829] base::sink(type = "output", split = FALSE) [10:56:17.829] base::close(...future.stdout) [10:56:17.829] }, add = TRUE) [10:56:17.829] } [10:56:17.829] ...future.frame <- base::sys.nframe() [10:56:17.829] ...future.conditions <- base::list() [10:56:17.829] ...future.rng <- base::globalenv()$.Random.seed [10:56:17.829] if (FALSE) { [10:56:17.829] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:17.829] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:17.829] } [10:56:17.829] ...future.result <- base::tryCatch({ [10:56:17.829] base::withCallingHandlers({ [10:56:17.829] ...future.value <- base::withVisible(base::local({ [10:56:17.829] x["a"] <- list(1) [10:56:17.829] x [10:56:17.829] })) [10:56:17.829] future::FutureResult(value = ...future.value$value, [10:56:17.829] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.829] ...future.rng), globalenv = if (FALSE) [10:56:17.829] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:17.829] ...future.globalenv.names)) [10:56:17.829] else NULL, started = ...future.startTime, version = "1.8") [10:56:17.829] }, condition = base::local({ [10:56:17.829] c <- base::c [10:56:17.829] inherits <- base::inherits [10:56:17.829] invokeRestart <- base::invokeRestart [10:56:17.829] length <- base::length [10:56:17.829] list <- base::list [10:56:17.829] seq.int <- base::seq.int [10:56:17.829] signalCondition <- base::signalCondition [10:56:17.829] sys.calls <- base::sys.calls [10:56:17.829] `[[` <- base::`[[` [10:56:17.829] `+` <- base::`+` [10:56:17.829] `<<-` <- base::`<<-` [10:56:17.829] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:17.829] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:17.829] 3L)] [10:56:17.829] } [10:56:17.829] function(cond) { [10:56:17.829] is_error <- inherits(cond, "error") [10:56:17.829] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:17.829] NULL) [10:56:17.829] if (is_error) { [10:56:17.829] sessionInformation <- function() { [10:56:17.829] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:17.829] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:17.829] search = base::search(), system = base::Sys.info()) [10:56:17.829] } [10:56:17.829] ...future.conditions[[length(...future.conditions) + [10:56:17.829] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:17.829] cond$call), session = sessionInformation(), [10:56:17.829] timestamp = base::Sys.time(), signaled = 0L) [10:56:17.829] signalCondition(cond) [10:56:17.829] } [10:56:17.829] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:17.829] signal <- FALSE && inherits(cond, character(0)) [10:56:17.829] ...future.conditions[[length(...future.conditions) + [10:56:17.829] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:17.829] if (FALSE && !signal) { [10:56:17.829] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.829] { [10:56:17.829] inherits <- base::inherits [10:56:17.829] invokeRestart <- base::invokeRestart [10:56:17.829] is.null <- base::is.null [10:56:17.829] muffled <- FALSE [10:56:17.829] if (inherits(cond, "message")) { [10:56:17.829] muffled <- grepl(pattern, "muffleMessage") [10:56:17.829] if (muffled) [10:56:17.829] invokeRestart("muffleMessage") [10:56:17.829] } [10:56:17.829] else if (inherits(cond, "warning")) { [10:56:17.829] muffled <- grepl(pattern, "muffleWarning") [10:56:17.829] if (muffled) [10:56:17.829] invokeRestart("muffleWarning") [10:56:17.829] } [10:56:17.829] else if (inherits(cond, "condition")) { [10:56:17.829] if (!is.null(pattern)) { [10:56:17.829] computeRestarts <- base::computeRestarts [10:56:17.829] grepl <- base::grepl [10:56:17.829] restarts <- computeRestarts(cond) [10:56:17.829] for (restart in restarts) { [10:56:17.829] name <- restart$name [10:56:17.829] if (is.null(name)) [10:56:17.829] next [10:56:17.829] if (!grepl(pattern, name)) [10:56:17.829] next [10:56:17.829] invokeRestart(restart) [10:56:17.829] muffled <- TRUE [10:56:17.829] break [10:56:17.829] } [10:56:17.829] } [10:56:17.829] } [10:56:17.829] invisible(muffled) [10:56:17.829] } [10:56:17.829] muffleCondition(cond, pattern = "^muffle") [10:56:17.829] } [10:56:17.829] } [10:56:17.829] else { [10:56:17.829] if (TRUE) { [10:56:17.829] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.829] { [10:56:17.829] inherits <- base::inherits [10:56:17.829] invokeRestart <- base::invokeRestart [10:56:17.829] is.null <- base::is.null [10:56:17.829] muffled <- FALSE [10:56:17.829] if (inherits(cond, "message")) { [10:56:17.829] muffled <- grepl(pattern, "muffleMessage") [10:56:17.829] if (muffled) [10:56:17.829] invokeRestart("muffleMessage") [10:56:17.829] } [10:56:17.829] else if (inherits(cond, "warning")) { [10:56:17.829] muffled <- grepl(pattern, "muffleWarning") [10:56:17.829] if (muffled) [10:56:17.829] invokeRestart("muffleWarning") [10:56:17.829] } [10:56:17.829] else if (inherits(cond, "condition")) { [10:56:17.829] if (!is.null(pattern)) { [10:56:17.829] computeRestarts <- base::computeRestarts [10:56:17.829] grepl <- base::grepl [10:56:17.829] restarts <- computeRestarts(cond) [10:56:17.829] for (restart in restarts) { [10:56:17.829] name <- restart$name [10:56:17.829] if (is.null(name)) [10:56:17.829] next [10:56:17.829] if (!grepl(pattern, name)) [10:56:17.829] next [10:56:17.829] invokeRestart(restart) [10:56:17.829] muffled <- TRUE [10:56:17.829] break [10:56:17.829] } [10:56:17.829] } [10:56:17.829] } [10:56:17.829] invisible(muffled) [10:56:17.829] } [10:56:17.829] muffleCondition(cond, pattern = "^muffle") [10:56:17.829] } [10:56:17.829] } [10:56:17.829] } [10:56:17.829] })) [10:56:17.829] }, error = function(ex) { [10:56:17.829] base::structure(base::list(value = NULL, visible = NULL, [10:56:17.829] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.829] ...future.rng), started = ...future.startTime, [10:56:17.829] finished = Sys.time(), session_uuid = NA_character_, [10:56:17.829] version = "1.8"), class = "FutureResult") [10:56:17.829] }, finally = { [10:56:17.829] if (!identical(...future.workdir, getwd())) [10:56:17.829] setwd(...future.workdir) [10:56:17.829] { [10:56:17.829] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:17.829] ...future.oldOptions$nwarnings <- NULL [10:56:17.829] } [10:56:17.829] base::options(...future.oldOptions) [10:56:17.829] if (.Platform$OS.type == "windows") { [10:56:17.829] old_names <- names(...future.oldEnvVars) [10:56:17.829] envs <- base::Sys.getenv() [10:56:17.829] names <- names(envs) [10:56:17.829] common <- intersect(names, old_names) [10:56:17.829] added <- setdiff(names, old_names) [10:56:17.829] removed <- setdiff(old_names, names) [10:56:17.829] changed <- common[...future.oldEnvVars[common] != [10:56:17.829] envs[common]] [10:56:17.829] NAMES <- toupper(changed) [10:56:17.829] args <- list() [10:56:17.829] for (kk in seq_along(NAMES)) { [10:56:17.829] name <- changed[[kk]] [10:56:17.829] NAME <- NAMES[[kk]] [10:56:17.829] if (name != NAME && is.element(NAME, old_names)) [10:56:17.829] next [10:56:17.829] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.829] } [10:56:17.829] NAMES <- toupper(added) [10:56:17.829] for (kk in seq_along(NAMES)) { [10:56:17.829] name <- added[[kk]] [10:56:17.829] NAME <- NAMES[[kk]] [10:56:17.829] if (name != NAME && is.element(NAME, old_names)) [10:56:17.829] next [10:56:17.829] args[[name]] <- "" [10:56:17.829] } [10:56:17.829] NAMES <- toupper(removed) [10:56:17.829] for (kk in seq_along(NAMES)) { [10:56:17.829] name <- removed[[kk]] [10:56:17.829] NAME <- NAMES[[kk]] [10:56:17.829] if (name != NAME && is.element(NAME, old_names)) [10:56:17.829] next [10:56:17.829] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.829] } [10:56:17.829] if (length(args) > 0) [10:56:17.829] base::do.call(base::Sys.setenv, args = args) [10:56:17.829] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:17.829] } [10:56:17.829] else { [10:56:17.829] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:17.829] } [10:56:17.829] { [10:56:17.829] if (base::length(...future.futureOptionsAdded) > [10:56:17.829] 0L) { [10:56:17.829] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:17.829] base::names(opts) <- ...future.futureOptionsAdded [10:56:17.829] base::options(opts) [10:56:17.829] } [10:56:17.829] { [10:56:17.829] NULL [10:56:17.829] options(future.plan = NULL) [10:56:17.829] if (is.na(NA_character_)) [10:56:17.829] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.829] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:17.829] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:17.829] .init = FALSE) [10:56:17.829] } [10:56:17.829] } [10:56:17.829] } [10:56:17.829] }) [10:56:17.829] if (TRUE) { [10:56:17.829] base::sink(type = "output", split = FALSE) [10:56:17.829] if (TRUE) { [10:56:17.829] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:17.829] } [10:56:17.829] else { [10:56:17.829] ...future.result["stdout"] <- base::list(NULL) [10:56:17.829] } [10:56:17.829] base::close(...future.stdout) [10:56:17.829] ...future.stdout <- NULL [10:56:17.829] } [10:56:17.829] ...future.result$conditions <- ...future.conditions [10:56:17.829] ...future.result$finished <- base::Sys.time() [10:56:17.829] ...future.result [10:56:17.829] } [10:56:17.833] - Launch lazy future ... done [10:56:17.833] 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' [10:56:17.838] 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' [10:56:17.838] Searching for globals... [10:56:17.841] - globals found: [6] '{', 'x', '<-', '[', '[<-', 'list' [10:56:17.841] Searching for globals ... DONE [10:56:17.841] Resolving globals: TRUE [10:56:17.841] Resolving any globals that are futures ... [10:56:17.842] - globals: [6] '{', 'x', '<-', '[', '[<-', 'list' [10:56:17.842] Resolving any globals that are futures ... DONE [10:56:17.842] Resolving futures part of globals (recursively) ... [10:56:17.843] resolve() on list ... [10:56:17.843] recursive: 99 [10:56:17.843] length: 1 [10:56:17.843] elements: 'x' [10:56:17.843] length: 0 (resolved future 1) [10:56:17.843] resolve() on list ... DONE [10:56:17.843] - globals: [1] 'x' [10:56:17.844] Resolving futures part of globals (recursively) ... DONE [10:56:17.844] The total size of the 1 globals is 0 bytes (0 bytes) [10:56:17.844] 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') [10:56:17.844] - globals: [1] 'x' [10:56:17.845] [10:56:17.845] getGlobalsAndPackages() ... DONE [10:56:17.845] run() for 'Future' ... [10:56:17.845] - state: 'created' [10:56:17.846] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:17.849] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:17.849] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:17.849] - Field: 'label' [10:56:17.850] - Field: 'local' [10:56:17.850] - Field: 'owner' [10:56:17.850] - Field: 'envir' [10:56:17.850] - Field: 'packages' [10:56:17.850] - Field: 'gc' [10:56:17.850] - Field: 'conditions' [10:56:17.851] - Field: 'expr' [10:56:17.851] - Field: 'uuid' [10:56:17.851] - Field: 'seed' [10:56:17.851] - Field: 'version' [10:56:17.852] - Field: 'result' [10:56:17.852] - Field: 'asynchronous' [10:56:17.852] - Field: 'calls' [10:56:17.852] - Field: 'globals' [10:56:17.852] - Field: 'stdout' [10:56:17.852] - Field: 'earlySignal' [10:56:17.853] - Field: 'lazy' [10:56:17.853] - Field: 'state' [10:56:17.853] - Field: '.cluster' [10:56:17.853] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:17.853] - Launch lazy future ... [10:56:17.853] Packages needed by the future expression (n = 0): [10:56:17.854] Packages needed by future strategies (n = 0): [10:56:17.854] { [10:56:17.854] { [10:56:17.854] { [10:56:17.854] ...future.startTime <- base::Sys.time() [10:56:17.854] { [10:56:17.854] { [10:56:17.854] { [10:56:17.854] base::local({ [10:56:17.854] has_future <- base::requireNamespace("future", [10:56:17.854] quietly = TRUE) [10:56:17.854] if (has_future) { [10:56:17.854] ns <- base::getNamespace("future") [10:56:17.854] version <- ns[[".package"]][["version"]] [10:56:17.854] if (is.null(version)) [10:56:17.854] version <- utils::packageVersion("future") [10:56:17.854] } [10:56:17.854] else { [10:56:17.854] version <- NULL [10:56:17.854] } [10:56:17.854] if (!has_future || version < "1.8.0") { [10:56:17.854] info <- base::c(r_version = base::gsub("R version ", [10:56:17.854] "", base::R.version$version.string), [10:56:17.854] platform = base::sprintf("%s (%s-bit)", [10:56:17.854] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:17.854] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:17.854] "release", "version")], collapse = " "), [10:56:17.854] hostname = base::Sys.info()[["nodename"]]) [10:56:17.854] info <- base::sprintf("%s: %s", base::names(info), [10:56:17.854] info) [10:56:17.854] info <- base::paste(info, collapse = "; ") [10:56:17.854] if (!has_future) { [10:56:17.854] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:17.854] info) [10:56:17.854] } [10:56:17.854] else { [10:56:17.854] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:17.854] info, version) [10:56:17.854] } [10:56:17.854] base::stop(msg) [10:56:17.854] } [10:56:17.854] }) [10:56:17.854] } [10:56:17.854] ...future.strategy.old <- future::plan("list") [10:56:17.854] options(future.plan = NULL) [10:56:17.854] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.854] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:17.854] } [10:56:17.854] ...future.workdir <- getwd() [10:56:17.854] } [10:56:17.854] ...future.oldOptions <- base::as.list(base::.Options) [10:56:17.854] ...future.oldEnvVars <- base::Sys.getenv() [10:56:17.854] } [10:56:17.854] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [10:56:17.854] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:17.854] future.globals.onMissing = "error", future.globals.onReference = NULL, [10:56:17.854] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [10:56:17.854] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:17.854] future.stdout.windows.reencode = NULL, width = 80L) [10:56:17.854] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:17.854] base::names(...future.oldOptions)) [10:56:17.854] } [10:56:17.854] if (FALSE) { [10:56:17.854] } [10:56:17.854] else { [10:56:17.854] if (TRUE) { [10:56:17.854] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:17.854] open = "w") [10:56:17.854] } [10:56:17.854] else { [10:56:17.854] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:17.854] windows = "NUL", "/dev/null"), open = "w") [10:56:17.854] } [10:56:17.854] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:17.854] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:17.854] base::sink(type = "output", split = FALSE) [10:56:17.854] base::close(...future.stdout) [10:56:17.854] }, add = TRUE) [10:56:17.854] } [10:56:17.854] ...future.frame <- base::sys.nframe() [10:56:17.854] ...future.conditions <- base::list() [10:56:17.854] ...future.rng <- base::globalenv()$.Random.seed [10:56:17.854] if (FALSE) { [10:56:17.854] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:17.854] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:17.854] } [10:56:17.854] ...future.result <- base::tryCatch({ [10:56:17.854] base::withCallingHandlers({ [10:56:17.854] ...future.value <- base::withVisible(base::local({ [10:56:17.854] x["a"] <- list(1) [10:56:17.854] x [10:56:17.854] })) [10:56:17.854] future::FutureResult(value = ...future.value$value, [10:56:17.854] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.854] ...future.rng), globalenv = if (FALSE) [10:56:17.854] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:17.854] ...future.globalenv.names)) [10:56:17.854] else NULL, started = ...future.startTime, version = "1.8") [10:56:17.854] }, condition = base::local({ [10:56:17.854] c <- base::c [10:56:17.854] inherits <- base::inherits [10:56:17.854] invokeRestart <- base::invokeRestart [10:56:17.854] length <- base::length [10:56:17.854] list <- base::list [10:56:17.854] seq.int <- base::seq.int [10:56:17.854] signalCondition <- base::signalCondition [10:56:17.854] sys.calls <- base::sys.calls [10:56:17.854] `[[` <- base::`[[` [10:56:17.854] `+` <- base::`+` [10:56:17.854] `<<-` <- base::`<<-` [10:56:17.854] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:17.854] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:17.854] 3L)] [10:56:17.854] } [10:56:17.854] function(cond) { [10:56:17.854] is_error <- inherits(cond, "error") [10:56:17.854] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:17.854] NULL) [10:56:17.854] if (is_error) { [10:56:17.854] sessionInformation <- function() { [10:56:17.854] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:17.854] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:17.854] search = base::search(), system = base::Sys.info()) [10:56:17.854] } [10:56:17.854] ...future.conditions[[length(...future.conditions) + [10:56:17.854] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:17.854] cond$call), session = sessionInformation(), [10:56:17.854] timestamp = base::Sys.time(), signaled = 0L) [10:56:17.854] signalCondition(cond) [10:56:17.854] } [10:56:17.854] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:17.854] signal <- FALSE && inherits(cond, character(0)) [10:56:17.854] ...future.conditions[[length(...future.conditions) + [10:56:17.854] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:17.854] if (FALSE && !signal) { [10:56:17.854] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.854] { [10:56:17.854] inherits <- base::inherits [10:56:17.854] invokeRestart <- base::invokeRestart [10:56:17.854] is.null <- base::is.null [10:56:17.854] muffled <- FALSE [10:56:17.854] if (inherits(cond, "message")) { [10:56:17.854] muffled <- grepl(pattern, "muffleMessage") [10:56:17.854] if (muffled) [10:56:17.854] invokeRestart("muffleMessage") [10:56:17.854] } [10:56:17.854] else if (inherits(cond, "warning")) { [10:56:17.854] muffled <- grepl(pattern, "muffleWarning") [10:56:17.854] if (muffled) [10:56:17.854] invokeRestart("muffleWarning") [10:56:17.854] } [10:56:17.854] else if (inherits(cond, "condition")) { [10:56:17.854] if (!is.null(pattern)) { [10:56:17.854] computeRestarts <- base::computeRestarts [10:56:17.854] grepl <- base::grepl [10:56:17.854] restarts <- computeRestarts(cond) [10:56:17.854] for (restart in restarts) { [10:56:17.854] name <- restart$name [10:56:17.854] if (is.null(name)) [10:56:17.854] next [10:56:17.854] if (!grepl(pattern, name)) [10:56:17.854] next [10:56:17.854] invokeRestart(restart) [10:56:17.854] muffled <- TRUE [10:56:17.854] break [10:56:17.854] } [10:56:17.854] } [10:56:17.854] } [10:56:17.854] invisible(muffled) [10:56:17.854] } [10:56:17.854] muffleCondition(cond, pattern = "^muffle") [10:56:17.854] } [10:56:17.854] } [10:56:17.854] else { [10:56:17.854] if (TRUE) { [10:56:17.854] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.854] { [10:56:17.854] inherits <- base::inherits [10:56:17.854] invokeRestart <- base::invokeRestart [10:56:17.854] is.null <- base::is.null [10:56:17.854] muffled <- FALSE [10:56:17.854] if (inherits(cond, "message")) { [10:56:17.854] muffled <- grepl(pattern, "muffleMessage") [10:56:17.854] if (muffled) [10:56:17.854] invokeRestart("muffleMessage") [10:56:17.854] } [10:56:17.854] else if (inherits(cond, "warning")) { [10:56:17.854] muffled <- grepl(pattern, "muffleWarning") [10:56:17.854] if (muffled) [10:56:17.854] invokeRestart("muffleWarning") [10:56:17.854] } [10:56:17.854] else if (inherits(cond, "condition")) { [10:56:17.854] if (!is.null(pattern)) { [10:56:17.854] computeRestarts <- base::computeRestarts [10:56:17.854] grepl <- base::grepl [10:56:17.854] restarts <- computeRestarts(cond) [10:56:17.854] for (restart in restarts) { [10:56:17.854] name <- restart$name [10:56:17.854] if (is.null(name)) [10:56:17.854] next [10:56:17.854] if (!grepl(pattern, name)) [10:56:17.854] next [10:56:17.854] invokeRestart(restart) [10:56:17.854] muffled <- TRUE [10:56:17.854] break [10:56:17.854] } [10:56:17.854] } [10:56:17.854] } [10:56:17.854] invisible(muffled) [10:56:17.854] } [10:56:17.854] muffleCondition(cond, pattern = "^muffle") [10:56:17.854] } [10:56:17.854] } [10:56:17.854] } [10:56:17.854] })) [10:56:17.854] }, error = function(ex) { [10:56:17.854] base::structure(base::list(value = NULL, visible = NULL, [10:56:17.854] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.854] ...future.rng), started = ...future.startTime, [10:56:17.854] finished = Sys.time(), session_uuid = NA_character_, [10:56:17.854] version = "1.8"), class = "FutureResult") [10:56:17.854] }, finally = { [10:56:17.854] if (!identical(...future.workdir, getwd())) [10:56:17.854] setwd(...future.workdir) [10:56:17.854] { [10:56:17.854] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:17.854] ...future.oldOptions$nwarnings <- NULL [10:56:17.854] } [10:56:17.854] base::options(...future.oldOptions) [10:56:17.854] if (.Platform$OS.type == "windows") { [10:56:17.854] old_names <- names(...future.oldEnvVars) [10:56:17.854] envs <- base::Sys.getenv() [10:56:17.854] names <- names(envs) [10:56:17.854] common <- intersect(names, old_names) [10:56:17.854] added <- setdiff(names, old_names) [10:56:17.854] removed <- setdiff(old_names, names) [10:56:17.854] changed <- common[...future.oldEnvVars[common] != [10:56:17.854] envs[common]] [10:56:17.854] NAMES <- toupper(changed) [10:56:17.854] args <- list() [10:56:17.854] for (kk in seq_along(NAMES)) { [10:56:17.854] name <- changed[[kk]] [10:56:17.854] NAME <- NAMES[[kk]] [10:56:17.854] if (name != NAME && is.element(NAME, old_names)) [10:56:17.854] next [10:56:17.854] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.854] } [10:56:17.854] NAMES <- toupper(added) [10:56:17.854] for (kk in seq_along(NAMES)) { [10:56:17.854] name <- added[[kk]] [10:56:17.854] NAME <- NAMES[[kk]] [10:56:17.854] if (name != NAME && is.element(NAME, old_names)) [10:56:17.854] next [10:56:17.854] args[[name]] <- "" [10:56:17.854] } [10:56:17.854] NAMES <- toupper(removed) [10:56:17.854] for (kk in seq_along(NAMES)) { [10:56:17.854] name <- removed[[kk]] [10:56:17.854] NAME <- NAMES[[kk]] [10:56:17.854] if (name != NAME && is.element(NAME, old_names)) [10:56:17.854] next [10:56:17.854] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.854] } [10:56:17.854] if (length(args) > 0) [10:56:17.854] base::do.call(base::Sys.setenv, args = args) [10:56:17.854] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:17.854] } [10:56:17.854] else { [10:56:17.854] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:17.854] } [10:56:17.854] { [10:56:17.854] if (base::length(...future.futureOptionsAdded) > [10:56:17.854] 0L) { [10:56:17.854] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:17.854] base::names(opts) <- ...future.futureOptionsAdded [10:56:17.854] base::options(opts) [10:56:17.854] } [10:56:17.854] { [10:56:17.854] NULL [10:56:17.854] options(future.plan = NULL) [10:56:17.854] if (is.na(NA_character_)) [10:56:17.854] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.854] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:17.854] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:17.854] .init = FALSE) [10:56:17.854] } [10:56:17.854] } [10:56:17.854] } [10:56:17.854] }) [10:56:17.854] if (TRUE) { [10:56:17.854] base::sink(type = "output", split = FALSE) [10:56:17.854] if (TRUE) { [10:56:17.854] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:17.854] } [10:56:17.854] else { [10:56:17.854] ...future.result["stdout"] <- base::list(NULL) [10:56:17.854] } [10:56:17.854] base::close(...future.stdout) [10:56:17.854] ...future.stdout <- NULL [10:56:17.854] } [10:56:17.854] ...future.result$conditions <- ...future.conditions [10:56:17.854] ...future.result$finished <- base::Sys.time() [10:56:17.854] ...future.result [10:56:17.854] } [10:56:17.858] - Launch lazy future ... done [10:56:17.858] 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' [10:56:17.860] 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' [10:56:17.861] Searching for globals... [10:56:17.863] - globals found: [7] '{', 'x', '<-', '[', 'name', '[<-', 'list' [10:56:17.864] Searching for globals ... DONE [10:56:17.864] Resolving globals: TRUE [10:56:17.864] Resolving any globals that are futures ... [10:56:17.864] - globals: [7] '{', 'x', '<-', '[', 'name', '[<-', 'list' [10:56:17.864] Resolving any globals that are futures ... DONE [10:56:17.865] Resolving futures part of globals (recursively) ... [10:56:17.865] resolve() on list ... [10:56:17.865] recursive: 99 [10:56:17.865] length: 2 [10:56:17.866] elements: 'x', 'name' [10:56:17.866] length: 1 (resolved future 1) [10:56:17.866] length: 0 (resolved future 2) [10:56:17.866] resolve() on list ... DONE [10:56:17.866] - globals: [2] 'x', 'name' [10:56:17.866] Resolving futures part of globals (recursively) ... DONE [10:56:17.867] The total size of the 2 globals is 112 bytes (112 bytes) [10:56:17.867] 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') [10:56:17.867] - globals: [2] 'x', 'name' [10:56:17.868] [10:56:17.868] getGlobalsAndPackages() ... DONE [10:56:17.868] run() for 'Future' ... [10:56:17.868] - state: 'created' [10:56:17.868] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:17.871] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:17.871] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:17.871] - Field: 'label' [10:56:17.871] - Field: 'local' [10:56:17.871] - Field: 'owner' [10:56:17.872] - Field: 'envir' [10:56:17.872] - Field: 'packages' [10:56:17.872] - Field: 'gc' [10:56:17.872] - Field: 'conditions' [10:56:17.872] - Field: 'expr' [10:56:17.872] - Field: 'uuid' [10:56:17.873] - Field: 'seed' [10:56:17.873] - Field: 'version' [10:56:17.873] - Field: 'result' [10:56:17.873] - Field: 'asynchronous' [10:56:17.873] - Field: 'calls' [10:56:17.873] - Field: 'globals' [10:56:17.874] - Field: 'stdout' [10:56:17.874] - Field: 'earlySignal' [10:56:17.874] - Field: 'lazy' [10:56:17.874] - Field: 'state' [10:56:17.874] - Field: '.cluster' [10:56:17.875] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:17.875] - Launch lazy future ... [10:56:17.875] Packages needed by the future expression (n = 0): [10:56:17.875] Packages needed by future strategies (n = 0): [10:56:17.876] { [10:56:17.876] { [10:56:17.876] { [10:56:17.876] ...future.startTime <- base::Sys.time() [10:56:17.876] { [10:56:17.876] { [10:56:17.876] { [10:56:17.876] base::local({ [10:56:17.876] has_future <- base::requireNamespace("future", [10:56:17.876] quietly = TRUE) [10:56:17.876] if (has_future) { [10:56:17.876] ns <- base::getNamespace("future") [10:56:17.876] version <- ns[[".package"]][["version"]] [10:56:17.876] if (is.null(version)) [10:56:17.876] version <- utils::packageVersion("future") [10:56:17.876] } [10:56:17.876] else { [10:56:17.876] version <- NULL [10:56:17.876] } [10:56:17.876] if (!has_future || version < "1.8.0") { [10:56:17.876] info <- base::c(r_version = base::gsub("R version ", [10:56:17.876] "", base::R.version$version.string), [10:56:17.876] platform = base::sprintf("%s (%s-bit)", [10:56:17.876] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:17.876] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:17.876] "release", "version")], collapse = " "), [10:56:17.876] hostname = base::Sys.info()[["nodename"]]) [10:56:17.876] info <- base::sprintf("%s: %s", base::names(info), [10:56:17.876] info) [10:56:17.876] info <- base::paste(info, collapse = "; ") [10:56:17.876] if (!has_future) { [10:56:17.876] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:17.876] info) [10:56:17.876] } [10:56:17.876] else { [10:56:17.876] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:17.876] info, version) [10:56:17.876] } [10:56:17.876] base::stop(msg) [10:56:17.876] } [10:56:17.876] }) [10:56:17.876] } [10:56:17.876] ...future.strategy.old <- future::plan("list") [10:56:17.876] options(future.plan = NULL) [10:56:17.876] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.876] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:17.876] } [10:56:17.876] ...future.workdir <- getwd() [10:56:17.876] } [10:56:17.876] ...future.oldOptions <- base::as.list(base::.Options) [10:56:17.876] ...future.oldEnvVars <- base::Sys.getenv() [10:56:17.876] } [10:56:17.876] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [10:56:17.876] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:17.876] future.globals.onMissing = "error", future.globals.onReference = NULL, [10:56:17.876] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [10:56:17.876] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:17.876] future.stdout.windows.reencode = NULL, width = 80L) [10:56:17.876] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:17.876] base::names(...future.oldOptions)) [10:56:17.876] } [10:56:17.876] if (FALSE) { [10:56:17.876] } [10:56:17.876] else { [10:56:17.876] if (TRUE) { [10:56:17.876] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:17.876] open = "w") [10:56:17.876] } [10:56:17.876] else { [10:56:17.876] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:17.876] windows = "NUL", "/dev/null"), open = "w") [10:56:17.876] } [10:56:17.876] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:17.876] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:17.876] base::sink(type = "output", split = FALSE) [10:56:17.876] base::close(...future.stdout) [10:56:17.876] }, add = TRUE) [10:56:17.876] } [10:56:17.876] ...future.frame <- base::sys.nframe() [10:56:17.876] ...future.conditions <- base::list() [10:56:17.876] ...future.rng <- base::globalenv()$.Random.seed [10:56:17.876] if (FALSE) { [10:56:17.876] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:17.876] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:17.876] } [10:56:17.876] ...future.result <- base::tryCatch({ [10:56:17.876] base::withCallingHandlers({ [10:56:17.876] ...future.value <- base::withVisible(base::local({ [10:56:17.876] x[name] <- list(1) [10:56:17.876] x [10:56:17.876] })) [10:56:17.876] future::FutureResult(value = ...future.value$value, [10:56:17.876] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.876] ...future.rng), globalenv = if (FALSE) [10:56:17.876] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:17.876] ...future.globalenv.names)) [10:56:17.876] else NULL, started = ...future.startTime, version = "1.8") [10:56:17.876] }, condition = base::local({ [10:56:17.876] c <- base::c [10:56:17.876] inherits <- base::inherits [10:56:17.876] invokeRestart <- base::invokeRestart [10:56:17.876] length <- base::length [10:56:17.876] list <- base::list [10:56:17.876] seq.int <- base::seq.int [10:56:17.876] signalCondition <- base::signalCondition [10:56:17.876] sys.calls <- base::sys.calls [10:56:17.876] `[[` <- base::`[[` [10:56:17.876] `+` <- base::`+` [10:56:17.876] `<<-` <- base::`<<-` [10:56:17.876] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:17.876] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:17.876] 3L)] [10:56:17.876] } [10:56:17.876] function(cond) { [10:56:17.876] is_error <- inherits(cond, "error") [10:56:17.876] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:17.876] NULL) [10:56:17.876] if (is_error) { [10:56:17.876] sessionInformation <- function() { [10:56:17.876] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:17.876] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:17.876] search = base::search(), system = base::Sys.info()) [10:56:17.876] } [10:56:17.876] ...future.conditions[[length(...future.conditions) + [10:56:17.876] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:17.876] cond$call), session = sessionInformation(), [10:56:17.876] timestamp = base::Sys.time(), signaled = 0L) [10:56:17.876] signalCondition(cond) [10:56:17.876] } [10:56:17.876] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:17.876] signal <- FALSE && inherits(cond, character(0)) [10:56:17.876] ...future.conditions[[length(...future.conditions) + [10:56:17.876] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:17.876] if (FALSE && !signal) { [10:56:17.876] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.876] { [10:56:17.876] inherits <- base::inherits [10:56:17.876] invokeRestart <- base::invokeRestart [10:56:17.876] is.null <- base::is.null [10:56:17.876] muffled <- FALSE [10:56:17.876] if (inherits(cond, "message")) { [10:56:17.876] muffled <- grepl(pattern, "muffleMessage") [10:56:17.876] if (muffled) [10:56:17.876] invokeRestart("muffleMessage") [10:56:17.876] } [10:56:17.876] else if (inherits(cond, "warning")) { [10:56:17.876] muffled <- grepl(pattern, "muffleWarning") [10:56:17.876] if (muffled) [10:56:17.876] invokeRestart("muffleWarning") [10:56:17.876] } [10:56:17.876] else if (inherits(cond, "condition")) { [10:56:17.876] if (!is.null(pattern)) { [10:56:17.876] computeRestarts <- base::computeRestarts [10:56:17.876] grepl <- base::grepl [10:56:17.876] restarts <- computeRestarts(cond) [10:56:17.876] for (restart in restarts) { [10:56:17.876] name <- restart$name [10:56:17.876] if (is.null(name)) [10:56:17.876] next [10:56:17.876] if (!grepl(pattern, name)) [10:56:17.876] next [10:56:17.876] invokeRestart(restart) [10:56:17.876] muffled <- TRUE [10:56:17.876] break [10:56:17.876] } [10:56:17.876] } [10:56:17.876] } [10:56:17.876] invisible(muffled) [10:56:17.876] } [10:56:17.876] muffleCondition(cond, pattern = "^muffle") [10:56:17.876] } [10:56:17.876] } [10:56:17.876] else { [10:56:17.876] if (TRUE) { [10:56:17.876] muffleCondition <- function (cond, pattern = "^muffle") [10:56:17.876] { [10:56:17.876] inherits <- base::inherits [10:56:17.876] invokeRestart <- base::invokeRestart [10:56:17.876] is.null <- base::is.null [10:56:17.876] muffled <- FALSE [10:56:17.876] if (inherits(cond, "message")) { [10:56:17.876] muffled <- grepl(pattern, "muffleMessage") [10:56:17.876] if (muffled) [10:56:17.876] invokeRestart("muffleMessage") [10:56:17.876] } [10:56:17.876] else if (inherits(cond, "warning")) { [10:56:17.876] muffled <- grepl(pattern, "muffleWarning") [10:56:17.876] if (muffled) [10:56:17.876] invokeRestart("muffleWarning") [10:56:17.876] } [10:56:17.876] else if (inherits(cond, "condition")) { [10:56:17.876] if (!is.null(pattern)) { [10:56:17.876] computeRestarts <- base::computeRestarts [10:56:17.876] grepl <- base::grepl [10:56:17.876] restarts <- computeRestarts(cond) [10:56:17.876] for (restart in restarts) { [10:56:17.876] name <- restart$name [10:56:17.876] if (is.null(name)) [10:56:17.876] next [10:56:17.876] if (!grepl(pattern, name)) [10:56:17.876] next [10:56:17.876] invokeRestart(restart) [10:56:17.876] muffled <- TRUE [10:56:17.876] break [10:56:17.876] } [10:56:17.876] } [10:56:17.876] } [10:56:17.876] invisible(muffled) [10:56:17.876] } [10:56:17.876] muffleCondition(cond, pattern = "^muffle") [10:56:17.876] } [10:56:17.876] } [10:56:17.876] } [10:56:17.876] })) [10:56:17.876] }, error = function(ex) { [10:56:17.876] base::structure(base::list(value = NULL, visible = NULL, [10:56:17.876] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:17.876] ...future.rng), started = ...future.startTime, [10:56:17.876] finished = Sys.time(), session_uuid = NA_character_, [10:56:17.876] version = "1.8"), class = "FutureResult") [10:56:17.876] }, finally = { [10:56:17.876] if (!identical(...future.workdir, getwd())) [10:56:17.876] setwd(...future.workdir) [10:56:17.876] { [10:56:17.876] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:17.876] ...future.oldOptions$nwarnings <- NULL [10:56:17.876] } [10:56:17.876] base::options(...future.oldOptions) [10:56:17.876] if (.Platform$OS.type == "windows") { [10:56:17.876] old_names <- names(...future.oldEnvVars) [10:56:17.876] envs <- base::Sys.getenv() [10:56:17.876] names <- names(envs) [10:56:17.876] common <- intersect(names, old_names) [10:56:17.876] added <- setdiff(names, old_names) [10:56:17.876] removed <- setdiff(old_names, names) [10:56:17.876] changed <- common[...future.oldEnvVars[common] != [10:56:17.876] envs[common]] [10:56:17.876] NAMES <- toupper(changed) [10:56:17.876] args <- list() [10:56:17.876] for (kk in seq_along(NAMES)) { [10:56:17.876] name <- changed[[kk]] [10:56:17.876] NAME <- NAMES[[kk]] [10:56:17.876] if (name != NAME && is.element(NAME, old_names)) [10:56:17.876] next [10:56:17.876] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.876] } [10:56:17.876] NAMES <- toupper(added) [10:56:17.876] for (kk in seq_along(NAMES)) { [10:56:17.876] name <- added[[kk]] [10:56:17.876] NAME <- NAMES[[kk]] [10:56:17.876] if (name != NAME && is.element(NAME, old_names)) [10:56:17.876] next [10:56:17.876] args[[name]] <- "" [10:56:17.876] } [10:56:17.876] NAMES <- toupper(removed) [10:56:17.876] for (kk in seq_along(NAMES)) { [10:56:17.876] name <- removed[[kk]] [10:56:17.876] NAME <- NAMES[[kk]] [10:56:17.876] if (name != NAME && is.element(NAME, old_names)) [10:56:17.876] next [10:56:17.876] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:17.876] } [10:56:17.876] if (length(args) > 0) [10:56:17.876] base::do.call(base::Sys.setenv, args = args) [10:56:17.876] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:17.876] } [10:56:17.876] else { [10:56:17.876] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:17.876] } [10:56:17.876] { [10:56:17.876] if (base::length(...future.futureOptionsAdded) > [10:56:17.876] 0L) { [10:56:17.876] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:17.876] base::names(opts) <- ...future.futureOptionsAdded [10:56:17.876] base::options(opts) [10:56:17.876] } [10:56:17.876] { [10:56:17.876] NULL [10:56:17.876] options(future.plan = NULL) [10:56:17.876] if (is.na(NA_character_)) [10:56:17.876] Sys.unsetenv("R_FUTURE_PLAN") [10:56:17.876] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:17.876] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:17.876] .init = FALSE) [10:56:17.876] } [10:56:17.876] } [10:56:17.876] } [10:56:17.876] }) [10:56:17.876] if (TRUE) { [10:56:17.876] base::sink(type = "output", split = FALSE) [10:56:17.876] if (TRUE) { [10:56:17.876] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:17.876] } [10:56:17.876] else { [10:56:17.876] ...future.result["stdout"] <- base::list(NULL) [10:56:17.876] } [10:56:17.876] base::close(...future.stdout) [10:56:17.876] ...future.stdout <- NULL [10:56:17.876] } [10:56:17.876] ...future.result$conditions <- ...future.conditions [10:56:17.876] ...future.result$finished <- base::Sys.time() [10:56:17.876] ...future.result [10:56:17.876] } [10:56:17.879] - Launch lazy future ... done [10:56:17.880] 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.45 0.10 1.07