R version 4.4.0 beta (2024-04-15 r86425 ucrt) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") Loading required package: future [13:11:06.687] plan(): Setting new future strategy stack: [13:11:06.688] List of future strategies: [13:11:06.688] 1. mirai_multisession: [13:11:06.688] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:11:06.688] - tweaked: FALSE [13:11:06.688] - call: future::plan(future.mirai::mirai_multisession) [13:11:06.700] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:11:06.700] < mirai | $data > [13:11:06.705] getGlobalsAndPackages() ... [13:11:06.705] Not searching for globals [13:11:06.706] - globals: [0] [13:11:06.706] getGlobalsAndPackages() ... DONE [13:11:06.706] getGlobalsAndPackages() ... [13:11:06.706] [13:11:06.707] - globals: [0] [13:11:06.707] getGlobalsAndPackages() ... DONE [13:11:06.986] Packages needed by the future expression (n = 0): [13:11:06.986] Packages needed by future strategies (n = 0): [13:11:06.987] { [13:11:06.987] { [13:11:06.987] { [13:11:06.987] ...future.startTime <- base::Sys.time() [13:11:06.987] { [13:11:06.987] { [13:11:06.987] { [13:11:06.987] base::local({ [13:11:06.987] has_future <- base::requireNamespace("future", [13:11:06.987] quietly = TRUE) [13:11:06.987] if (has_future) { [13:11:06.987] ns <- base::getNamespace("future") [13:11:06.987] version <- ns[[".package"]][["version"]] [13:11:06.987] if (is.null(version)) [13:11:06.987] version <- utils::packageVersion("future") [13:11:06.987] } [13:11:06.987] else { [13:11:06.987] version <- NULL [13:11:06.987] } [13:11:06.987] if (!has_future || version < "1.8.0") { [13:11:06.987] info <- base::c(r_version = base::gsub("R version ", [13:11:06.987] "", base::R.version$version.string), [13:11:06.987] platform = base::sprintf("%s (%s-bit)", [13:11:06.987] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:06.987] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:06.987] "release", "version")], collapse = " "), [13:11:06.987] hostname = base::Sys.info()[["nodename"]]) [13:11:06.987] info <- base::sprintf("%s: %s", base::names(info), [13:11:06.987] info) [13:11:06.987] info <- base::paste(info, collapse = "; ") [13:11:06.987] if (!has_future) { [13:11:06.987] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:06.987] info) [13:11:06.987] } [13:11:06.987] else { [13:11:06.987] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:06.987] info, version) [13:11:06.987] } [13:11:06.987] base::stop(msg) [13:11:06.987] } [13:11:06.987] }) [13:11:06.987] } [13:11:06.987] ...future.strategy.old <- future::plan("list") [13:11:06.987] options(future.plan = NULL) [13:11:06.987] Sys.unsetenv("R_FUTURE_PLAN") [13:11:06.987] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:06.987] } [13:11:06.987] ...future.workdir <- getwd() [13:11:06.987] } [13:11:06.987] ...future.oldOptions <- base::as.list(base::.Options) [13:11:06.987] ...future.oldEnvVars <- base::Sys.getenv() [13:11:06.987] } [13:11:06.987] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:06.987] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:06.987] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:06.987] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:06.987] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:06.987] future.stdout.windows.reencode = NULL, width = 80L) [13:11:06.987] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:06.987] base::names(...future.oldOptions)) [13:11:06.987] } [13:11:06.987] if (FALSE) { [13:11:06.987] } [13:11:06.987] else { [13:11:06.987] if (TRUE) { [13:11:06.987] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:06.987] open = "w") [13:11:06.987] } [13:11:06.987] else { [13:11:06.987] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:06.987] windows = "NUL", "/dev/null"), open = "w") [13:11:06.987] } [13:11:06.987] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:06.987] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:06.987] base::sink(type = "output", split = FALSE) [13:11:06.987] base::close(...future.stdout) [13:11:06.987] }, add = TRUE) [13:11:06.987] } [13:11:06.987] ...future.frame <- base::sys.nframe() [13:11:06.987] ...future.conditions <- base::list() [13:11:06.987] ...future.rng <- base::globalenv()$.Random.seed [13:11:06.987] if (FALSE) { [13:11:06.987] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:06.987] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:06.987] } [13:11:06.987] ...future.result <- base::tryCatch({ [13:11:06.987] base::withCallingHandlers({ [13:11:06.987] ...future.value <- base::withVisible(base::local(NA)) [13:11:06.987] future::FutureResult(value = ...future.value$value, [13:11:06.987] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:06.987] ...future.rng), globalenv = if (FALSE) [13:11:06.987] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:06.987] ...future.globalenv.names)) [13:11:06.987] else NULL, started = ...future.startTime, version = "1.8") [13:11:06.987] }, condition = base::local({ [13:11:06.987] c <- base::c [13:11:06.987] inherits <- base::inherits [13:11:06.987] invokeRestart <- base::invokeRestart [13:11:06.987] length <- base::length [13:11:06.987] list <- base::list [13:11:06.987] seq.int <- base::seq.int [13:11:06.987] signalCondition <- base::signalCondition [13:11:06.987] sys.calls <- base::sys.calls [13:11:06.987] `[[` <- base::`[[` [13:11:06.987] `+` <- base::`+` [13:11:06.987] `<<-` <- base::`<<-` [13:11:06.987] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:06.987] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:06.987] 3L)] [13:11:06.987] } [13:11:06.987] function(cond) { [13:11:06.987] is_error <- inherits(cond, "error") [13:11:06.987] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:06.987] NULL) [13:11:06.987] if (is_error) { [13:11:06.987] sessionInformation <- function() { [13:11:06.987] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:06.987] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:06.987] search = base::search(), system = base::Sys.info()) [13:11:06.987] } [13:11:06.987] ...future.conditions[[length(...future.conditions) + [13:11:06.987] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:06.987] cond$call), session = sessionInformation(), [13:11:06.987] timestamp = base::Sys.time(), signaled = 0L) [13:11:06.987] signalCondition(cond) [13:11:06.987] } [13:11:06.987] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:06.987] signal <- FALSE && inherits(cond, character(0)) [13:11:06.987] ...future.conditions[[length(...future.conditions) + [13:11:06.987] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:06.987] if (FALSE && !signal) { [13:11:06.987] muffleCondition <- function (cond, pattern = "^muffle") [13:11:06.987] { [13:11:06.987] inherits <- base::inherits [13:11:06.987] invokeRestart <- base::invokeRestart [13:11:06.987] is.null <- base::is.null [13:11:06.987] muffled <- FALSE [13:11:06.987] if (inherits(cond, "message")) { [13:11:06.987] muffled <- grepl(pattern, "muffleMessage") [13:11:06.987] if (muffled) [13:11:06.987] invokeRestart("muffleMessage") [13:11:06.987] } [13:11:06.987] else if (inherits(cond, "warning")) { [13:11:06.987] muffled <- grepl(pattern, "muffleWarning") [13:11:06.987] if (muffled) [13:11:06.987] invokeRestart("muffleWarning") [13:11:06.987] } [13:11:06.987] else if (inherits(cond, "condition")) { [13:11:06.987] if (!is.null(pattern)) { [13:11:06.987] computeRestarts <- base::computeRestarts [13:11:06.987] grepl <- base::grepl [13:11:06.987] restarts <- computeRestarts(cond) [13:11:06.987] for (restart in restarts) { [13:11:06.987] name <- restart$name [13:11:06.987] if (is.null(name)) [13:11:06.987] next [13:11:06.987] if (!grepl(pattern, name)) [13:11:06.987] next [13:11:06.987] invokeRestart(restart) [13:11:06.987] muffled <- TRUE [13:11:06.987] break [13:11:06.987] } [13:11:06.987] } [13:11:06.987] } [13:11:06.987] invisible(muffled) [13:11:06.987] } [13:11:06.987] muffleCondition(cond, pattern = "^muffle") [13:11:06.987] } [13:11:06.987] } [13:11:06.987] else { [13:11:06.987] if (TRUE) { [13:11:06.987] muffleCondition <- function (cond, pattern = "^muffle") [13:11:06.987] { [13:11:06.987] inherits <- base::inherits [13:11:06.987] invokeRestart <- base::invokeRestart [13:11:06.987] is.null <- base::is.null [13:11:06.987] muffled <- FALSE [13:11:06.987] if (inherits(cond, "message")) { [13:11:06.987] muffled <- grepl(pattern, "muffleMessage") [13:11:06.987] if (muffled) [13:11:06.987] invokeRestart("muffleMessage") [13:11:06.987] } [13:11:06.987] else if (inherits(cond, "warning")) { [13:11:06.987] muffled <- grepl(pattern, "muffleWarning") [13:11:06.987] if (muffled) [13:11:06.987] invokeRestart("muffleWarning") [13:11:06.987] } [13:11:06.987] else if (inherits(cond, "condition")) { [13:11:06.987] if (!is.null(pattern)) { [13:11:06.987] computeRestarts <- base::computeRestarts [13:11:06.987] grepl <- base::grepl [13:11:06.987] restarts <- computeRestarts(cond) [13:11:06.987] for (restart in restarts) { [13:11:06.987] name <- restart$name [13:11:06.987] if (is.null(name)) [13:11:06.987] next [13:11:06.987] if (!grepl(pattern, name)) [13:11:06.987] next [13:11:06.987] invokeRestart(restart) [13:11:06.987] muffled <- TRUE [13:11:06.987] break [13:11:06.987] } [13:11:06.987] } [13:11:06.987] } [13:11:06.987] invisible(muffled) [13:11:06.987] } [13:11:06.987] muffleCondition(cond, pattern = "^muffle") [13:11:06.987] } [13:11:06.987] } [13:11:06.987] } [13:11:06.987] })) [13:11:06.987] }, error = function(ex) { [13:11:06.987] base::structure(base::list(value = NULL, visible = NULL, [13:11:06.987] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:06.987] ...future.rng), started = ...future.startTime, [13:11:06.987] finished = Sys.time(), session_uuid = NA_character_, [13:11:06.987] version = "1.8"), class = "FutureResult") [13:11:06.987] }, finally = { [13:11:06.987] if (!identical(...future.workdir, getwd())) [13:11:06.987] setwd(...future.workdir) [13:11:06.987] { [13:11:06.987] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:06.987] ...future.oldOptions$nwarnings <- NULL [13:11:06.987] } [13:11:06.987] base::options(...future.oldOptions) [13:11:06.987] if (.Platform$OS.type == "windows") { [13:11:06.987] old_names <- names(...future.oldEnvVars) [13:11:06.987] envs <- base::Sys.getenv() [13:11:06.987] names <- names(envs) [13:11:06.987] common <- intersect(names, old_names) [13:11:06.987] added <- setdiff(names, old_names) [13:11:06.987] removed <- setdiff(old_names, names) [13:11:06.987] changed <- common[...future.oldEnvVars[common] != [13:11:06.987] envs[common]] [13:11:06.987] NAMES <- toupper(changed) [13:11:06.987] args <- list() [13:11:06.987] for (kk in seq_along(NAMES)) { [13:11:06.987] name <- changed[[kk]] [13:11:06.987] NAME <- NAMES[[kk]] [13:11:06.987] if (name != NAME && is.element(NAME, old_names)) [13:11:06.987] next [13:11:06.987] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:06.987] } [13:11:06.987] NAMES <- toupper(added) [13:11:06.987] for (kk in seq_along(NAMES)) { [13:11:06.987] name <- added[[kk]] [13:11:06.987] NAME <- NAMES[[kk]] [13:11:06.987] if (name != NAME && is.element(NAME, old_names)) [13:11:06.987] next [13:11:06.987] args[[name]] <- "" [13:11:06.987] } [13:11:06.987] NAMES <- toupper(removed) [13:11:06.987] for (kk in seq_along(NAMES)) { [13:11:06.987] name <- removed[[kk]] [13:11:06.987] NAME <- NAMES[[kk]] [13:11:06.987] if (name != NAME && is.element(NAME, old_names)) [13:11:06.987] next [13:11:06.987] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:06.987] } [13:11:06.987] if (length(args) > 0) [13:11:06.987] base::do.call(base::Sys.setenv, args = args) [13:11:06.987] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:06.987] } [13:11:06.987] else { [13:11:06.987] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:06.987] } [13:11:06.987] { [13:11:06.987] if (base::length(...future.futureOptionsAdded) > [13:11:06.987] 0L) { [13:11:06.987] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:06.987] base::names(opts) <- ...future.futureOptionsAdded [13:11:06.987] base::options(opts) [13:11:06.987] } [13:11:06.987] { [13:11:06.987] NULL [13:11:06.987] options(future.plan = NULL) [13:11:06.987] if (is.na(NA_character_)) [13:11:06.987] Sys.unsetenv("R_FUTURE_PLAN") [13:11:06.987] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:06.987] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:06.987] .init = FALSE) [13:11:06.987] } [13:11:06.987] } [13:11:06.987] } [13:11:06.987] }) [13:11:06.987] if (TRUE) { [13:11:06.987] base::sink(type = "output", split = FALSE) [13:11:06.987] if (TRUE) { [13:11:06.987] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:06.987] } [13:11:06.987] else { [13:11:06.987] ...future.result["stdout"] <- base::list(NULL) [13:11:06.987] } [13:11:06.987] base::close(...future.stdout) [13:11:06.987] ...future.stdout <- NULL [13:11:06.987] } [13:11:06.987] ...future.result$conditions <- ...future.conditions [13:11:06.987] ...future.result$finished <- base::Sys.time() [13:11:06.987] ...future.result [13:11:06.987] } [13:11:07.086] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:11:07.086] plan(): nbrOfWorkers() = 2 > > plan(mirai_multisession) [13:11:07.087] plan(): Setting new future strategy stack: [13:11:07.087] List of future strategies: [13:11:07.087] 1. mirai_multisession: [13:11:07.087] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:11:07.087] - tweaked: FALSE [13:11:07.087] - call: plan(mirai_multisession) [13:11:07.100] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:11:07.101] < mirai | $data > [13:11:07.103] getGlobalsAndPackages() ... [13:11:07.103] Not searching for globals [13:11:07.103] - globals: [0] [13:11:07.103] getGlobalsAndPackages() ... DONE [13:11:07.104] getGlobalsAndPackages() ... [13:11:07.104] [13:11:07.104] - globals: [0] [13:11:07.104] getGlobalsAndPackages() ... DONE [13:11:07.105] Packages needed by the future expression (n = 0): [13:11:07.105] Packages needed by future strategies (n = 0): [13:11:07.105] { [13:11:07.105] { [13:11:07.105] { [13:11:07.105] ...future.startTime <- base::Sys.time() [13:11:07.105] { [13:11:07.105] { [13:11:07.105] { [13:11:07.105] base::local({ [13:11:07.105] has_future <- base::requireNamespace("future", [13:11:07.105] quietly = TRUE) [13:11:07.105] if (has_future) { [13:11:07.105] ns <- base::getNamespace("future") [13:11:07.105] version <- ns[[".package"]][["version"]] [13:11:07.105] if (is.null(version)) [13:11:07.105] version <- utils::packageVersion("future") [13:11:07.105] } [13:11:07.105] else { [13:11:07.105] version <- NULL [13:11:07.105] } [13:11:07.105] if (!has_future || version < "1.8.0") { [13:11:07.105] info <- base::c(r_version = base::gsub("R version ", [13:11:07.105] "", base::R.version$version.string), [13:11:07.105] platform = base::sprintf("%s (%s-bit)", [13:11:07.105] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:07.105] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:07.105] "release", "version")], collapse = " "), [13:11:07.105] hostname = base::Sys.info()[["nodename"]]) [13:11:07.105] info <- base::sprintf("%s: %s", base::names(info), [13:11:07.105] info) [13:11:07.105] info <- base::paste(info, collapse = "; ") [13:11:07.105] if (!has_future) { [13:11:07.105] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:07.105] info) [13:11:07.105] } [13:11:07.105] else { [13:11:07.105] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:07.105] info, version) [13:11:07.105] } [13:11:07.105] base::stop(msg) [13:11:07.105] } [13:11:07.105] }) [13:11:07.105] } [13:11:07.105] ...future.strategy.old <- future::plan("list") [13:11:07.105] options(future.plan = NULL) [13:11:07.105] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.105] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:07.105] } [13:11:07.105] ...future.workdir <- getwd() [13:11:07.105] } [13:11:07.105] ...future.oldOptions <- base::as.list(base::.Options) [13:11:07.105] ...future.oldEnvVars <- base::Sys.getenv() [13:11:07.105] } [13:11:07.105] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:07.105] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:07.105] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:07.105] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:07.105] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:07.105] future.stdout.windows.reencode = NULL, width = 80L) [13:11:07.105] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:07.105] base::names(...future.oldOptions)) [13:11:07.105] } [13:11:07.105] if (FALSE) { [13:11:07.105] } [13:11:07.105] else { [13:11:07.105] if (TRUE) { [13:11:07.105] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:07.105] open = "w") [13:11:07.105] } [13:11:07.105] else { [13:11:07.105] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:07.105] windows = "NUL", "/dev/null"), open = "w") [13:11:07.105] } [13:11:07.105] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:07.105] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:07.105] base::sink(type = "output", split = FALSE) [13:11:07.105] base::close(...future.stdout) [13:11:07.105] }, add = TRUE) [13:11:07.105] } [13:11:07.105] ...future.frame <- base::sys.nframe() [13:11:07.105] ...future.conditions <- base::list() [13:11:07.105] ...future.rng <- base::globalenv()$.Random.seed [13:11:07.105] if (FALSE) { [13:11:07.105] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:07.105] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:07.105] } [13:11:07.105] ...future.result <- base::tryCatch({ [13:11:07.105] base::withCallingHandlers({ [13:11:07.105] ...future.value <- base::withVisible(base::local(NA)) [13:11:07.105] future::FutureResult(value = ...future.value$value, [13:11:07.105] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.105] ...future.rng), globalenv = if (FALSE) [13:11:07.105] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:07.105] ...future.globalenv.names)) [13:11:07.105] else NULL, started = ...future.startTime, version = "1.8") [13:11:07.105] }, condition = base::local({ [13:11:07.105] c <- base::c [13:11:07.105] inherits <- base::inherits [13:11:07.105] invokeRestart <- base::invokeRestart [13:11:07.105] length <- base::length [13:11:07.105] list <- base::list [13:11:07.105] seq.int <- base::seq.int [13:11:07.105] signalCondition <- base::signalCondition [13:11:07.105] sys.calls <- base::sys.calls [13:11:07.105] `[[` <- base::`[[` [13:11:07.105] `+` <- base::`+` [13:11:07.105] `<<-` <- base::`<<-` [13:11:07.105] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:07.105] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:07.105] 3L)] [13:11:07.105] } [13:11:07.105] function(cond) { [13:11:07.105] is_error <- inherits(cond, "error") [13:11:07.105] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:07.105] NULL) [13:11:07.105] if (is_error) { [13:11:07.105] sessionInformation <- function() { [13:11:07.105] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:07.105] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:07.105] search = base::search(), system = base::Sys.info()) [13:11:07.105] } [13:11:07.105] ...future.conditions[[length(...future.conditions) + [13:11:07.105] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:07.105] cond$call), session = sessionInformation(), [13:11:07.105] timestamp = base::Sys.time(), signaled = 0L) [13:11:07.105] signalCondition(cond) [13:11:07.105] } [13:11:07.105] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:07.105] signal <- FALSE && inherits(cond, character(0)) [13:11:07.105] ...future.conditions[[length(...future.conditions) + [13:11:07.105] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:07.105] if (FALSE && !signal) { [13:11:07.105] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.105] { [13:11:07.105] inherits <- base::inherits [13:11:07.105] invokeRestart <- base::invokeRestart [13:11:07.105] is.null <- base::is.null [13:11:07.105] muffled <- FALSE [13:11:07.105] if (inherits(cond, "message")) { [13:11:07.105] muffled <- grepl(pattern, "muffleMessage") [13:11:07.105] if (muffled) [13:11:07.105] invokeRestart("muffleMessage") [13:11:07.105] } [13:11:07.105] else if (inherits(cond, "warning")) { [13:11:07.105] muffled <- grepl(pattern, "muffleWarning") [13:11:07.105] if (muffled) [13:11:07.105] invokeRestart("muffleWarning") [13:11:07.105] } [13:11:07.105] else if (inherits(cond, "condition")) { [13:11:07.105] if (!is.null(pattern)) { [13:11:07.105] computeRestarts <- base::computeRestarts [13:11:07.105] grepl <- base::grepl [13:11:07.105] restarts <- computeRestarts(cond) [13:11:07.105] for (restart in restarts) { [13:11:07.105] name <- restart$name [13:11:07.105] if (is.null(name)) [13:11:07.105] next [13:11:07.105] if (!grepl(pattern, name)) [13:11:07.105] next [13:11:07.105] invokeRestart(restart) [13:11:07.105] muffled <- TRUE [13:11:07.105] break [13:11:07.105] } [13:11:07.105] } [13:11:07.105] } [13:11:07.105] invisible(muffled) [13:11:07.105] } [13:11:07.105] muffleCondition(cond, pattern = "^muffle") [13:11:07.105] } [13:11:07.105] } [13:11:07.105] else { [13:11:07.105] if (TRUE) { [13:11:07.105] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.105] { [13:11:07.105] inherits <- base::inherits [13:11:07.105] invokeRestart <- base::invokeRestart [13:11:07.105] is.null <- base::is.null [13:11:07.105] muffled <- FALSE [13:11:07.105] if (inherits(cond, "message")) { [13:11:07.105] muffled <- grepl(pattern, "muffleMessage") [13:11:07.105] if (muffled) [13:11:07.105] invokeRestart("muffleMessage") [13:11:07.105] } [13:11:07.105] else if (inherits(cond, "warning")) { [13:11:07.105] muffled <- grepl(pattern, "muffleWarning") [13:11:07.105] if (muffled) [13:11:07.105] invokeRestart("muffleWarning") [13:11:07.105] } [13:11:07.105] else if (inherits(cond, "condition")) { [13:11:07.105] if (!is.null(pattern)) { [13:11:07.105] computeRestarts <- base::computeRestarts [13:11:07.105] grepl <- base::grepl [13:11:07.105] restarts <- computeRestarts(cond) [13:11:07.105] for (restart in restarts) { [13:11:07.105] name <- restart$name [13:11:07.105] if (is.null(name)) [13:11:07.105] next [13:11:07.105] if (!grepl(pattern, name)) [13:11:07.105] next [13:11:07.105] invokeRestart(restart) [13:11:07.105] muffled <- TRUE [13:11:07.105] break [13:11:07.105] } [13:11:07.105] } [13:11:07.105] } [13:11:07.105] invisible(muffled) [13:11:07.105] } [13:11:07.105] muffleCondition(cond, pattern = "^muffle") [13:11:07.105] } [13:11:07.105] } [13:11:07.105] } [13:11:07.105] })) [13:11:07.105] }, error = function(ex) { [13:11:07.105] base::structure(base::list(value = NULL, visible = NULL, [13:11:07.105] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.105] ...future.rng), started = ...future.startTime, [13:11:07.105] finished = Sys.time(), session_uuid = NA_character_, [13:11:07.105] version = "1.8"), class = "FutureResult") [13:11:07.105] }, finally = { [13:11:07.105] if (!identical(...future.workdir, getwd())) [13:11:07.105] setwd(...future.workdir) [13:11:07.105] { [13:11:07.105] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:07.105] ...future.oldOptions$nwarnings <- NULL [13:11:07.105] } [13:11:07.105] base::options(...future.oldOptions) [13:11:07.105] if (.Platform$OS.type == "windows") { [13:11:07.105] old_names <- names(...future.oldEnvVars) [13:11:07.105] envs <- base::Sys.getenv() [13:11:07.105] names <- names(envs) [13:11:07.105] common <- intersect(names, old_names) [13:11:07.105] added <- setdiff(names, old_names) [13:11:07.105] removed <- setdiff(old_names, names) [13:11:07.105] changed <- common[...future.oldEnvVars[common] != [13:11:07.105] envs[common]] [13:11:07.105] NAMES <- toupper(changed) [13:11:07.105] args <- list() [13:11:07.105] for (kk in seq_along(NAMES)) { [13:11:07.105] name <- changed[[kk]] [13:11:07.105] NAME <- NAMES[[kk]] [13:11:07.105] if (name != NAME && is.element(NAME, old_names)) [13:11:07.105] next [13:11:07.105] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.105] } [13:11:07.105] NAMES <- toupper(added) [13:11:07.105] for (kk in seq_along(NAMES)) { [13:11:07.105] name <- added[[kk]] [13:11:07.105] NAME <- NAMES[[kk]] [13:11:07.105] if (name != NAME && is.element(NAME, old_names)) [13:11:07.105] next [13:11:07.105] args[[name]] <- "" [13:11:07.105] } [13:11:07.105] NAMES <- toupper(removed) [13:11:07.105] for (kk in seq_along(NAMES)) { [13:11:07.105] name <- removed[[kk]] [13:11:07.105] NAME <- NAMES[[kk]] [13:11:07.105] if (name != NAME && is.element(NAME, old_names)) [13:11:07.105] next [13:11:07.105] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.105] } [13:11:07.105] if (length(args) > 0) [13:11:07.105] base::do.call(base::Sys.setenv, args = args) [13:11:07.105] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:07.105] } [13:11:07.105] else { [13:11:07.105] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:07.105] } [13:11:07.105] { [13:11:07.105] if (base::length(...future.futureOptionsAdded) > [13:11:07.105] 0L) { [13:11:07.105] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:07.105] base::names(opts) <- ...future.futureOptionsAdded [13:11:07.105] base::options(opts) [13:11:07.105] } [13:11:07.105] { [13:11:07.105] NULL [13:11:07.105] options(future.plan = NULL) [13:11:07.105] if (is.na(NA_character_)) [13:11:07.105] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.105] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:07.105] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:07.105] .init = FALSE) [13:11:07.105] } [13:11:07.105] } [13:11:07.105] } [13:11:07.105] }) [13:11:07.105] if (TRUE) { [13:11:07.105] base::sink(type = "output", split = FALSE) [13:11:07.105] if (TRUE) { [13:11:07.105] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:07.105] } [13:11:07.105] else { [13:11:07.105] ...future.result["stdout"] <- base::list(NULL) [13:11:07.105] } [13:11:07.105] base::close(...future.stdout) [13:11:07.105] ...future.stdout <- NULL [13:11:07.105] } [13:11:07.105] ...future.result$conditions <- ...future.conditions [13:11:07.105] ...future.result$finished <- base::Sys.time() [13:11:07.105] ...future.result [13:11:07.105] } [13:11:07.209] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:11:07.209] plan(): nbrOfWorkers() = 2 > > oopts <- c(oopts, options( + future.globals.resolve = TRUE, + future.globals.onMissing = "error" + )) > > > message("*** Globals - subassignments ...") *** Globals - subassignments ... > > message("*** Globals - subassignments w/ x$a <- value ...") *** Globals - subassignments w/ x$a <- value ... > > ## Truth: > x <- x0 <- list() > y0 <- list(a = 1) > str(list(x = x, y0 = y0)) List of 2 $ x : list() $ y0:List of 1 ..$ a: num 1 > > y <- local({ + x$a <- 1 + x + }) > stopifnot(identical(y, y0)) > > y <- local({ + x[["a"]] <- 1 + x + }) > stopifnot(identical(y, y0)) > > y <- local({ + x["a"] <- list(1) + x + }) > stopifnot(identical(y, y0)) > > stopifnot(identical(x, list())) > > ## Explicit future > x <- list() > f <- future({ + x$a <- 1 + x + }) Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:11:07.214] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:11:07.215] Searching for globals... [13:11:07.226] - globals found: [5] '{', 'x', '<-', '$', '$<-' [13:11:07.226] Searching for globals ... DONE [13:11:07.227] Resolving globals: TRUE [13:11:07.227] Resolving any globals that are futures ... [13:11:07.227] - globals: [5] '{', 'x', '<-', '$', '$<-' [13:11:07.227] Resolving any globals that are futures ... DONE [13:11:07.228] Resolving futures part of globals (recursively) ... [13:11:07.229] resolve() on list ... [13:11:07.229] recursive: 99 [13:11:07.229] length: 1 [13:11:07.230] elements: 'x' [13:11:07.230] length: 0 (resolved future 1) [13:11:07.230] resolve() on list ... DONE [13:11:07.230] - globals: [1] 'x' [13:11:07.230] Resolving futures part of globals (recursively) ... DONE [13:11:07.231] The total size of the 1 globals is 0 bytes (0 bytes) [13:11:07.231] The total size of the 1 globals exported for future expression ('{; x$a <- 1; x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:11:07.232] - globals: [1] 'x' [13:11:07.232] [13:11:07.232] getGlobalsAndPackages() ... DONE [13:11:07.232] run() for 'Future' ... [13:11:07.233] - state: 'created' [13:11:07.233] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:07.235] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:07.236] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:07.236] - Field: 'label' [13:11:07.236] - Field: 'local' [13:11:07.236] - Field: 'owner' [13:11:07.236] - Field: 'envir' [13:11:07.237] - Field: 'packages' [13:11:07.237] - Field: 'gc' [13:11:07.237] - Field: 'conditions' [13:11:07.237] - Field: 'expr' [13:11:07.237] - Field: 'uuid' [13:11:07.237] - Field: 'seed' [13:11:07.238] - Field: 'version' [13:11:07.238] - Field: 'result' [13:11:07.238] - Field: 'asynchronous' [13:11:07.238] - Field: 'calls' [13:11:07.238] - Field: 'globals' [13:11:07.238] - Field: 'stdout' [13:11:07.239] - Field: 'earlySignal' [13:11:07.239] - Field: 'lazy' [13:11:07.239] - Field: 'state' [13:11:07.239] - Field: '.cluster' [13:11:07.239] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:07.239] - Launch lazy future ... [13:11:07.240] Packages needed by the future expression (n = 0): [13:11:07.240] Packages needed by future strategies (n = 0): [13:11:07.240] { [13:11:07.240] { [13:11:07.240] { [13:11:07.240] ...future.startTime <- base::Sys.time() [13:11:07.240] { [13:11:07.240] { [13:11:07.240] { [13:11:07.240] base::local({ [13:11:07.240] has_future <- base::requireNamespace("future", [13:11:07.240] quietly = TRUE) [13:11:07.240] if (has_future) { [13:11:07.240] ns <- base::getNamespace("future") [13:11:07.240] version <- ns[[".package"]][["version"]] [13:11:07.240] if (is.null(version)) [13:11:07.240] version <- utils::packageVersion("future") [13:11:07.240] } [13:11:07.240] else { [13:11:07.240] version <- NULL [13:11:07.240] } [13:11:07.240] if (!has_future || version < "1.8.0") { [13:11:07.240] info <- base::c(r_version = base::gsub("R version ", [13:11:07.240] "", base::R.version$version.string), [13:11:07.240] platform = base::sprintf("%s (%s-bit)", [13:11:07.240] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:07.240] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:07.240] "release", "version")], collapse = " "), [13:11:07.240] hostname = base::Sys.info()[["nodename"]]) [13:11:07.240] info <- base::sprintf("%s: %s", base::names(info), [13:11:07.240] info) [13:11:07.240] info <- base::paste(info, collapse = "; ") [13:11:07.240] if (!has_future) { [13:11:07.240] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:07.240] info) [13:11:07.240] } [13:11:07.240] else { [13:11:07.240] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:07.240] info, version) [13:11:07.240] } [13:11:07.240] base::stop(msg) [13:11:07.240] } [13:11:07.240] }) [13:11:07.240] } [13:11:07.240] ...future.strategy.old <- future::plan("list") [13:11:07.240] options(future.plan = NULL) [13:11:07.240] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.240] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:07.240] } [13:11:07.240] ...future.workdir <- getwd() [13:11:07.240] } [13:11:07.240] ...future.oldOptions <- base::as.list(base::.Options) [13:11:07.240] ...future.oldEnvVars <- base::Sys.getenv() [13:11:07.240] } [13:11:07.240] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:11:07.240] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:07.240] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:11:07.240] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:11:07.240] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:07.240] future.stdout.windows.reencode = NULL, width = 80L) [13:11:07.240] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:07.240] base::names(...future.oldOptions)) [13:11:07.240] } [13:11:07.240] if (FALSE) { [13:11:07.240] } [13:11:07.240] else { [13:11:07.240] if (TRUE) { [13:11:07.240] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:07.240] open = "w") [13:11:07.240] } [13:11:07.240] else { [13:11:07.240] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:07.240] windows = "NUL", "/dev/null"), open = "w") [13:11:07.240] } [13:11:07.240] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:07.240] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:07.240] base::sink(type = "output", split = FALSE) [13:11:07.240] base::close(...future.stdout) [13:11:07.240] }, add = TRUE) [13:11:07.240] } [13:11:07.240] ...future.frame <- base::sys.nframe() [13:11:07.240] ...future.conditions <- base::list() [13:11:07.240] ...future.rng <- base::globalenv()$.Random.seed [13:11:07.240] if (FALSE) { [13:11:07.240] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:07.240] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:07.240] } [13:11:07.240] ...future.result <- base::tryCatch({ [13:11:07.240] base::withCallingHandlers({ [13:11:07.240] ...future.value <- base::withVisible(base::local({ [13:11:07.240] x$a <- 1 [13:11:07.240] x [13:11:07.240] })) [13:11:07.240] future::FutureResult(value = ...future.value$value, [13:11:07.240] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.240] ...future.rng), globalenv = if (FALSE) [13:11:07.240] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:07.240] ...future.globalenv.names)) [13:11:07.240] else NULL, started = ...future.startTime, version = "1.8") [13:11:07.240] }, condition = base::local({ [13:11:07.240] c <- base::c [13:11:07.240] inherits <- base::inherits [13:11:07.240] invokeRestart <- base::invokeRestart [13:11:07.240] length <- base::length [13:11:07.240] list <- base::list [13:11:07.240] seq.int <- base::seq.int [13:11:07.240] signalCondition <- base::signalCondition [13:11:07.240] sys.calls <- base::sys.calls [13:11:07.240] `[[` <- base::`[[` [13:11:07.240] `+` <- base::`+` [13:11:07.240] `<<-` <- base::`<<-` [13:11:07.240] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:07.240] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:07.240] 3L)] [13:11:07.240] } [13:11:07.240] function(cond) { [13:11:07.240] is_error <- inherits(cond, "error") [13:11:07.240] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:07.240] NULL) [13:11:07.240] if (is_error) { [13:11:07.240] sessionInformation <- function() { [13:11:07.240] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:07.240] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:07.240] search = base::search(), system = base::Sys.info()) [13:11:07.240] } [13:11:07.240] ...future.conditions[[length(...future.conditions) + [13:11:07.240] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:07.240] cond$call), session = sessionInformation(), [13:11:07.240] timestamp = base::Sys.time(), signaled = 0L) [13:11:07.240] signalCondition(cond) [13:11:07.240] } [13:11:07.240] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:07.240] signal <- FALSE && inherits(cond, character(0)) [13:11:07.240] ...future.conditions[[length(...future.conditions) + [13:11:07.240] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:07.240] if (FALSE && !signal) { [13:11:07.240] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.240] { [13:11:07.240] inherits <- base::inherits [13:11:07.240] invokeRestart <- base::invokeRestart [13:11:07.240] is.null <- base::is.null [13:11:07.240] muffled <- FALSE [13:11:07.240] if (inherits(cond, "message")) { [13:11:07.240] muffled <- grepl(pattern, "muffleMessage") [13:11:07.240] if (muffled) [13:11:07.240] invokeRestart("muffleMessage") [13:11:07.240] } [13:11:07.240] else if (inherits(cond, "warning")) { [13:11:07.240] muffled <- grepl(pattern, "muffleWarning") [13:11:07.240] if (muffled) [13:11:07.240] invokeRestart("muffleWarning") [13:11:07.240] } [13:11:07.240] else if (inherits(cond, "condition")) { [13:11:07.240] if (!is.null(pattern)) { [13:11:07.240] computeRestarts <- base::computeRestarts [13:11:07.240] grepl <- base::grepl [13:11:07.240] restarts <- computeRestarts(cond) [13:11:07.240] for (restart in restarts) { [13:11:07.240] name <- restart$name [13:11:07.240] if (is.null(name)) [13:11:07.240] next [13:11:07.240] if (!grepl(pattern, name)) [13:11:07.240] next [13:11:07.240] invokeRestart(restart) [13:11:07.240] muffled <- TRUE [13:11:07.240] break [13:11:07.240] } [13:11:07.240] } [13:11:07.240] } [13:11:07.240] invisible(muffled) [13:11:07.240] } [13:11:07.240] muffleCondition(cond, pattern = "^muffle") [13:11:07.240] } [13:11:07.240] } [13:11:07.240] else { [13:11:07.240] if (TRUE) { [13:11:07.240] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.240] { [13:11:07.240] inherits <- base::inherits [13:11:07.240] invokeRestart <- base::invokeRestart [13:11:07.240] is.null <- base::is.null [13:11:07.240] muffled <- FALSE [13:11:07.240] if (inherits(cond, "message")) { [13:11:07.240] muffled <- grepl(pattern, "muffleMessage") [13:11:07.240] if (muffled) [13:11:07.240] invokeRestart("muffleMessage") [13:11:07.240] } [13:11:07.240] else if (inherits(cond, "warning")) { [13:11:07.240] muffled <- grepl(pattern, "muffleWarning") [13:11:07.240] if (muffled) [13:11:07.240] invokeRestart("muffleWarning") [13:11:07.240] } [13:11:07.240] else if (inherits(cond, "condition")) { [13:11:07.240] if (!is.null(pattern)) { [13:11:07.240] computeRestarts <- base::computeRestarts [13:11:07.240] grepl <- base::grepl [13:11:07.240] restarts <- computeRestarts(cond) [13:11:07.240] for (restart in restarts) { [13:11:07.240] name <- restart$name [13:11:07.240] if (is.null(name)) [13:11:07.240] next [13:11:07.240] if (!grepl(pattern, name)) [13:11:07.240] next [13:11:07.240] invokeRestart(restart) [13:11:07.240] muffled <- TRUE [13:11:07.240] break [13:11:07.240] } [13:11:07.240] } [13:11:07.240] } [13:11:07.240] invisible(muffled) [13:11:07.240] } [13:11:07.240] muffleCondition(cond, pattern = "^muffle") [13:11:07.240] } [13:11:07.240] } [13:11:07.240] } [13:11:07.240] })) [13:11:07.240] }, error = function(ex) { [13:11:07.240] base::structure(base::list(value = NULL, visible = NULL, [13:11:07.240] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.240] ...future.rng), started = ...future.startTime, [13:11:07.240] finished = Sys.time(), session_uuid = NA_character_, [13:11:07.240] version = "1.8"), class = "FutureResult") [13:11:07.240] }, finally = { [13:11:07.240] if (!identical(...future.workdir, getwd())) [13:11:07.240] setwd(...future.workdir) [13:11:07.240] { [13:11:07.240] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:07.240] ...future.oldOptions$nwarnings <- NULL [13:11:07.240] } [13:11:07.240] base::options(...future.oldOptions) [13:11:07.240] if (.Platform$OS.type == "windows") { [13:11:07.240] old_names <- names(...future.oldEnvVars) [13:11:07.240] envs <- base::Sys.getenv() [13:11:07.240] names <- names(envs) [13:11:07.240] common <- intersect(names, old_names) [13:11:07.240] added <- setdiff(names, old_names) [13:11:07.240] removed <- setdiff(old_names, names) [13:11:07.240] changed <- common[...future.oldEnvVars[common] != [13:11:07.240] envs[common]] [13:11:07.240] NAMES <- toupper(changed) [13:11:07.240] args <- list() [13:11:07.240] for (kk in seq_along(NAMES)) { [13:11:07.240] name <- changed[[kk]] [13:11:07.240] NAME <- NAMES[[kk]] [13:11:07.240] if (name != NAME && is.element(NAME, old_names)) [13:11:07.240] next [13:11:07.240] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.240] } [13:11:07.240] NAMES <- toupper(added) [13:11:07.240] for (kk in seq_along(NAMES)) { [13:11:07.240] name <- added[[kk]] [13:11:07.240] NAME <- NAMES[[kk]] [13:11:07.240] if (name != NAME && is.element(NAME, old_names)) [13:11:07.240] next [13:11:07.240] args[[name]] <- "" [13:11:07.240] } [13:11:07.240] NAMES <- toupper(removed) [13:11:07.240] for (kk in seq_along(NAMES)) { [13:11:07.240] name <- removed[[kk]] [13:11:07.240] NAME <- NAMES[[kk]] [13:11:07.240] if (name != NAME && is.element(NAME, old_names)) [13:11:07.240] next [13:11:07.240] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.240] } [13:11:07.240] if (length(args) > 0) [13:11:07.240] base::do.call(base::Sys.setenv, args = args) [13:11:07.240] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:07.240] } [13:11:07.240] else { [13:11:07.240] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:07.240] } [13:11:07.240] { [13:11:07.240] if (base::length(...future.futureOptionsAdded) > [13:11:07.240] 0L) { [13:11:07.240] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:07.240] base::names(opts) <- ...future.futureOptionsAdded [13:11:07.240] base::options(opts) [13:11:07.240] } [13:11:07.240] { [13:11:07.240] NULL [13:11:07.240] options(future.plan = NULL) [13:11:07.240] if (is.na(NA_character_)) [13:11:07.240] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.240] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:07.240] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:07.240] .init = FALSE) [13:11:07.240] } [13:11:07.240] } [13:11:07.240] } [13:11:07.240] }) [13:11:07.240] if (TRUE) { [13:11:07.240] base::sink(type = "output", split = FALSE) [13:11:07.240] if (TRUE) { [13:11:07.240] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:07.240] } [13:11:07.240] else { [13:11:07.240] ...future.result["stdout"] <- base::list(NULL) [13:11:07.240] } [13:11:07.240] base::close(...future.stdout) [13:11:07.240] ...future.stdout <- NULL [13:11:07.240] } [13:11:07.240] ...future.result$conditions <- ...future.conditions [13:11:07.240] ...future.result$finished <- base::Sys.time() [13:11:07.240] ...future.result [13:11:07.240] } [13:11:07.244] - Launch lazy future ... done [13:11:07.245] run() for 'MiraiFuture' ... done > rm(list = "x") > y <- value(f) > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## Future assignment > x <- list() > y %<-% { + x$a <- 1 + x + } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:11:07.248] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:11:07.248] Searching for globals... [13:11:07.251] - globals found: [5] '{', 'x', '<-', '$', '$<-' [13:11:07.251] Searching for globals ... DONE [13:11:07.251] Resolving globals: TRUE [13:11:07.251] Resolving any globals that are futures ... [13:11:07.251] - globals: [5] '{', 'x', '<-', '$', '$<-' [13:11:07.251] Resolving any globals that are futures ... DONE [13:11:07.252] Resolving futures part of globals (recursively) ... [13:11:07.252] resolve() on list ... [13:11:07.252] recursive: 99 [13:11:07.253] length: 1 [13:11:07.253] elements: 'x' [13:11:07.253] length: 0 (resolved future 1) [13:11:07.253] resolve() on list ... DONE [13:11:07.253] - globals: [1] 'x' [13:11:07.253] Resolving futures part of globals (recursively) ... DONE [13:11:07.254] The total size of the 1 globals is 0 bytes (0 bytes) [13:11:07.254] The total size of the 1 globals exported for future expression ('{; x$a <- 1; x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:11:07.254] - globals: [1] 'x' [13:11:07.255] [13:11:07.255] getGlobalsAndPackages() ... DONE [13:11:07.255] run() for 'Future' ... [13:11:07.255] - state: 'created' [13:11:07.255] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:07.260] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:07.260] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:07.260] - Field: 'label' [13:11:07.261] - Field: 'local' [13:11:07.261] - Field: 'owner' [13:11:07.261] - Field: 'envir' [13:11:07.261] - Field: 'packages' [13:11:07.261] - Field: 'gc' [13:11:07.261] - Field: 'conditions' [13:11:07.262] - Field: 'expr' [13:11:07.262] - Field: 'uuid' [13:11:07.262] - Field: 'seed' [13:11:07.262] - Field: 'version' [13:11:07.262] - Field: 'result' [13:11:07.262] - Field: 'asynchronous' [13:11:07.263] - Field: 'calls' [13:11:07.263] - Field: 'globals' [13:11:07.263] - Field: 'stdout' [13:11:07.263] - Field: 'earlySignal' [13:11:07.263] - Field: 'lazy' [13:11:07.264] - Field: 'state' [13:11:07.264] - Field: '.cluster' [13:11:07.264] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:07.264] - Launch lazy future ... [13:11:07.264] Packages needed by the future expression (n = 0): [13:11:07.265] Packages needed by future strategies (n = 0): [13:11:07.265] { [13:11:07.265] { [13:11:07.265] { [13:11:07.265] ...future.startTime <- base::Sys.time() [13:11:07.265] { [13:11:07.265] { [13:11:07.265] { [13:11:07.265] base::local({ [13:11:07.265] has_future <- base::requireNamespace("future", [13:11:07.265] quietly = TRUE) [13:11:07.265] if (has_future) { [13:11:07.265] ns <- base::getNamespace("future") [13:11:07.265] version <- ns[[".package"]][["version"]] [13:11:07.265] if (is.null(version)) [13:11:07.265] version <- utils::packageVersion("future") [13:11:07.265] } [13:11:07.265] else { [13:11:07.265] version <- NULL [13:11:07.265] } [13:11:07.265] if (!has_future || version < "1.8.0") { [13:11:07.265] info <- base::c(r_version = base::gsub("R version ", [13:11:07.265] "", base::R.version$version.string), [13:11:07.265] platform = base::sprintf("%s (%s-bit)", [13:11:07.265] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:07.265] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:07.265] "release", "version")], collapse = " "), [13:11:07.265] hostname = base::Sys.info()[["nodename"]]) [13:11:07.265] info <- base::sprintf("%s: %s", base::names(info), [13:11:07.265] info) [13:11:07.265] info <- base::paste(info, collapse = "; ") [13:11:07.265] if (!has_future) { [13:11:07.265] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:07.265] info) [13:11:07.265] } [13:11:07.265] else { [13:11:07.265] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:07.265] info, version) [13:11:07.265] } [13:11:07.265] base::stop(msg) [13:11:07.265] } [13:11:07.265] }) [13:11:07.265] } [13:11:07.265] ...future.strategy.old <- future::plan("list") [13:11:07.265] options(future.plan = NULL) [13:11:07.265] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.265] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:07.265] } [13:11:07.265] ...future.workdir <- getwd() [13:11:07.265] } [13:11:07.265] ...future.oldOptions <- base::as.list(base::.Options) [13:11:07.265] ...future.oldEnvVars <- base::Sys.getenv() [13:11:07.265] } [13:11:07.265] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:11:07.265] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:07.265] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:11:07.265] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:11:07.265] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:07.265] future.stdout.windows.reencode = NULL, width = 80L) [13:11:07.265] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:07.265] base::names(...future.oldOptions)) [13:11:07.265] } [13:11:07.265] if (FALSE) { [13:11:07.265] } [13:11:07.265] else { [13:11:07.265] if (TRUE) { [13:11:07.265] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:07.265] open = "w") [13:11:07.265] } [13:11:07.265] else { [13:11:07.265] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:07.265] windows = "NUL", "/dev/null"), open = "w") [13:11:07.265] } [13:11:07.265] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:07.265] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:07.265] base::sink(type = "output", split = FALSE) [13:11:07.265] base::close(...future.stdout) [13:11:07.265] }, add = TRUE) [13:11:07.265] } [13:11:07.265] ...future.frame <- base::sys.nframe() [13:11:07.265] ...future.conditions <- base::list() [13:11:07.265] ...future.rng <- base::globalenv()$.Random.seed [13:11:07.265] if (FALSE) { [13:11:07.265] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:07.265] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:07.265] } [13:11:07.265] ...future.result <- base::tryCatch({ [13:11:07.265] base::withCallingHandlers({ [13:11:07.265] ...future.value <- base::withVisible(base::local({ [13:11:07.265] x$a <- 1 [13:11:07.265] x [13:11:07.265] })) [13:11:07.265] future::FutureResult(value = ...future.value$value, [13:11:07.265] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.265] ...future.rng), globalenv = if (FALSE) [13:11:07.265] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:07.265] ...future.globalenv.names)) [13:11:07.265] else NULL, started = ...future.startTime, version = "1.8") [13:11:07.265] }, condition = base::local({ [13:11:07.265] c <- base::c [13:11:07.265] inherits <- base::inherits [13:11:07.265] invokeRestart <- base::invokeRestart [13:11:07.265] length <- base::length [13:11:07.265] list <- base::list [13:11:07.265] seq.int <- base::seq.int [13:11:07.265] signalCondition <- base::signalCondition [13:11:07.265] sys.calls <- base::sys.calls [13:11:07.265] `[[` <- base::`[[` [13:11:07.265] `+` <- base::`+` [13:11:07.265] `<<-` <- base::`<<-` [13:11:07.265] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:07.265] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:07.265] 3L)] [13:11:07.265] } [13:11:07.265] function(cond) { [13:11:07.265] is_error <- inherits(cond, "error") [13:11:07.265] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:07.265] NULL) [13:11:07.265] if (is_error) { [13:11:07.265] sessionInformation <- function() { [13:11:07.265] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:07.265] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:07.265] search = base::search(), system = base::Sys.info()) [13:11:07.265] } [13:11:07.265] ...future.conditions[[length(...future.conditions) + [13:11:07.265] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:07.265] cond$call), session = sessionInformation(), [13:11:07.265] timestamp = base::Sys.time(), signaled = 0L) [13:11:07.265] signalCondition(cond) [13:11:07.265] } [13:11:07.265] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:07.265] signal <- FALSE && inherits(cond, character(0)) [13:11:07.265] ...future.conditions[[length(...future.conditions) + [13:11:07.265] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:07.265] if (FALSE && !signal) { [13:11:07.265] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.265] { [13:11:07.265] inherits <- base::inherits [13:11:07.265] invokeRestart <- base::invokeRestart [13:11:07.265] is.null <- base::is.null [13:11:07.265] muffled <- FALSE [13:11:07.265] if (inherits(cond, "message")) { [13:11:07.265] muffled <- grepl(pattern, "muffleMessage") [13:11:07.265] if (muffled) [13:11:07.265] invokeRestart("muffleMessage") [13:11:07.265] } [13:11:07.265] else if (inherits(cond, "warning")) { [13:11:07.265] muffled <- grepl(pattern, "muffleWarning") [13:11:07.265] if (muffled) [13:11:07.265] invokeRestart("muffleWarning") [13:11:07.265] } [13:11:07.265] else if (inherits(cond, "condition")) { [13:11:07.265] if (!is.null(pattern)) { [13:11:07.265] computeRestarts <- base::computeRestarts [13:11:07.265] grepl <- base::grepl [13:11:07.265] restarts <- computeRestarts(cond) [13:11:07.265] for (restart in restarts) { [13:11:07.265] name <- restart$name [13:11:07.265] if (is.null(name)) [13:11:07.265] next [13:11:07.265] if (!grepl(pattern, name)) [13:11:07.265] next [13:11:07.265] invokeRestart(restart) [13:11:07.265] muffled <- TRUE [13:11:07.265] break [13:11:07.265] } [13:11:07.265] } [13:11:07.265] } [13:11:07.265] invisible(muffled) [13:11:07.265] } [13:11:07.265] muffleCondition(cond, pattern = "^muffle") [13:11:07.265] } [13:11:07.265] } [13:11:07.265] else { [13:11:07.265] if (TRUE) { [13:11:07.265] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.265] { [13:11:07.265] inherits <- base::inherits [13:11:07.265] invokeRestart <- base::invokeRestart [13:11:07.265] is.null <- base::is.null [13:11:07.265] muffled <- FALSE [13:11:07.265] if (inherits(cond, "message")) { [13:11:07.265] muffled <- grepl(pattern, "muffleMessage") [13:11:07.265] if (muffled) [13:11:07.265] invokeRestart("muffleMessage") [13:11:07.265] } [13:11:07.265] else if (inherits(cond, "warning")) { [13:11:07.265] muffled <- grepl(pattern, "muffleWarning") [13:11:07.265] if (muffled) [13:11:07.265] invokeRestart("muffleWarning") [13:11:07.265] } [13:11:07.265] else if (inherits(cond, "condition")) { [13:11:07.265] if (!is.null(pattern)) { [13:11:07.265] computeRestarts <- base::computeRestarts [13:11:07.265] grepl <- base::grepl [13:11:07.265] restarts <- computeRestarts(cond) [13:11:07.265] for (restart in restarts) { [13:11:07.265] name <- restart$name [13:11:07.265] if (is.null(name)) [13:11:07.265] next [13:11:07.265] if (!grepl(pattern, name)) [13:11:07.265] next [13:11:07.265] invokeRestart(restart) [13:11:07.265] muffled <- TRUE [13:11:07.265] break [13:11:07.265] } [13:11:07.265] } [13:11:07.265] } [13:11:07.265] invisible(muffled) [13:11:07.265] } [13:11:07.265] muffleCondition(cond, pattern = "^muffle") [13:11:07.265] } [13:11:07.265] } [13:11:07.265] } [13:11:07.265] })) [13:11:07.265] }, error = function(ex) { [13:11:07.265] base::structure(base::list(value = NULL, visible = NULL, [13:11:07.265] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.265] ...future.rng), started = ...future.startTime, [13:11:07.265] finished = Sys.time(), session_uuid = NA_character_, [13:11:07.265] version = "1.8"), class = "FutureResult") [13:11:07.265] }, finally = { [13:11:07.265] if (!identical(...future.workdir, getwd())) [13:11:07.265] setwd(...future.workdir) [13:11:07.265] { [13:11:07.265] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:07.265] ...future.oldOptions$nwarnings <- NULL [13:11:07.265] } [13:11:07.265] base::options(...future.oldOptions) [13:11:07.265] if (.Platform$OS.type == "windows") { [13:11:07.265] old_names <- names(...future.oldEnvVars) [13:11:07.265] envs <- base::Sys.getenv() [13:11:07.265] names <- names(envs) [13:11:07.265] common <- intersect(names, old_names) [13:11:07.265] added <- setdiff(names, old_names) [13:11:07.265] removed <- setdiff(old_names, names) [13:11:07.265] changed <- common[...future.oldEnvVars[common] != [13:11:07.265] envs[common]] [13:11:07.265] NAMES <- toupper(changed) [13:11:07.265] args <- list() [13:11:07.265] for (kk in seq_along(NAMES)) { [13:11:07.265] name <- changed[[kk]] [13:11:07.265] NAME <- NAMES[[kk]] [13:11:07.265] if (name != NAME && is.element(NAME, old_names)) [13:11:07.265] next [13:11:07.265] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.265] } [13:11:07.265] NAMES <- toupper(added) [13:11:07.265] for (kk in seq_along(NAMES)) { [13:11:07.265] name <- added[[kk]] [13:11:07.265] NAME <- NAMES[[kk]] [13:11:07.265] if (name != NAME && is.element(NAME, old_names)) [13:11:07.265] next [13:11:07.265] args[[name]] <- "" [13:11:07.265] } [13:11:07.265] NAMES <- toupper(removed) [13:11:07.265] for (kk in seq_along(NAMES)) { [13:11:07.265] name <- removed[[kk]] [13:11:07.265] NAME <- NAMES[[kk]] [13:11:07.265] if (name != NAME && is.element(NAME, old_names)) [13:11:07.265] next [13:11:07.265] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.265] } [13:11:07.265] if (length(args) > 0) [13:11:07.265] base::do.call(base::Sys.setenv, args = args) [13:11:07.265] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:07.265] } [13:11:07.265] else { [13:11:07.265] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:07.265] } [13:11:07.265] { [13:11:07.265] if (base::length(...future.futureOptionsAdded) > [13:11:07.265] 0L) { [13:11:07.265] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:07.265] base::names(opts) <- ...future.futureOptionsAdded [13:11:07.265] base::options(opts) [13:11:07.265] } [13:11:07.265] { [13:11:07.265] NULL [13:11:07.265] options(future.plan = NULL) [13:11:07.265] if (is.na(NA_character_)) [13:11:07.265] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.265] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:07.265] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:07.265] .init = FALSE) [13:11:07.265] } [13:11:07.265] } [13:11:07.265] } [13:11:07.265] }) [13:11:07.265] if (TRUE) { [13:11:07.265] base::sink(type = "output", split = FALSE) [13:11:07.265] if (TRUE) { [13:11:07.265] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:07.265] } [13:11:07.265] else { [13:11:07.265] ...future.result["stdout"] <- base::list(NULL) [13:11:07.265] } [13:11:07.265] base::close(...future.stdout) [13:11:07.265] ...future.stdout <- NULL [13:11:07.265] } [13:11:07.265] ...future.result$conditions <- ...future.conditions [13:11:07.265] ...future.result$finished <- base::Sys.time() [13:11:07.265] ...future.result [13:11:07.265] } [13:11:07.269] - Launch lazy future ... done [13:11:07.269] run() for 'MiraiFuture' ... done > rm(list = "x") > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## 'x' is _not_ a global variable here > x <- list() > y %<-% { + x <- list(b = 2) + x$a <- 1 + x + } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:11:07.272] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:11:07.272] Searching for globals... [13:11:07.275] - globals found: [5] '{', '<-', 'list', '$', '$<-' [13:11:07.275] Searching for globals ... DONE [13:11:07.275] Resolving globals: TRUE [13:11:07.276] Resolving any globals that are futures ... [13:11:07.276] - globals: [5] '{', '<-', 'list', '$', '$<-' [13:11:07.276] Resolving any globals that are futures ... DONE [13:11:07.276] [13:11:07.277] [13:11:07.277] getGlobalsAndPackages() ... DONE [13:11:07.277] run() for 'Future' ... [13:11:07.277] - state: 'created' [13:11:07.277] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:07.280] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:07.280] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:07.280] - Field: 'label' [13:11:07.280] - Field: 'local' [13:11:07.280] - Field: 'owner' [13:11:07.281] - Field: 'envir' [13:11:07.281] - Field: 'packages' [13:11:07.281] - Field: 'gc' [13:11:07.281] - Field: 'conditions' [13:11:07.281] - Field: 'expr' [13:11:07.282] - Field: 'uuid' [13:11:07.282] - Field: 'seed' [13:11:07.282] - Field: 'version' [13:11:07.282] - Field: 'result' [13:11:07.282] - Field: 'asynchronous' [13:11:07.282] - Field: 'calls' [13:11:07.283] - Field: 'globals' [13:11:07.283] - Field: 'stdout' [13:11:07.283] - Field: 'earlySignal' [13:11:07.283] - Field: 'lazy' [13:11:07.283] - Field: 'state' [13:11:07.283] - Field: '.cluster' [13:11:07.284] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:07.284] - Launch lazy future ... [13:11:07.284] Packages needed by the future expression (n = 0): [13:11:07.284] Packages needed by future strategies (n = 0): [13:11:07.285] { [13:11:07.285] { [13:11:07.285] { [13:11:07.285] ...future.startTime <- base::Sys.time() [13:11:07.285] { [13:11:07.285] { [13:11:07.285] { [13:11:07.285] base::local({ [13:11:07.285] has_future <- base::requireNamespace("future", [13:11:07.285] quietly = TRUE) [13:11:07.285] if (has_future) { [13:11:07.285] ns <- base::getNamespace("future") [13:11:07.285] version <- ns[[".package"]][["version"]] [13:11:07.285] if (is.null(version)) [13:11:07.285] version <- utils::packageVersion("future") [13:11:07.285] } [13:11:07.285] else { [13:11:07.285] version <- NULL [13:11:07.285] } [13:11:07.285] if (!has_future || version < "1.8.0") { [13:11:07.285] info <- base::c(r_version = base::gsub("R version ", [13:11:07.285] "", base::R.version$version.string), [13:11:07.285] platform = base::sprintf("%s (%s-bit)", [13:11:07.285] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:07.285] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:07.285] "release", "version")], collapse = " "), [13:11:07.285] hostname = base::Sys.info()[["nodename"]]) [13:11:07.285] info <- base::sprintf("%s: %s", base::names(info), [13:11:07.285] info) [13:11:07.285] info <- base::paste(info, collapse = "; ") [13:11:07.285] if (!has_future) { [13:11:07.285] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:07.285] info) [13:11:07.285] } [13:11:07.285] else { [13:11:07.285] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:07.285] info, version) [13:11:07.285] } [13:11:07.285] base::stop(msg) [13:11:07.285] } [13:11:07.285] }) [13:11:07.285] } [13:11:07.285] ...future.strategy.old <- future::plan("list") [13:11:07.285] options(future.plan = NULL) [13:11:07.285] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.285] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:07.285] } [13:11:07.285] ...future.workdir <- getwd() [13:11:07.285] } [13:11:07.285] ...future.oldOptions <- base::as.list(base::.Options) [13:11:07.285] ...future.oldEnvVars <- base::Sys.getenv() [13:11:07.285] } [13:11:07.285] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:11:07.285] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:07.285] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:11:07.285] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:11:07.285] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:07.285] future.stdout.windows.reencode = NULL, width = 80L) [13:11:07.285] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:07.285] base::names(...future.oldOptions)) [13:11:07.285] } [13:11:07.285] if (FALSE) { [13:11:07.285] } [13:11:07.285] else { [13:11:07.285] if (TRUE) { [13:11:07.285] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:07.285] open = "w") [13:11:07.285] } [13:11:07.285] else { [13:11:07.285] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:07.285] windows = "NUL", "/dev/null"), open = "w") [13:11:07.285] } [13:11:07.285] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:07.285] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:07.285] base::sink(type = "output", split = FALSE) [13:11:07.285] base::close(...future.stdout) [13:11:07.285] }, add = TRUE) [13:11:07.285] } [13:11:07.285] ...future.frame <- base::sys.nframe() [13:11:07.285] ...future.conditions <- base::list() [13:11:07.285] ...future.rng <- base::globalenv()$.Random.seed [13:11:07.285] if (FALSE) { [13:11:07.285] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:07.285] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:07.285] } [13:11:07.285] ...future.result <- base::tryCatch({ [13:11:07.285] base::withCallingHandlers({ [13:11:07.285] ...future.value <- base::withVisible(base::local({ [13:11:07.285] x <- list(b = 2) [13:11:07.285] x$a <- 1 [13:11:07.285] x [13:11:07.285] })) [13:11:07.285] future::FutureResult(value = ...future.value$value, [13:11:07.285] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.285] ...future.rng), globalenv = if (FALSE) [13:11:07.285] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:07.285] ...future.globalenv.names)) [13:11:07.285] else NULL, started = ...future.startTime, version = "1.8") [13:11:07.285] }, condition = base::local({ [13:11:07.285] c <- base::c [13:11:07.285] inherits <- base::inherits [13:11:07.285] invokeRestart <- base::invokeRestart [13:11:07.285] length <- base::length [13:11:07.285] list <- base::list [13:11:07.285] seq.int <- base::seq.int [13:11:07.285] signalCondition <- base::signalCondition [13:11:07.285] sys.calls <- base::sys.calls [13:11:07.285] `[[` <- base::`[[` [13:11:07.285] `+` <- base::`+` [13:11:07.285] `<<-` <- base::`<<-` [13:11:07.285] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:07.285] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:07.285] 3L)] [13:11:07.285] } [13:11:07.285] function(cond) { [13:11:07.285] is_error <- inherits(cond, "error") [13:11:07.285] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:07.285] NULL) [13:11:07.285] if (is_error) { [13:11:07.285] sessionInformation <- function() { [13:11:07.285] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:07.285] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:07.285] search = base::search(), system = base::Sys.info()) [13:11:07.285] } [13:11:07.285] ...future.conditions[[length(...future.conditions) + [13:11:07.285] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:07.285] cond$call), session = sessionInformation(), [13:11:07.285] timestamp = base::Sys.time(), signaled = 0L) [13:11:07.285] signalCondition(cond) [13:11:07.285] } [13:11:07.285] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:07.285] signal <- FALSE && inherits(cond, character(0)) [13:11:07.285] ...future.conditions[[length(...future.conditions) + [13:11:07.285] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:07.285] if (FALSE && !signal) { [13:11:07.285] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.285] { [13:11:07.285] inherits <- base::inherits [13:11:07.285] invokeRestart <- base::invokeRestart [13:11:07.285] is.null <- base::is.null [13:11:07.285] muffled <- FALSE [13:11:07.285] if (inherits(cond, "message")) { [13:11:07.285] muffled <- grepl(pattern, "muffleMessage") [13:11:07.285] if (muffled) [13:11:07.285] invokeRestart("muffleMessage") [13:11:07.285] } [13:11:07.285] else if (inherits(cond, "warning")) { [13:11:07.285] muffled <- grepl(pattern, "muffleWarning") [13:11:07.285] if (muffled) [13:11:07.285] invokeRestart("muffleWarning") [13:11:07.285] } [13:11:07.285] else if (inherits(cond, "condition")) { [13:11:07.285] if (!is.null(pattern)) { [13:11:07.285] computeRestarts <- base::computeRestarts [13:11:07.285] grepl <- base::grepl [13:11:07.285] restarts <- computeRestarts(cond) [13:11:07.285] for (restart in restarts) { [13:11:07.285] name <- restart$name [13:11:07.285] if (is.null(name)) [13:11:07.285] next [13:11:07.285] if (!grepl(pattern, name)) [13:11:07.285] next [13:11:07.285] invokeRestart(restart) [13:11:07.285] muffled <- TRUE [13:11:07.285] break [13:11:07.285] } [13:11:07.285] } [13:11:07.285] } [13:11:07.285] invisible(muffled) [13:11:07.285] } [13:11:07.285] muffleCondition(cond, pattern = "^muffle") [13:11:07.285] } [13:11:07.285] } [13:11:07.285] else { [13:11:07.285] if (TRUE) { [13:11:07.285] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.285] { [13:11:07.285] inherits <- base::inherits [13:11:07.285] invokeRestart <- base::invokeRestart [13:11:07.285] is.null <- base::is.null [13:11:07.285] muffled <- FALSE [13:11:07.285] if (inherits(cond, "message")) { [13:11:07.285] muffled <- grepl(pattern, "muffleMessage") [13:11:07.285] if (muffled) [13:11:07.285] invokeRestart("muffleMessage") [13:11:07.285] } [13:11:07.285] else if (inherits(cond, "warning")) { [13:11:07.285] muffled <- grepl(pattern, "muffleWarning") [13:11:07.285] if (muffled) [13:11:07.285] invokeRestart("muffleWarning") [13:11:07.285] } [13:11:07.285] else if (inherits(cond, "condition")) { [13:11:07.285] if (!is.null(pattern)) { [13:11:07.285] computeRestarts <- base::computeRestarts [13:11:07.285] grepl <- base::grepl [13:11:07.285] restarts <- computeRestarts(cond) [13:11:07.285] for (restart in restarts) { [13:11:07.285] name <- restart$name [13:11:07.285] if (is.null(name)) [13:11:07.285] next [13:11:07.285] if (!grepl(pattern, name)) [13:11:07.285] next [13:11:07.285] invokeRestart(restart) [13:11:07.285] muffled <- TRUE [13:11:07.285] break [13:11:07.285] } [13:11:07.285] } [13:11:07.285] } [13:11:07.285] invisible(muffled) [13:11:07.285] } [13:11:07.285] muffleCondition(cond, pattern = "^muffle") [13:11:07.285] } [13:11:07.285] } [13:11:07.285] } [13:11:07.285] })) [13:11:07.285] }, error = function(ex) { [13:11:07.285] base::structure(base::list(value = NULL, visible = NULL, [13:11:07.285] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.285] ...future.rng), started = ...future.startTime, [13:11:07.285] finished = Sys.time(), session_uuid = NA_character_, [13:11:07.285] version = "1.8"), class = "FutureResult") [13:11:07.285] }, finally = { [13:11:07.285] if (!identical(...future.workdir, getwd())) [13:11:07.285] setwd(...future.workdir) [13:11:07.285] { [13:11:07.285] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:07.285] ...future.oldOptions$nwarnings <- NULL [13:11:07.285] } [13:11:07.285] base::options(...future.oldOptions) [13:11:07.285] if (.Platform$OS.type == "windows") { [13:11:07.285] old_names <- names(...future.oldEnvVars) [13:11:07.285] envs <- base::Sys.getenv() [13:11:07.285] names <- names(envs) [13:11:07.285] common <- intersect(names, old_names) [13:11:07.285] added <- setdiff(names, old_names) [13:11:07.285] removed <- setdiff(old_names, names) [13:11:07.285] changed <- common[...future.oldEnvVars[common] != [13:11:07.285] envs[common]] [13:11:07.285] NAMES <- toupper(changed) [13:11:07.285] args <- list() [13:11:07.285] for (kk in seq_along(NAMES)) { [13:11:07.285] name <- changed[[kk]] [13:11:07.285] NAME <- NAMES[[kk]] [13:11:07.285] if (name != NAME && is.element(NAME, old_names)) [13:11:07.285] next [13:11:07.285] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.285] } [13:11:07.285] NAMES <- toupper(added) [13:11:07.285] for (kk in seq_along(NAMES)) { [13:11:07.285] name <- added[[kk]] [13:11:07.285] NAME <- NAMES[[kk]] [13:11:07.285] if (name != NAME && is.element(NAME, old_names)) [13:11:07.285] next [13:11:07.285] args[[name]] <- "" [13:11:07.285] } [13:11:07.285] NAMES <- toupper(removed) [13:11:07.285] for (kk in seq_along(NAMES)) { [13:11:07.285] name <- removed[[kk]] [13:11:07.285] NAME <- NAMES[[kk]] [13:11:07.285] if (name != NAME && is.element(NAME, old_names)) [13:11:07.285] next [13:11:07.285] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.285] } [13:11:07.285] if (length(args) > 0) [13:11:07.285] base::do.call(base::Sys.setenv, args = args) [13:11:07.285] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:07.285] } [13:11:07.285] else { [13:11:07.285] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:07.285] } [13:11:07.285] { [13:11:07.285] if (base::length(...future.futureOptionsAdded) > [13:11:07.285] 0L) { [13:11:07.285] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:07.285] base::names(opts) <- ...future.futureOptionsAdded [13:11:07.285] base::options(opts) [13:11:07.285] } [13:11:07.285] { [13:11:07.285] NULL [13:11:07.285] options(future.plan = NULL) [13:11:07.285] if (is.na(NA_character_)) [13:11:07.285] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.285] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:07.285] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:07.285] .init = FALSE) [13:11:07.285] } [13:11:07.285] } [13:11:07.285] } [13:11:07.285] }) [13:11:07.285] if (TRUE) { [13:11:07.285] base::sink(type = "output", split = FALSE) [13:11:07.285] if (TRUE) { [13:11:07.285] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:07.285] } [13:11:07.285] else { [13:11:07.285] ...future.result["stdout"] <- base::list(NULL) [13:11:07.285] } [13:11:07.285] base::close(...future.stdout) [13:11:07.285] ...future.stdout <- NULL [13:11:07.285] } [13:11:07.285] ...future.result$conditions <- ...future.conditions [13:11:07.285] ...future.result$finished <- base::Sys.time() [13:11:07.285] ...future.result [13:11:07.285] } [13:11:07.288] - Launch lazy future ... done [13:11:07.289] run() for 'MiraiFuture' ... done > rm(list = "x") > print(y) $b [1] 2 $a [1] 1 > stopifnot(identical(y, list(b = 2, a = 1))) > > ## Explicit future > x <- list() > f <- future({ + x[["a"]] <- 1 + x + }) Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:11:07.291] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:11:07.291] Searching for globals... [13:11:07.293] - globals found: [5] '{', 'x', '<-', '[[', '[[<-' [13:11:07.294] Searching for globals ... DONE [13:11:07.294] Resolving globals: TRUE [13:11:07.294] Resolving any globals that are futures ... [13:11:07.294] - globals: [5] '{', 'x', '<-', '[[', '[[<-' [13:11:07.294] Resolving any globals that are futures ... DONE [13:11:07.295] Resolving futures part of globals (recursively) ... [13:11:07.295] resolve() on list ... [13:11:07.295] recursive: 99 [13:11:07.297] length: 1 [13:11:07.297] elements: 'x' [13:11:07.297] length: 0 (resolved future 1) [13:11:07.297] resolve() on list ... DONE [13:11:07.298] - globals: [1] 'x' [13:11:07.298] Resolving futures part of globals (recursively) ... DONE [13:11:07.298] The total size of the 1 globals is 0 bytes (0 bytes) [13:11:07.298] The total size of the 1 globals exported for future expression ('{; x[["a"]] <- 1; x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:11:07.299] - globals: [1] 'x' [13:11:07.299] [13:11:07.299] getGlobalsAndPackages() ... DONE [13:11:07.299] run() for 'Future' ... [13:11:07.299] - state: 'created' [13:11:07.300] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:07.302] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:07.302] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:07.302] - Field: 'label' [13:11:07.302] - Field: 'local' [13:11:07.303] - Field: 'owner' [13:11:07.303] - Field: 'envir' [13:11:07.303] - Field: 'packages' [13:11:07.303] - Field: 'gc' [13:11:07.303] - Field: 'conditions' [13:11:07.303] - Field: 'expr' [13:11:07.304] - Field: 'uuid' [13:11:07.304] - Field: 'seed' [13:11:07.304] - Field: 'version' [13:11:07.304] - Field: 'result' [13:11:07.304] - Field: 'asynchronous' [13:11:07.305] - Field: 'calls' [13:11:07.305] - Field: 'globals' [13:11:07.305] - Field: 'stdout' [13:11:07.305] - Field: 'earlySignal' [13:11:07.305] - Field: 'lazy' [13:11:07.305] - Field: 'state' [13:11:07.306] - Field: '.cluster' [13:11:07.306] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:07.306] - Launch lazy future ... [13:11:07.306] Packages needed by the future expression (n = 0): [13:11:07.306] Packages needed by future strategies (n = 0): [13:11:07.307] { [13:11:07.307] { [13:11:07.307] { [13:11:07.307] ...future.startTime <- base::Sys.time() [13:11:07.307] { [13:11:07.307] { [13:11:07.307] { [13:11:07.307] base::local({ [13:11:07.307] has_future <- base::requireNamespace("future", [13:11:07.307] quietly = TRUE) [13:11:07.307] if (has_future) { [13:11:07.307] ns <- base::getNamespace("future") [13:11:07.307] version <- ns[[".package"]][["version"]] [13:11:07.307] if (is.null(version)) [13:11:07.307] version <- utils::packageVersion("future") [13:11:07.307] } [13:11:07.307] else { [13:11:07.307] version <- NULL [13:11:07.307] } [13:11:07.307] if (!has_future || version < "1.8.0") { [13:11:07.307] info <- base::c(r_version = base::gsub("R version ", [13:11:07.307] "", base::R.version$version.string), [13:11:07.307] platform = base::sprintf("%s (%s-bit)", [13:11:07.307] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:07.307] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:07.307] "release", "version")], collapse = " "), [13:11:07.307] hostname = base::Sys.info()[["nodename"]]) [13:11:07.307] info <- base::sprintf("%s: %s", base::names(info), [13:11:07.307] info) [13:11:07.307] info <- base::paste(info, collapse = "; ") [13:11:07.307] if (!has_future) { [13:11:07.307] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:07.307] info) [13:11:07.307] } [13:11:07.307] else { [13:11:07.307] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:07.307] info, version) [13:11:07.307] } [13:11:07.307] base::stop(msg) [13:11:07.307] } [13:11:07.307] }) [13:11:07.307] } [13:11:07.307] ...future.strategy.old <- future::plan("list") [13:11:07.307] options(future.plan = NULL) [13:11:07.307] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.307] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:07.307] } [13:11:07.307] ...future.workdir <- getwd() [13:11:07.307] } [13:11:07.307] ...future.oldOptions <- base::as.list(base::.Options) [13:11:07.307] ...future.oldEnvVars <- base::Sys.getenv() [13:11:07.307] } [13:11:07.307] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:11:07.307] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:07.307] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:11:07.307] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:11:07.307] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:07.307] future.stdout.windows.reencode = NULL, width = 80L) [13:11:07.307] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:07.307] base::names(...future.oldOptions)) [13:11:07.307] } [13:11:07.307] if (FALSE) { [13:11:07.307] } [13:11:07.307] else { [13:11:07.307] if (TRUE) { [13:11:07.307] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:07.307] open = "w") [13:11:07.307] } [13:11:07.307] else { [13:11:07.307] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:07.307] windows = "NUL", "/dev/null"), open = "w") [13:11:07.307] } [13:11:07.307] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:07.307] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:07.307] base::sink(type = "output", split = FALSE) [13:11:07.307] base::close(...future.stdout) [13:11:07.307] }, add = TRUE) [13:11:07.307] } [13:11:07.307] ...future.frame <- base::sys.nframe() [13:11:07.307] ...future.conditions <- base::list() [13:11:07.307] ...future.rng <- base::globalenv()$.Random.seed [13:11:07.307] if (FALSE) { [13:11:07.307] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:07.307] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:07.307] } [13:11:07.307] ...future.result <- base::tryCatch({ [13:11:07.307] base::withCallingHandlers({ [13:11:07.307] ...future.value <- base::withVisible(base::local({ [13:11:07.307] x[["a"]] <- 1 [13:11:07.307] x [13:11:07.307] })) [13:11:07.307] future::FutureResult(value = ...future.value$value, [13:11:07.307] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.307] ...future.rng), globalenv = if (FALSE) [13:11:07.307] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:07.307] ...future.globalenv.names)) [13:11:07.307] else NULL, started = ...future.startTime, version = "1.8") [13:11:07.307] }, condition = base::local({ [13:11:07.307] c <- base::c [13:11:07.307] inherits <- base::inherits [13:11:07.307] invokeRestart <- base::invokeRestart [13:11:07.307] length <- base::length [13:11:07.307] list <- base::list [13:11:07.307] seq.int <- base::seq.int [13:11:07.307] signalCondition <- base::signalCondition [13:11:07.307] sys.calls <- base::sys.calls [13:11:07.307] `[[` <- base::`[[` [13:11:07.307] `+` <- base::`+` [13:11:07.307] `<<-` <- base::`<<-` [13:11:07.307] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:07.307] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:07.307] 3L)] [13:11:07.307] } [13:11:07.307] function(cond) { [13:11:07.307] is_error <- inherits(cond, "error") [13:11:07.307] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:07.307] NULL) [13:11:07.307] if (is_error) { [13:11:07.307] sessionInformation <- function() { [13:11:07.307] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:07.307] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:07.307] search = base::search(), system = base::Sys.info()) [13:11:07.307] } [13:11:07.307] ...future.conditions[[length(...future.conditions) + [13:11:07.307] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:07.307] cond$call), session = sessionInformation(), [13:11:07.307] timestamp = base::Sys.time(), signaled = 0L) [13:11:07.307] signalCondition(cond) [13:11:07.307] } [13:11:07.307] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:07.307] signal <- FALSE && inherits(cond, character(0)) [13:11:07.307] ...future.conditions[[length(...future.conditions) + [13:11:07.307] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:07.307] if (FALSE && !signal) { [13:11:07.307] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.307] { [13:11:07.307] inherits <- base::inherits [13:11:07.307] invokeRestart <- base::invokeRestart [13:11:07.307] is.null <- base::is.null [13:11:07.307] muffled <- FALSE [13:11:07.307] if (inherits(cond, "message")) { [13:11:07.307] muffled <- grepl(pattern, "muffleMessage") [13:11:07.307] if (muffled) [13:11:07.307] invokeRestart("muffleMessage") [13:11:07.307] } [13:11:07.307] else if (inherits(cond, "warning")) { [13:11:07.307] muffled <- grepl(pattern, "muffleWarning") [13:11:07.307] if (muffled) [13:11:07.307] invokeRestart("muffleWarning") [13:11:07.307] } [13:11:07.307] else if (inherits(cond, "condition")) { [13:11:07.307] if (!is.null(pattern)) { [13:11:07.307] computeRestarts <- base::computeRestarts [13:11:07.307] grepl <- base::grepl [13:11:07.307] restarts <- computeRestarts(cond) [13:11:07.307] for (restart in restarts) { [13:11:07.307] name <- restart$name [13:11:07.307] if (is.null(name)) [13:11:07.307] next [13:11:07.307] if (!grepl(pattern, name)) [13:11:07.307] next [13:11:07.307] invokeRestart(restart) [13:11:07.307] muffled <- TRUE [13:11:07.307] break [13:11:07.307] } [13:11:07.307] } [13:11:07.307] } [13:11:07.307] invisible(muffled) [13:11:07.307] } [13:11:07.307] muffleCondition(cond, pattern = "^muffle") [13:11:07.307] } [13:11:07.307] } [13:11:07.307] else { [13:11:07.307] if (TRUE) { [13:11:07.307] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.307] { [13:11:07.307] inherits <- base::inherits [13:11:07.307] invokeRestart <- base::invokeRestart [13:11:07.307] is.null <- base::is.null [13:11:07.307] muffled <- FALSE [13:11:07.307] if (inherits(cond, "message")) { [13:11:07.307] muffled <- grepl(pattern, "muffleMessage") [13:11:07.307] if (muffled) [13:11:07.307] invokeRestart("muffleMessage") [13:11:07.307] } [13:11:07.307] else if (inherits(cond, "warning")) { [13:11:07.307] muffled <- grepl(pattern, "muffleWarning") [13:11:07.307] if (muffled) [13:11:07.307] invokeRestart("muffleWarning") [13:11:07.307] } [13:11:07.307] else if (inherits(cond, "condition")) { [13:11:07.307] if (!is.null(pattern)) { [13:11:07.307] computeRestarts <- base::computeRestarts [13:11:07.307] grepl <- base::grepl [13:11:07.307] restarts <- computeRestarts(cond) [13:11:07.307] for (restart in restarts) { [13:11:07.307] name <- restart$name [13:11:07.307] if (is.null(name)) [13:11:07.307] next [13:11:07.307] if (!grepl(pattern, name)) [13:11:07.307] next [13:11:07.307] invokeRestart(restart) [13:11:07.307] muffled <- TRUE [13:11:07.307] break [13:11:07.307] } [13:11:07.307] } [13:11:07.307] } [13:11:07.307] invisible(muffled) [13:11:07.307] } [13:11:07.307] muffleCondition(cond, pattern = "^muffle") [13:11:07.307] } [13:11:07.307] } [13:11:07.307] } [13:11:07.307] })) [13:11:07.307] }, error = function(ex) { [13:11:07.307] base::structure(base::list(value = NULL, visible = NULL, [13:11:07.307] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.307] ...future.rng), started = ...future.startTime, [13:11:07.307] finished = Sys.time(), session_uuid = NA_character_, [13:11:07.307] version = "1.8"), class = "FutureResult") [13:11:07.307] }, finally = { [13:11:07.307] if (!identical(...future.workdir, getwd())) [13:11:07.307] setwd(...future.workdir) [13:11:07.307] { [13:11:07.307] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:07.307] ...future.oldOptions$nwarnings <- NULL [13:11:07.307] } [13:11:07.307] base::options(...future.oldOptions) [13:11:07.307] if (.Platform$OS.type == "windows") { [13:11:07.307] old_names <- names(...future.oldEnvVars) [13:11:07.307] envs <- base::Sys.getenv() [13:11:07.307] names <- names(envs) [13:11:07.307] common <- intersect(names, old_names) [13:11:07.307] added <- setdiff(names, old_names) [13:11:07.307] removed <- setdiff(old_names, names) [13:11:07.307] changed <- common[...future.oldEnvVars[common] != [13:11:07.307] envs[common]] [13:11:07.307] NAMES <- toupper(changed) [13:11:07.307] args <- list() [13:11:07.307] for (kk in seq_along(NAMES)) { [13:11:07.307] name <- changed[[kk]] [13:11:07.307] NAME <- NAMES[[kk]] [13:11:07.307] if (name != NAME && is.element(NAME, old_names)) [13:11:07.307] next [13:11:07.307] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.307] } [13:11:07.307] NAMES <- toupper(added) [13:11:07.307] for (kk in seq_along(NAMES)) { [13:11:07.307] name <- added[[kk]] [13:11:07.307] NAME <- NAMES[[kk]] [13:11:07.307] if (name != NAME && is.element(NAME, old_names)) [13:11:07.307] next [13:11:07.307] args[[name]] <- "" [13:11:07.307] } [13:11:07.307] NAMES <- toupper(removed) [13:11:07.307] for (kk in seq_along(NAMES)) { [13:11:07.307] name <- removed[[kk]] [13:11:07.307] NAME <- NAMES[[kk]] [13:11:07.307] if (name != NAME && is.element(NAME, old_names)) [13:11:07.307] next [13:11:07.307] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.307] } [13:11:07.307] if (length(args) > 0) [13:11:07.307] base::do.call(base::Sys.setenv, args = args) [13:11:07.307] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:07.307] } [13:11:07.307] else { [13:11:07.307] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:07.307] } [13:11:07.307] { [13:11:07.307] if (base::length(...future.futureOptionsAdded) > [13:11:07.307] 0L) { [13:11:07.307] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:07.307] base::names(opts) <- ...future.futureOptionsAdded [13:11:07.307] base::options(opts) [13:11:07.307] } [13:11:07.307] { [13:11:07.307] NULL [13:11:07.307] options(future.plan = NULL) [13:11:07.307] if (is.na(NA_character_)) [13:11:07.307] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.307] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:07.307] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:07.307] .init = FALSE) [13:11:07.307] } [13:11:07.307] } [13:11:07.307] } [13:11:07.307] }) [13:11:07.307] if (TRUE) { [13:11:07.307] base::sink(type = "output", split = FALSE) [13:11:07.307] if (TRUE) { [13:11:07.307] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:07.307] } [13:11:07.307] else { [13:11:07.307] ...future.result["stdout"] <- base::list(NULL) [13:11:07.307] } [13:11:07.307] base::close(...future.stdout) [13:11:07.307] ...future.stdout <- NULL [13:11:07.307] } [13:11:07.307] ...future.result$conditions <- ...future.conditions [13:11:07.307] ...future.result$finished <- base::Sys.time() [13:11:07.307] ...future.result [13:11:07.307] } [13:11:07.311] - Launch lazy future ... done [13:11:07.311] run() for 'MiraiFuture' ... done > rm(list = "x") > y <- value(f) > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## Future assignment > x <- list() > y %<-% { + x[["a"]] <- 1 + x + } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:11:07.313] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:11:07.313] Searching for globals... [13:11:07.316] - globals found: [5] '{', 'x', '<-', '[[', '[[<-' [13:11:07.316] Searching for globals ... DONE [13:11:07.316] Resolving globals: TRUE [13:11:07.316] Resolving any globals that are futures ... [13:11:07.316] - globals: [5] '{', 'x', '<-', '[[', '[[<-' [13:11:07.317] Resolving any globals that are futures ... DONE [13:11:07.317] Resolving futures part of globals (recursively) ... [13:11:07.317] resolve() on list ... [13:11:07.317] recursive: 99 [13:11:07.318] length: 1 [13:11:07.318] elements: 'x' [13:11:07.318] length: 0 (resolved future 1) [13:11:07.318] resolve() on list ... DONE [13:11:07.318] - globals: [1] 'x' [13:11:07.318] Resolving futures part of globals (recursively) ... DONE [13:11:07.319] The total size of the 1 globals is 0 bytes (0 bytes) [13:11:07.319] The total size of the 1 globals exported for future expression ('{; x[["a"]] <- 1; x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:11:07.319] - globals: [1] 'x' [13:11:07.319] [13:11:07.320] getGlobalsAndPackages() ... DONE [13:11:07.320] run() for 'Future' ... [13:11:07.320] - state: 'created' [13:11:07.320] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:07.323] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:07.323] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:07.323] - Field: 'label' [13:11:07.323] - Field: 'local' [13:11:07.323] - Field: 'owner' [13:11:07.323] - Field: 'envir' [13:11:07.324] - Field: 'packages' [13:11:07.324] - Field: 'gc' [13:11:07.324] - Field: 'conditions' [13:11:07.324] - Field: 'expr' [13:11:07.324] - Field: 'uuid' [13:11:07.325] - Field: 'seed' [13:11:07.325] - Field: 'version' [13:11:07.325] - Field: 'result' [13:11:07.325] - Field: 'asynchronous' [13:11:07.325] - Field: 'calls' [13:11:07.325] - Field: 'globals' [13:11:07.326] - Field: 'stdout' [13:11:07.326] - Field: 'earlySignal' [13:11:07.326] - Field: 'lazy' [13:11:07.326] - Field: 'state' [13:11:07.326] - Field: '.cluster' [13:11:07.326] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:07.327] - Launch lazy future ... [13:11:07.327] Packages needed by the future expression (n = 0): [13:11:07.327] Packages needed by future strategies (n = 0): [13:11:07.327] { [13:11:07.327] { [13:11:07.327] { [13:11:07.327] ...future.startTime <- base::Sys.time() [13:11:07.327] { [13:11:07.327] { [13:11:07.327] { [13:11:07.327] base::local({ [13:11:07.327] has_future <- base::requireNamespace("future", [13:11:07.327] quietly = TRUE) [13:11:07.327] if (has_future) { [13:11:07.327] ns <- base::getNamespace("future") [13:11:07.327] version <- ns[[".package"]][["version"]] [13:11:07.327] if (is.null(version)) [13:11:07.327] version <- utils::packageVersion("future") [13:11:07.327] } [13:11:07.327] else { [13:11:07.327] version <- NULL [13:11:07.327] } [13:11:07.327] if (!has_future || version < "1.8.0") { [13:11:07.327] info <- base::c(r_version = base::gsub("R version ", [13:11:07.327] "", base::R.version$version.string), [13:11:07.327] platform = base::sprintf("%s (%s-bit)", [13:11:07.327] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:07.327] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:07.327] "release", "version")], collapse = " "), [13:11:07.327] hostname = base::Sys.info()[["nodename"]]) [13:11:07.327] info <- base::sprintf("%s: %s", base::names(info), [13:11:07.327] info) [13:11:07.327] info <- base::paste(info, collapse = "; ") [13:11:07.327] if (!has_future) { [13:11:07.327] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:07.327] info) [13:11:07.327] } [13:11:07.327] else { [13:11:07.327] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:07.327] info, version) [13:11:07.327] } [13:11:07.327] base::stop(msg) [13:11:07.327] } [13:11:07.327] }) [13:11:07.327] } [13:11:07.327] ...future.strategy.old <- future::plan("list") [13:11:07.327] options(future.plan = NULL) [13:11:07.327] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.327] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:07.327] } [13:11:07.327] ...future.workdir <- getwd() [13:11:07.327] } [13:11:07.327] ...future.oldOptions <- base::as.list(base::.Options) [13:11:07.327] ...future.oldEnvVars <- base::Sys.getenv() [13:11:07.327] } [13:11:07.327] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:11:07.327] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:07.327] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:11:07.327] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:11:07.327] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:07.327] future.stdout.windows.reencode = NULL, width = 80L) [13:11:07.327] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:07.327] base::names(...future.oldOptions)) [13:11:07.327] } [13:11:07.327] if (FALSE) { [13:11:07.327] } [13:11:07.327] else { [13:11:07.327] if (TRUE) { [13:11:07.327] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:07.327] open = "w") [13:11:07.327] } [13:11:07.327] else { [13:11:07.327] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:07.327] windows = "NUL", "/dev/null"), open = "w") [13:11:07.327] } [13:11:07.327] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:07.327] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:07.327] base::sink(type = "output", split = FALSE) [13:11:07.327] base::close(...future.stdout) [13:11:07.327] }, add = TRUE) [13:11:07.327] } [13:11:07.327] ...future.frame <- base::sys.nframe() [13:11:07.327] ...future.conditions <- base::list() [13:11:07.327] ...future.rng <- base::globalenv()$.Random.seed [13:11:07.327] if (FALSE) { [13:11:07.327] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:07.327] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:07.327] } [13:11:07.327] ...future.result <- base::tryCatch({ [13:11:07.327] base::withCallingHandlers({ [13:11:07.327] ...future.value <- base::withVisible(base::local({ [13:11:07.327] x[["a"]] <- 1 [13:11:07.327] x [13:11:07.327] })) [13:11:07.327] future::FutureResult(value = ...future.value$value, [13:11:07.327] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.327] ...future.rng), globalenv = if (FALSE) [13:11:07.327] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:07.327] ...future.globalenv.names)) [13:11:07.327] else NULL, started = ...future.startTime, version = "1.8") [13:11:07.327] }, condition = base::local({ [13:11:07.327] c <- base::c [13:11:07.327] inherits <- base::inherits [13:11:07.327] invokeRestart <- base::invokeRestart [13:11:07.327] length <- base::length [13:11:07.327] list <- base::list [13:11:07.327] seq.int <- base::seq.int [13:11:07.327] signalCondition <- base::signalCondition [13:11:07.327] sys.calls <- base::sys.calls [13:11:07.327] `[[` <- base::`[[` [13:11:07.327] `+` <- base::`+` [13:11:07.327] `<<-` <- base::`<<-` [13:11:07.327] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:07.327] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:07.327] 3L)] [13:11:07.327] } [13:11:07.327] function(cond) { [13:11:07.327] is_error <- inherits(cond, "error") [13:11:07.327] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:07.327] NULL) [13:11:07.327] if (is_error) { [13:11:07.327] sessionInformation <- function() { [13:11:07.327] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:07.327] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:07.327] search = base::search(), system = base::Sys.info()) [13:11:07.327] } [13:11:07.327] ...future.conditions[[length(...future.conditions) + [13:11:07.327] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:07.327] cond$call), session = sessionInformation(), [13:11:07.327] timestamp = base::Sys.time(), signaled = 0L) [13:11:07.327] signalCondition(cond) [13:11:07.327] } [13:11:07.327] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:07.327] signal <- FALSE && inherits(cond, character(0)) [13:11:07.327] ...future.conditions[[length(...future.conditions) + [13:11:07.327] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:07.327] if (FALSE && !signal) { [13:11:07.327] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.327] { [13:11:07.327] inherits <- base::inherits [13:11:07.327] invokeRestart <- base::invokeRestart [13:11:07.327] is.null <- base::is.null [13:11:07.327] muffled <- FALSE [13:11:07.327] if (inherits(cond, "message")) { [13:11:07.327] muffled <- grepl(pattern, "muffleMessage") [13:11:07.327] if (muffled) [13:11:07.327] invokeRestart("muffleMessage") [13:11:07.327] } [13:11:07.327] else if (inherits(cond, "warning")) { [13:11:07.327] muffled <- grepl(pattern, "muffleWarning") [13:11:07.327] if (muffled) [13:11:07.327] invokeRestart("muffleWarning") [13:11:07.327] } [13:11:07.327] else if (inherits(cond, "condition")) { [13:11:07.327] if (!is.null(pattern)) { [13:11:07.327] computeRestarts <- base::computeRestarts [13:11:07.327] grepl <- base::grepl [13:11:07.327] restarts <- computeRestarts(cond) [13:11:07.327] for (restart in restarts) { [13:11:07.327] name <- restart$name [13:11:07.327] if (is.null(name)) [13:11:07.327] next [13:11:07.327] if (!grepl(pattern, name)) [13:11:07.327] next [13:11:07.327] invokeRestart(restart) [13:11:07.327] muffled <- TRUE [13:11:07.327] break [13:11:07.327] } [13:11:07.327] } [13:11:07.327] } [13:11:07.327] invisible(muffled) [13:11:07.327] } [13:11:07.327] muffleCondition(cond, pattern = "^muffle") [13:11:07.327] } [13:11:07.327] } [13:11:07.327] else { [13:11:07.327] if (TRUE) { [13:11:07.327] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.327] { [13:11:07.327] inherits <- base::inherits [13:11:07.327] invokeRestart <- base::invokeRestart [13:11:07.327] is.null <- base::is.null [13:11:07.327] muffled <- FALSE [13:11:07.327] if (inherits(cond, "message")) { [13:11:07.327] muffled <- grepl(pattern, "muffleMessage") [13:11:07.327] if (muffled) [13:11:07.327] invokeRestart("muffleMessage") [13:11:07.327] } [13:11:07.327] else if (inherits(cond, "warning")) { [13:11:07.327] muffled <- grepl(pattern, "muffleWarning") [13:11:07.327] if (muffled) [13:11:07.327] invokeRestart("muffleWarning") [13:11:07.327] } [13:11:07.327] else if (inherits(cond, "condition")) { [13:11:07.327] if (!is.null(pattern)) { [13:11:07.327] computeRestarts <- base::computeRestarts [13:11:07.327] grepl <- base::grepl [13:11:07.327] restarts <- computeRestarts(cond) [13:11:07.327] for (restart in restarts) { [13:11:07.327] name <- restart$name [13:11:07.327] if (is.null(name)) [13:11:07.327] next [13:11:07.327] if (!grepl(pattern, name)) [13:11:07.327] next [13:11:07.327] invokeRestart(restart) [13:11:07.327] muffled <- TRUE [13:11:07.327] break [13:11:07.327] } [13:11:07.327] } [13:11:07.327] } [13:11:07.327] invisible(muffled) [13:11:07.327] } [13:11:07.327] muffleCondition(cond, pattern = "^muffle") [13:11:07.327] } [13:11:07.327] } [13:11:07.327] } [13:11:07.327] })) [13:11:07.327] }, error = function(ex) { [13:11:07.327] base::structure(base::list(value = NULL, visible = NULL, [13:11:07.327] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.327] ...future.rng), started = ...future.startTime, [13:11:07.327] finished = Sys.time(), session_uuid = NA_character_, [13:11:07.327] version = "1.8"), class = "FutureResult") [13:11:07.327] }, finally = { [13:11:07.327] if (!identical(...future.workdir, getwd())) [13:11:07.327] setwd(...future.workdir) [13:11:07.327] { [13:11:07.327] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:07.327] ...future.oldOptions$nwarnings <- NULL [13:11:07.327] } [13:11:07.327] base::options(...future.oldOptions) [13:11:07.327] if (.Platform$OS.type == "windows") { [13:11:07.327] old_names <- names(...future.oldEnvVars) [13:11:07.327] envs <- base::Sys.getenv() [13:11:07.327] names <- names(envs) [13:11:07.327] common <- intersect(names, old_names) [13:11:07.327] added <- setdiff(names, old_names) [13:11:07.327] removed <- setdiff(old_names, names) [13:11:07.327] changed <- common[...future.oldEnvVars[common] != [13:11:07.327] envs[common]] [13:11:07.327] NAMES <- toupper(changed) [13:11:07.327] args <- list() [13:11:07.327] for (kk in seq_along(NAMES)) { [13:11:07.327] name <- changed[[kk]] [13:11:07.327] NAME <- NAMES[[kk]] [13:11:07.327] if (name != NAME && is.element(NAME, old_names)) [13:11:07.327] next [13:11:07.327] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.327] } [13:11:07.327] NAMES <- toupper(added) [13:11:07.327] for (kk in seq_along(NAMES)) { [13:11:07.327] name <- added[[kk]] [13:11:07.327] NAME <- NAMES[[kk]] [13:11:07.327] if (name != NAME && is.element(NAME, old_names)) [13:11:07.327] next [13:11:07.327] args[[name]] <- "" [13:11:07.327] } [13:11:07.327] NAMES <- toupper(removed) [13:11:07.327] for (kk in seq_along(NAMES)) { [13:11:07.327] name <- removed[[kk]] [13:11:07.327] NAME <- NAMES[[kk]] [13:11:07.327] if (name != NAME && is.element(NAME, old_names)) [13:11:07.327] next [13:11:07.327] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.327] } [13:11:07.327] if (length(args) > 0) [13:11:07.327] base::do.call(base::Sys.setenv, args = args) [13:11:07.327] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:07.327] } [13:11:07.327] else { [13:11:07.327] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:07.327] } [13:11:07.327] { [13:11:07.327] if (base::length(...future.futureOptionsAdded) > [13:11:07.327] 0L) { [13:11:07.327] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:07.327] base::names(opts) <- ...future.futureOptionsAdded [13:11:07.327] base::options(opts) [13:11:07.327] } [13:11:07.327] { [13:11:07.327] NULL [13:11:07.327] options(future.plan = NULL) [13:11:07.327] if (is.na(NA_character_)) [13:11:07.327] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.327] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:07.327] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:07.327] .init = FALSE) [13:11:07.327] } [13:11:07.327] } [13:11:07.327] } [13:11:07.327] }) [13:11:07.327] if (TRUE) { [13:11:07.327] base::sink(type = "output", split = FALSE) [13:11:07.327] if (TRUE) { [13:11:07.327] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:07.327] } [13:11:07.327] else { [13:11:07.327] ...future.result["stdout"] <- base::list(NULL) [13:11:07.327] } [13:11:07.327] base::close(...future.stdout) [13:11:07.327] ...future.stdout <- NULL [13:11:07.327] } [13:11:07.327] ...future.result$conditions <- ...future.conditions [13:11:07.327] ...future.result$finished <- base::Sys.time() [13:11:07.327] ...future.result [13:11:07.327] } [13:11:07.331] - Launch lazy future ... done [13:11:07.332] run() for 'MiraiFuture' ... done > rm(list = "x") > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## Explicit future > x <- list() > f <- future({ + x["a"] <- list(1) + x + }) Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:11:07.334] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:11:07.334] Searching for globals... [13:11:07.338] - globals found: [6] '{', 'x', '<-', '[', '[<-', 'list' [13:11:07.338] Searching for globals ... DONE [13:11:07.338] Resolving globals: TRUE [13:11:07.339] Resolving any globals that are futures ... [13:11:07.339] - globals: [6] '{', 'x', '<-', '[', '[<-', 'list' [13:11:07.339] Resolving any globals that are futures ... DONE [13:11:07.339] Resolving futures part of globals (recursively) ... [13:11:07.340] resolve() on list ... [13:11:07.340] recursive: 99 [13:11:07.340] length: 1 [13:11:07.340] elements: 'x' [13:11:07.340] length: 0 (resolved future 1) [13:11:07.341] resolve() on list ... DONE [13:11:07.341] - globals: [1] 'x' [13:11:07.341] Resolving futures part of globals (recursively) ... DONE [13:11:07.341] The total size of the 1 globals is 0 bytes (0 bytes) [13:11:07.341] The total size of the 1 globals exported for future expression ('{; x["a"] <- list(1); x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:11:07.342] - globals: [1] 'x' [13:11:07.342] [13:11:07.342] getGlobalsAndPackages() ... DONE [13:11:07.342] run() for 'Future' ... [13:11:07.342] - state: 'created' [13:11:07.343] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:07.345] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:07.345] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:07.345] - Field: 'label' [13:11:07.345] - Field: 'local' [13:11:07.346] - Field: 'owner' [13:11:07.346] - Field: 'envir' [13:11:07.346] - Field: 'packages' [13:11:07.346] - Field: 'gc' [13:11:07.346] - Field: 'conditions' [13:11:07.347] - Field: 'expr' [13:11:07.347] - Field: 'uuid' [13:11:07.347] - Field: 'seed' [13:11:07.347] - Field: 'version' [13:11:07.347] - Field: 'result' [13:11:07.347] - Field: 'asynchronous' [13:11:07.348] - Field: 'calls' [13:11:07.348] - Field: 'globals' [13:11:07.348] - Field: 'stdout' [13:11:07.348] - Field: 'earlySignal' [13:11:07.348] - Field: 'lazy' [13:11:07.348] - Field: 'state' [13:11:07.349] - Field: '.cluster' [13:11:07.349] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:07.349] - Launch lazy future ... [13:11:07.349] Packages needed by the future expression (n = 0): [13:11:07.349] Packages needed by future strategies (n = 0): [13:11:07.350] { [13:11:07.350] { [13:11:07.350] { [13:11:07.350] ...future.startTime <- base::Sys.time() [13:11:07.350] { [13:11:07.350] { [13:11:07.350] { [13:11:07.350] base::local({ [13:11:07.350] has_future <- base::requireNamespace("future", [13:11:07.350] quietly = TRUE) [13:11:07.350] if (has_future) { [13:11:07.350] ns <- base::getNamespace("future") [13:11:07.350] version <- ns[[".package"]][["version"]] [13:11:07.350] if (is.null(version)) [13:11:07.350] version <- utils::packageVersion("future") [13:11:07.350] } [13:11:07.350] else { [13:11:07.350] version <- NULL [13:11:07.350] } [13:11:07.350] if (!has_future || version < "1.8.0") { [13:11:07.350] info <- base::c(r_version = base::gsub("R version ", [13:11:07.350] "", base::R.version$version.string), [13:11:07.350] platform = base::sprintf("%s (%s-bit)", [13:11:07.350] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:07.350] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:07.350] "release", "version")], collapse = " "), [13:11:07.350] hostname = base::Sys.info()[["nodename"]]) [13:11:07.350] info <- base::sprintf("%s: %s", base::names(info), [13:11:07.350] info) [13:11:07.350] info <- base::paste(info, collapse = "; ") [13:11:07.350] if (!has_future) { [13:11:07.350] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:07.350] info) [13:11:07.350] } [13:11:07.350] else { [13:11:07.350] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:07.350] info, version) [13:11:07.350] } [13:11:07.350] base::stop(msg) [13:11:07.350] } [13:11:07.350] }) [13:11:07.350] } [13:11:07.350] ...future.strategy.old <- future::plan("list") [13:11:07.350] options(future.plan = NULL) [13:11:07.350] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.350] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:07.350] } [13:11:07.350] ...future.workdir <- getwd() [13:11:07.350] } [13:11:07.350] ...future.oldOptions <- base::as.list(base::.Options) [13:11:07.350] ...future.oldEnvVars <- base::Sys.getenv() [13:11:07.350] } [13:11:07.350] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:11:07.350] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:07.350] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:11:07.350] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:11:07.350] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:07.350] future.stdout.windows.reencode = NULL, width = 80L) [13:11:07.350] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:07.350] base::names(...future.oldOptions)) [13:11:07.350] } [13:11:07.350] if (FALSE) { [13:11:07.350] } [13:11:07.350] else { [13:11:07.350] if (TRUE) { [13:11:07.350] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:07.350] open = "w") [13:11:07.350] } [13:11:07.350] else { [13:11:07.350] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:07.350] windows = "NUL", "/dev/null"), open = "w") [13:11:07.350] } [13:11:07.350] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:07.350] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:07.350] base::sink(type = "output", split = FALSE) [13:11:07.350] base::close(...future.stdout) [13:11:07.350] }, add = TRUE) [13:11:07.350] } [13:11:07.350] ...future.frame <- base::sys.nframe() [13:11:07.350] ...future.conditions <- base::list() [13:11:07.350] ...future.rng <- base::globalenv()$.Random.seed [13:11:07.350] if (FALSE) { [13:11:07.350] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:07.350] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:07.350] } [13:11:07.350] ...future.result <- base::tryCatch({ [13:11:07.350] base::withCallingHandlers({ [13:11:07.350] ...future.value <- base::withVisible(base::local({ [13:11:07.350] x["a"] <- list(1) [13:11:07.350] x [13:11:07.350] })) [13:11:07.350] future::FutureResult(value = ...future.value$value, [13:11:07.350] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.350] ...future.rng), globalenv = if (FALSE) [13:11:07.350] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:07.350] ...future.globalenv.names)) [13:11:07.350] else NULL, started = ...future.startTime, version = "1.8") [13:11:07.350] }, condition = base::local({ [13:11:07.350] c <- base::c [13:11:07.350] inherits <- base::inherits [13:11:07.350] invokeRestart <- base::invokeRestart [13:11:07.350] length <- base::length [13:11:07.350] list <- base::list [13:11:07.350] seq.int <- base::seq.int [13:11:07.350] signalCondition <- base::signalCondition [13:11:07.350] sys.calls <- base::sys.calls [13:11:07.350] `[[` <- base::`[[` [13:11:07.350] `+` <- base::`+` [13:11:07.350] `<<-` <- base::`<<-` [13:11:07.350] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:07.350] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:07.350] 3L)] [13:11:07.350] } [13:11:07.350] function(cond) { [13:11:07.350] is_error <- inherits(cond, "error") [13:11:07.350] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:07.350] NULL) [13:11:07.350] if (is_error) { [13:11:07.350] sessionInformation <- function() { [13:11:07.350] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:07.350] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:07.350] search = base::search(), system = base::Sys.info()) [13:11:07.350] } [13:11:07.350] ...future.conditions[[length(...future.conditions) + [13:11:07.350] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:07.350] cond$call), session = sessionInformation(), [13:11:07.350] timestamp = base::Sys.time(), signaled = 0L) [13:11:07.350] signalCondition(cond) [13:11:07.350] } [13:11:07.350] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:07.350] signal <- FALSE && inherits(cond, character(0)) [13:11:07.350] ...future.conditions[[length(...future.conditions) + [13:11:07.350] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:07.350] if (FALSE && !signal) { [13:11:07.350] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.350] { [13:11:07.350] inherits <- base::inherits [13:11:07.350] invokeRestart <- base::invokeRestart [13:11:07.350] is.null <- base::is.null [13:11:07.350] muffled <- FALSE [13:11:07.350] if (inherits(cond, "message")) { [13:11:07.350] muffled <- grepl(pattern, "muffleMessage") [13:11:07.350] if (muffled) [13:11:07.350] invokeRestart("muffleMessage") [13:11:07.350] } [13:11:07.350] else if (inherits(cond, "warning")) { [13:11:07.350] muffled <- grepl(pattern, "muffleWarning") [13:11:07.350] if (muffled) [13:11:07.350] invokeRestart("muffleWarning") [13:11:07.350] } [13:11:07.350] else if (inherits(cond, "condition")) { [13:11:07.350] if (!is.null(pattern)) { [13:11:07.350] computeRestarts <- base::computeRestarts [13:11:07.350] grepl <- base::grepl [13:11:07.350] restarts <- computeRestarts(cond) [13:11:07.350] for (restart in restarts) { [13:11:07.350] name <- restart$name [13:11:07.350] if (is.null(name)) [13:11:07.350] next [13:11:07.350] if (!grepl(pattern, name)) [13:11:07.350] next [13:11:07.350] invokeRestart(restart) [13:11:07.350] muffled <- TRUE [13:11:07.350] break [13:11:07.350] } [13:11:07.350] } [13:11:07.350] } [13:11:07.350] invisible(muffled) [13:11:07.350] } [13:11:07.350] muffleCondition(cond, pattern = "^muffle") [13:11:07.350] } [13:11:07.350] } [13:11:07.350] else { [13:11:07.350] if (TRUE) { [13:11:07.350] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.350] { [13:11:07.350] inherits <- base::inherits [13:11:07.350] invokeRestart <- base::invokeRestart [13:11:07.350] is.null <- base::is.null [13:11:07.350] muffled <- FALSE [13:11:07.350] if (inherits(cond, "message")) { [13:11:07.350] muffled <- grepl(pattern, "muffleMessage") [13:11:07.350] if (muffled) [13:11:07.350] invokeRestart("muffleMessage") [13:11:07.350] } [13:11:07.350] else if (inherits(cond, "warning")) { [13:11:07.350] muffled <- grepl(pattern, "muffleWarning") [13:11:07.350] if (muffled) [13:11:07.350] invokeRestart("muffleWarning") [13:11:07.350] } [13:11:07.350] else if (inherits(cond, "condition")) { [13:11:07.350] if (!is.null(pattern)) { [13:11:07.350] computeRestarts <- base::computeRestarts [13:11:07.350] grepl <- base::grepl [13:11:07.350] restarts <- computeRestarts(cond) [13:11:07.350] for (restart in restarts) { [13:11:07.350] name <- restart$name [13:11:07.350] if (is.null(name)) [13:11:07.350] next [13:11:07.350] if (!grepl(pattern, name)) [13:11:07.350] next [13:11:07.350] invokeRestart(restart) [13:11:07.350] muffled <- TRUE [13:11:07.350] break [13:11:07.350] } [13:11:07.350] } [13:11:07.350] } [13:11:07.350] invisible(muffled) [13:11:07.350] } [13:11:07.350] muffleCondition(cond, pattern = "^muffle") [13:11:07.350] } [13:11:07.350] } [13:11:07.350] } [13:11:07.350] })) [13:11:07.350] }, error = function(ex) { [13:11:07.350] base::structure(base::list(value = NULL, visible = NULL, [13:11:07.350] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.350] ...future.rng), started = ...future.startTime, [13:11:07.350] finished = Sys.time(), session_uuid = NA_character_, [13:11:07.350] version = "1.8"), class = "FutureResult") [13:11:07.350] }, finally = { [13:11:07.350] if (!identical(...future.workdir, getwd())) [13:11:07.350] setwd(...future.workdir) [13:11:07.350] { [13:11:07.350] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:07.350] ...future.oldOptions$nwarnings <- NULL [13:11:07.350] } [13:11:07.350] base::options(...future.oldOptions) [13:11:07.350] if (.Platform$OS.type == "windows") { [13:11:07.350] old_names <- names(...future.oldEnvVars) [13:11:07.350] envs <- base::Sys.getenv() [13:11:07.350] names <- names(envs) [13:11:07.350] common <- intersect(names, old_names) [13:11:07.350] added <- setdiff(names, old_names) [13:11:07.350] removed <- setdiff(old_names, names) [13:11:07.350] changed <- common[...future.oldEnvVars[common] != [13:11:07.350] envs[common]] [13:11:07.350] NAMES <- toupper(changed) [13:11:07.350] args <- list() [13:11:07.350] for (kk in seq_along(NAMES)) { [13:11:07.350] name <- changed[[kk]] [13:11:07.350] NAME <- NAMES[[kk]] [13:11:07.350] if (name != NAME && is.element(NAME, old_names)) [13:11:07.350] next [13:11:07.350] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.350] } [13:11:07.350] NAMES <- toupper(added) [13:11:07.350] for (kk in seq_along(NAMES)) { [13:11:07.350] name <- added[[kk]] [13:11:07.350] NAME <- NAMES[[kk]] [13:11:07.350] if (name != NAME && is.element(NAME, old_names)) [13:11:07.350] next [13:11:07.350] args[[name]] <- "" [13:11:07.350] } [13:11:07.350] NAMES <- toupper(removed) [13:11:07.350] for (kk in seq_along(NAMES)) { [13:11:07.350] name <- removed[[kk]] [13:11:07.350] NAME <- NAMES[[kk]] [13:11:07.350] if (name != NAME && is.element(NAME, old_names)) [13:11:07.350] next [13:11:07.350] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.350] } [13:11:07.350] if (length(args) > 0) [13:11:07.350] base::do.call(base::Sys.setenv, args = args) [13:11:07.350] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:07.350] } [13:11:07.350] else { [13:11:07.350] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:07.350] } [13:11:07.350] { [13:11:07.350] if (base::length(...future.futureOptionsAdded) > [13:11:07.350] 0L) { [13:11:07.350] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:07.350] base::names(opts) <- ...future.futureOptionsAdded [13:11:07.350] base::options(opts) [13:11:07.350] } [13:11:07.350] { [13:11:07.350] NULL [13:11:07.350] options(future.plan = NULL) [13:11:07.350] if (is.na(NA_character_)) [13:11:07.350] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.350] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:07.350] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:07.350] .init = FALSE) [13:11:07.350] } [13:11:07.350] } [13:11:07.350] } [13:11:07.350] }) [13:11:07.350] if (TRUE) { [13:11:07.350] base::sink(type = "output", split = FALSE) [13:11:07.350] if (TRUE) { [13:11:07.350] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:07.350] } [13:11:07.350] else { [13:11:07.350] ...future.result["stdout"] <- base::list(NULL) [13:11:07.350] } [13:11:07.350] base::close(...future.stdout) [13:11:07.350] ...future.stdout <- NULL [13:11:07.350] } [13:11:07.350] ...future.result$conditions <- ...future.conditions [13:11:07.350] ...future.result$finished <- base::Sys.time() [13:11:07.350] ...future.result [13:11:07.350] } [13:11:07.354] - Launch lazy future ... done [13:11:07.354] run() for 'MiraiFuture' ... done > rm(list = "x") > y <- value(f) > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## Future assignment > x <- list() > y %<-% { + x["a"] <- list(1) + x + } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:11:07.356] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:11:07.356] Searching for globals... [13:11:07.359] - globals found: [6] '{', 'x', '<-', '[', '[<-', 'list' [13:11:07.359] Searching for globals ... DONE [13:11:07.359] Resolving globals: TRUE [13:11:07.359] Resolving any globals that are futures ... [13:11:07.360] - globals: [6] '{', 'x', '<-', '[', '[<-', 'list' [13:11:07.360] Resolving any globals that are futures ... DONE [13:11:07.360] Resolving futures part of globals (recursively) ... [13:11:07.361] resolve() on list ... [13:11:07.361] recursive: 99 [13:11:07.361] length: 1 [13:11:07.361] elements: 'x' [13:11:07.361] length: 0 (resolved future 1) [13:11:07.361] resolve() on list ... DONE [13:11:07.362] - globals: [1] 'x' [13:11:07.362] Resolving futures part of globals (recursively) ... DONE [13:11:07.362] The total size of the 1 globals is 0 bytes (0 bytes) [13:11:07.362] The total size of the 1 globals exported for future expression ('{; x["a"] <- list(1); x; }') is 0 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (0 bytes of class 'list') [13:11:07.363] - globals: [1] 'x' [13:11:07.363] [13:11:07.363] getGlobalsAndPackages() ... DONE [13:11:07.363] run() for 'Future' ... [13:11:07.363] - state: 'created' [13:11:07.364] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:07.366] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:07.366] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:07.366] - Field: 'label' [13:11:07.366] - Field: 'local' [13:11:07.367] - Field: 'owner' [13:11:07.367] - Field: 'envir' [13:11:07.367] - Field: 'packages' [13:11:07.367] - Field: 'gc' [13:11:07.367] - Field: 'conditions' [13:11:07.368] - Field: 'expr' [13:11:07.368] - Field: 'uuid' [13:11:07.368] - Field: 'seed' [13:11:07.368] - Field: 'version' [13:11:07.368] - Field: 'result' [13:11:07.368] - Field: 'asynchronous' [13:11:07.369] - Field: 'calls' [13:11:07.370] - Field: 'globals' [13:11:07.370] - Field: 'stdout' [13:11:07.370] - Field: 'earlySignal' [13:11:07.370] - Field: 'lazy' [13:11:07.371] - Field: 'state' [13:11:07.371] - Field: '.cluster' [13:11:07.371] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:07.371] - Launch lazy future ... [13:11:07.371] Packages needed by the future expression (n = 0): [13:11:07.371] Packages needed by future strategies (n = 0): [13:11:07.372] { [13:11:07.372] { [13:11:07.372] { [13:11:07.372] ...future.startTime <- base::Sys.time() [13:11:07.372] { [13:11:07.372] { [13:11:07.372] { [13:11:07.372] base::local({ [13:11:07.372] has_future <- base::requireNamespace("future", [13:11:07.372] quietly = TRUE) [13:11:07.372] if (has_future) { [13:11:07.372] ns <- base::getNamespace("future") [13:11:07.372] version <- ns[[".package"]][["version"]] [13:11:07.372] if (is.null(version)) [13:11:07.372] version <- utils::packageVersion("future") [13:11:07.372] } [13:11:07.372] else { [13:11:07.372] version <- NULL [13:11:07.372] } [13:11:07.372] if (!has_future || version < "1.8.0") { [13:11:07.372] info <- base::c(r_version = base::gsub("R version ", [13:11:07.372] "", base::R.version$version.string), [13:11:07.372] platform = base::sprintf("%s (%s-bit)", [13:11:07.372] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:07.372] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:07.372] "release", "version")], collapse = " "), [13:11:07.372] hostname = base::Sys.info()[["nodename"]]) [13:11:07.372] info <- base::sprintf("%s: %s", base::names(info), [13:11:07.372] info) [13:11:07.372] info <- base::paste(info, collapse = "; ") [13:11:07.372] if (!has_future) { [13:11:07.372] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:07.372] info) [13:11:07.372] } [13:11:07.372] else { [13:11:07.372] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:07.372] info, version) [13:11:07.372] } [13:11:07.372] base::stop(msg) [13:11:07.372] } [13:11:07.372] }) [13:11:07.372] } [13:11:07.372] ...future.strategy.old <- future::plan("list") [13:11:07.372] options(future.plan = NULL) [13:11:07.372] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.372] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:07.372] } [13:11:07.372] ...future.workdir <- getwd() [13:11:07.372] } [13:11:07.372] ...future.oldOptions <- base::as.list(base::.Options) [13:11:07.372] ...future.oldEnvVars <- base::Sys.getenv() [13:11:07.372] } [13:11:07.372] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:11:07.372] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:07.372] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:11:07.372] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:11:07.372] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:07.372] future.stdout.windows.reencode = NULL, width = 80L) [13:11:07.372] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:07.372] base::names(...future.oldOptions)) [13:11:07.372] } [13:11:07.372] if (FALSE) { [13:11:07.372] } [13:11:07.372] else { [13:11:07.372] if (TRUE) { [13:11:07.372] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:07.372] open = "w") [13:11:07.372] } [13:11:07.372] else { [13:11:07.372] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:07.372] windows = "NUL", "/dev/null"), open = "w") [13:11:07.372] } [13:11:07.372] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:07.372] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:07.372] base::sink(type = "output", split = FALSE) [13:11:07.372] base::close(...future.stdout) [13:11:07.372] }, add = TRUE) [13:11:07.372] } [13:11:07.372] ...future.frame <- base::sys.nframe() [13:11:07.372] ...future.conditions <- base::list() [13:11:07.372] ...future.rng <- base::globalenv()$.Random.seed [13:11:07.372] if (FALSE) { [13:11:07.372] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:07.372] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:07.372] } [13:11:07.372] ...future.result <- base::tryCatch({ [13:11:07.372] base::withCallingHandlers({ [13:11:07.372] ...future.value <- base::withVisible(base::local({ [13:11:07.372] x["a"] <- list(1) [13:11:07.372] x [13:11:07.372] })) [13:11:07.372] future::FutureResult(value = ...future.value$value, [13:11:07.372] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.372] ...future.rng), globalenv = if (FALSE) [13:11:07.372] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:07.372] ...future.globalenv.names)) [13:11:07.372] else NULL, started = ...future.startTime, version = "1.8") [13:11:07.372] }, condition = base::local({ [13:11:07.372] c <- base::c [13:11:07.372] inherits <- base::inherits [13:11:07.372] invokeRestart <- base::invokeRestart [13:11:07.372] length <- base::length [13:11:07.372] list <- base::list [13:11:07.372] seq.int <- base::seq.int [13:11:07.372] signalCondition <- base::signalCondition [13:11:07.372] sys.calls <- base::sys.calls [13:11:07.372] `[[` <- base::`[[` [13:11:07.372] `+` <- base::`+` [13:11:07.372] `<<-` <- base::`<<-` [13:11:07.372] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:07.372] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:07.372] 3L)] [13:11:07.372] } [13:11:07.372] function(cond) { [13:11:07.372] is_error <- inherits(cond, "error") [13:11:07.372] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:07.372] NULL) [13:11:07.372] if (is_error) { [13:11:07.372] sessionInformation <- function() { [13:11:07.372] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:07.372] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:07.372] search = base::search(), system = base::Sys.info()) [13:11:07.372] } [13:11:07.372] ...future.conditions[[length(...future.conditions) + [13:11:07.372] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:07.372] cond$call), session = sessionInformation(), [13:11:07.372] timestamp = base::Sys.time(), signaled = 0L) [13:11:07.372] signalCondition(cond) [13:11:07.372] } [13:11:07.372] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:07.372] signal <- FALSE && inherits(cond, character(0)) [13:11:07.372] ...future.conditions[[length(...future.conditions) + [13:11:07.372] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:07.372] if (FALSE && !signal) { [13:11:07.372] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.372] { [13:11:07.372] inherits <- base::inherits [13:11:07.372] invokeRestart <- base::invokeRestart [13:11:07.372] is.null <- base::is.null [13:11:07.372] muffled <- FALSE [13:11:07.372] if (inherits(cond, "message")) { [13:11:07.372] muffled <- grepl(pattern, "muffleMessage") [13:11:07.372] if (muffled) [13:11:07.372] invokeRestart("muffleMessage") [13:11:07.372] } [13:11:07.372] else if (inherits(cond, "warning")) { [13:11:07.372] muffled <- grepl(pattern, "muffleWarning") [13:11:07.372] if (muffled) [13:11:07.372] invokeRestart("muffleWarning") [13:11:07.372] } [13:11:07.372] else if (inherits(cond, "condition")) { [13:11:07.372] if (!is.null(pattern)) { [13:11:07.372] computeRestarts <- base::computeRestarts [13:11:07.372] grepl <- base::grepl [13:11:07.372] restarts <- computeRestarts(cond) [13:11:07.372] for (restart in restarts) { [13:11:07.372] name <- restart$name [13:11:07.372] if (is.null(name)) [13:11:07.372] next [13:11:07.372] if (!grepl(pattern, name)) [13:11:07.372] next [13:11:07.372] invokeRestart(restart) [13:11:07.372] muffled <- TRUE [13:11:07.372] break [13:11:07.372] } [13:11:07.372] } [13:11:07.372] } [13:11:07.372] invisible(muffled) [13:11:07.372] } [13:11:07.372] muffleCondition(cond, pattern = "^muffle") [13:11:07.372] } [13:11:07.372] } [13:11:07.372] else { [13:11:07.372] if (TRUE) { [13:11:07.372] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.372] { [13:11:07.372] inherits <- base::inherits [13:11:07.372] invokeRestart <- base::invokeRestart [13:11:07.372] is.null <- base::is.null [13:11:07.372] muffled <- FALSE [13:11:07.372] if (inherits(cond, "message")) { [13:11:07.372] muffled <- grepl(pattern, "muffleMessage") [13:11:07.372] if (muffled) [13:11:07.372] invokeRestart("muffleMessage") [13:11:07.372] } [13:11:07.372] else if (inherits(cond, "warning")) { [13:11:07.372] muffled <- grepl(pattern, "muffleWarning") [13:11:07.372] if (muffled) [13:11:07.372] invokeRestart("muffleWarning") [13:11:07.372] } [13:11:07.372] else if (inherits(cond, "condition")) { [13:11:07.372] if (!is.null(pattern)) { [13:11:07.372] computeRestarts <- base::computeRestarts [13:11:07.372] grepl <- base::grepl [13:11:07.372] restarts <- computeRestarts(cond) [13:11:07.372] for (restart in restarts) { [13:11:07.372] name <- restart$name [13:11:07.372] if (is.null(name)) [13:11:07.372] next [13:11:07.372] if (!grepl(pattern, name)) [13:11:07.372] next [13:11:07.372] invokeRestart(restart) [13:11:07.372] muffled <- TRUE [13:11:07.372] break [13:11:07.372] } [13:11:07.372] } [13:11:07.372] } [13:11:07.372] invisible(muffled) [13:11:07.372] } [13:11:07.372] muffleCondition(cond, pattern = "^muffle") [13:11:07.372] } [13:11:07.372] } [13:11:07.372] } [13:11:07.372] })) [13:11:07.372] }, error = function(ex) { [13:11:07.372] base::structure(base::list(value = NULL, visible = NULL, [13:11:07.372] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.372] ...future.rng), started = ...future.startTime, [13:11:07.372] finished = Sys.time(), session_uuid = NA_character_, [13:11:07.372] version = "1.8"), class = "FutureResult") [13:11:07.372] }, finally = { [13:11:07.372] if (!identical(...future.workdir, getwd())) [13:11:07.372] setwd(...future.workdir) [13:11:07.372] { [13:11:07.372] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:07.372] ...future.oldOptions$nwarnings <- NULL [13:11:07.372] } [13:11:07.372] base::options(...future.oldOptions) [13:11:07.372] if (.Platform$OS.type == "windows") { [13:11:07.372] old_names <- names(...future.oldEnvVars) [13:11:07.372] envs <- base::Sys.getenv() [13:11:07.372] names <- names(envs) [13:11:07.372] common <- intersect(names, old_names) [13:11:07.372] added <- setdiff(names, old_names) [13:11:07.372] removed <- setdiff(old_names, names) [13:11:07.372] changed <- common[...future.oldEnvVars[common] != [13:11:07.372] envs[common]] [13:11:07.372] NAMES <- toupper(changed) [13:11:07.372] args <- list() [13:11:07.372] for (kk in seq_along(NAMES)) { [13:11:07.372] name <- changed[[kk]] [13:11:07.372] NAME <- NAMES[[kk]] [13:11:07.372] if (name != NAME && is.element(NAME, old_names)) [13:11:07.372] next [13:11:07.372] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.372] } [13:11:07.372] NAMES <- toupper(added) [13:11:07.372] for (kk in seq_along(NAMES)) { [13:11:07.372] name <- added[[kk]] [13:11:07.372] NAME <- NAMES[[kk]] [13:11:07.372] if (name != NAME && is.element(NAME, old_names)) [13:11:07.372] next [13:11:07.372] args[[name]] <- "" [13:11:07.372] } [13:11:07.372] NAMES <- toupper(removed) [13:11:07.372] for (kk in seq_along(NAMES)) { [13:11:07.372] name <- removed[[kk]] [13:11:07.372] NAME <- NAMES[[kk]] [13:11:07.372] if (name != NAME && is.element(NAME, old_names)) [13:11:07.372] next [13:11:07.372] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.372] } [13:11:07.372] if (length(args) > 0) [13:11:07.372] base::do.call(base::Sys.setenv, args = args) [13:11:07.372] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:07.372] } [13:11:07.372] else { [13:11:07.372] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:07.372] } [13:11:07.372] { [13:11:07.372] if (base::length(...future.futureOptionsAdded) > [13:11:07.372] 0L) { [13:11:07.372] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:07.372] base::names(opts) <- ...future.futureOptionsAdded [13:11:07.372] base::options(opts) [13:11:07.372] } [13:11:07.372] { [13:11:07.372] NULL [13:11:07.372] options(future.plan = NULL) [13:11:07.372] if (is.na(NA_character_)) [13:11:07.372] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.372] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:07.372] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:07.372] .init = FALSE) [13:11:07.372] } [13:11:07.372] } [13:11:07.372] } [13:11:07.372] }) [13:11:07.372] if (TRUE) { [13:11:07.372] base::sink(type = "output", split = FALSE) [13:11:07.372] if (TRUE) { [13:11:07.372] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:07.372] } [13:11:07.372] else { [13:11:07.372] ...future.result["stdout"] <- base::list(NULL) [13:11:07.372] } [13:11:07.372] base::close(...future.stdout) [13:11:07.372] ...future.stdout <- NULL [13:11:07.372] } [13:11:07.372] ...future.result$conditions <- ...future.conditions [13:11:07.372] ...future.result$finished <- base::Sys.time() [13:11:07.372] ...future.result [13:11:07.372] } [13:11:07.376] - Launch lazy future ... done [13:11:07.376] run() for 'MiraiFuture' ... done > rm(list = "x") > print(y) $a [1] 1 > stopifnot(identical(y, y0)) > > ## Future assignment > x <- list() > name <- "a" > y %<-% { + x[name] <- list(1) + x + } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [13:11:07.378] getGlobalsAndPackages() ... Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.onMissing' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'error' [13:11:07.379] Searching for globals... [13:11:07.381] - globals found: [7] '{', 'x', '<-', '[', 'name', '[<-', 'list' [13:11:07.381] Searching for globals ... DONE [13:11:07.382] Resolving globals: TRUE [13:11:07.382] Resolving any globals that are futures ... [13:11:07.382] - globals: [7] '{', 'x', '<-', '[', 'name', '[<-', 'list' [13:11:07.382] Resolving any globals that are futures ... DONE [13:11:07.383] Resolving futures part of globals (recursively) ... [13:11:07.383] resolve() on list ... [13:11:07.383] recursive: 99 [13:11:07.383] length: 2 [13:11:07.383] elements: 'x', 'name' [13:11:07.384] length: 1 (resolved future 1) [13:11:07.384] length: 0 (resolved future 2) [13:11:07.384] resolve() on list ... DONE [13:11:07.384] - globals: [2] 'x', 'name' [13:11:07.384] Resolving futures part of globals (recursively) ... DONE [13:11:07.385] The total size of the 2 globals is 112 bytes (112 bytes) [13:11:07.385] The total size of the 2 globals exported for future expression ('{; x[name] <- list(1); x; }') is 112 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are two globals: 'name' (112 bytes of class 'character') and 'x' (0 bytes of class 'list') [13:11:07.385] - globals: [2] 'x', 'name' [13:11:07.385] [13:11:07.386] getGlobalsAndPackages() ... DONE [13:11:07.386] run() for 'Future' ... [13:11:07.386] - state: 'created' [13:11:07.386] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:07.388] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:07.389] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:07.389] - Field: 'label' [13:11:07.389] - Field: 'local' [13:11:07.389] - Field: 'owner' [13:11:07.389] - Field: 'envir' [13:11:07.390] - Field: 'packages' [13:11:07.390] - Field: 'gc' [13:11:07.390] - Field: 'conditions' [13:11:07.390] - Field: 'expr' [13:11:07.390] - Field: 'uuid' [13:11:07.390] - Field: 'seed' [13:11:07.391] - Field: 'version' [13:11:07.391] - Field: 'result' [13:11:07.391] - Field: 'asynchronous' [13:11:07.391] - Field: 'calls' [13:11:07.391] - Field: 'globals' [13:11:07.391] - Field: 'stdout' [13:11:07.392] - Field: 'earlySignal' [13:11:07.392] - Field: 'lazy' [13:11:07.392] - Field: 'state' [13:11:07.392] - Field: '.cluster' [13:11:07.392] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:07.392] - Launch lazy future ... [13:11:07.393] Packages needed by the future expression (n = 0): [13:11:07.393] Packages needed by future strategies (n = 0): [13:11:07.393] { [13:11:07.393] { [13:11:07.393] { [13:11:07.393] ...future.startTime <- base::Sys.time() [13:11:07.393] { [13:11:07.393] { [13:11:07.393] { [13:11:07.393] base::local({ [13:11:07.393] has_future <- base::requireNamespace("future", [13:11:07.393] quietly = TRUE) [13:11:07.393] if (has_future) { [13:11:07.393] ns <- base::getNamespace("future") [13:11:07.393] version <- ns[[".package"]][["version"]] [13:11:07.393] if (is.null(version)) [13:11:07.393] version <- utils::packageVersion("future") [13:11:07.393] } [13:11:07.393] else { [13:11:07.393] version <- NULL [13:11:07.393] } [13:11:07.393] if (!has_future || version < "1.8.0") { [13:11:07.393] info <- base::c(r_version = base::gsub("R version ", [13:11:07.393] "", base::R.version$version.string), [13:11:07.393] platform = base::sprintf("%s (%s-bit)", [13:11:07.393] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:07.393] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:07.393] "release", "version")], collapse = " "), [13:11:07.393] hostname = base::Sys.info()[["nodename"]]) [13:11:07.393] info <- base::sprintf("%s: %s", base::names(info), [13:11:07.393] info) [13:11:07.393] info <- base::paste(info, collapse = "; ") [13:11:07.393] if (!has_future) { [13:11:07.393] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:07.393] info) [13:11:07.393] } [13:11:07.393] else { [13:11:07.393] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:07.393] info, version) [13:11:07.393] } [13:11:07.393] base::stop(msg) [13:11:07.393] } [13:11:07.393] }) [13:11:07.393] } [13:11:07.393] ...future.strategy.old <- future::plan("list") [13:11:07.393] options(future.plan = NULL) [13:11:07.393] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.393] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:07.393] } [13:11:07.393] ...future.workdir <- getwd() [13:11:07.393] } [13:11:07.393] ...future.oldOptions <- base::as.list(base::.Options) [13:11:07.393] ...future.oldEnvVars <- base::Sys.getenv() [13:11:07.393] } [13:11:07.393] base::options(future.startup.script = FALSE, future.globals.onMissing = "error", [13:11:07.393] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:07.393] future.globals.onMissing = "error", future.globals.onReference = NULL, [13:11:07.393] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [13:11:07.393] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:07.393] future.stdout.windows.reencode = NULL, width = 80L) [13:11:07.393] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:07.393] base::names(...future.oldOptions)) [13:11:07.393] } [13:11:07.393] if (FALSE) { [13:11:07.393] } [13:11:07.393] else { [13:11:07.393] if (TRUE) { [13:11:07.393] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:07.393] open = "w") [13:11:07.393] } [13:11:07.393] else { [13:11:07.393] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:07.393] windows = "NUL", "/dev/null"), open = "w") [13:11:07.393] } [13:11:07.393] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:07.393] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:07.393] base::sink(type = "output", split = FALSE) [13:11:07.393] base::close(...future.stdout) [13:11:07.393] }, add = TRUE) [13:11:07.393] } [13:11:07.393] ...future.frame <- base::sys.nframe() [13:11:07.393] ...future.conditions <- base::list() [13:11:07.393] ...future.rng <- base::globalenv()$.Random.seed [13:11:07.393] if (FALSE) { [13:11:07.393] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:07.393] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:07.393] } [13:11:07.393] ...future.result <- base::tryCatch({ [13:11:07.393] base::withCallingHandlers({ [13:11:07.393] ...future.value <- base::withVisible(base::local({ [13:11:07.393] x[name] <- list(1) [13:11:07.393] x [13:11:07.393] })) [13:11:07.393] future::FutureResult(value = ...future.value$value, [13:11:07.393] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.393] ...future.rng), globalenv = if (FALSE) [13:11:07.393] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:07.393] ...future.globalenv.names)) [13:11:07.393] else NULL, started = ...future.startTime, version = "1.8") [13:11:07.393] }, condition = base::local({ [13:11:07.393] c <- base::c [13:11:07.393] inherits <- base::inherits [13:11:07.393] invokeRestart <- base::invokeRestart [13:11:07.393] length <- base::length [13:11:07.393] list <- base::list [13:11:07.393] seq.int <- base::seq.int [13:11:07.393] signalCondition <- base::signalCondition [13:11:07.393] sys.calls <- base::sys.calls [13:11:07.393] `[[` <- base::`[[` [13:11:07.393] `+` <- base::`+` [13:11:07.393] `<<-` <- base::`<<-` [13:11:07.393] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:07.393] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:07.393] 3L)] [13:11:07.393] } [13:11:07.393] function(cond) { [13:11:07.393] is_error <- inherits(cond, "error") [13:11:07.393] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:07.393] NULL) [13:11:07.393] if (is_error) { [13:11:07.393] sessionInformation <- function() { [13:11:07.393] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:07.393] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:07.393] search = base::search(), system = base::Sys.info()) [13:11:07.393] } [13:11:07.393] ...future.conditions[[length(...future.conditions) + [13:11:07.393] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:07.393] cond$call), session = sessionInformation(), [13:11:07.393] timestamp = base::Sys.time(), signaled = 0L) [13:11:07.393] signalCondition(cond) [13:11:07.393] } [13:11:07.393] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:07.393] signal <- FALSE && inherits(cond, character(0)) [13:11:07.393] ...future.conditions[[length(...future.conditions) + [13:11:07.393] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:07.393] if (FALSE && !signal) { [13:11:07.393] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.393] { [13:11:07.393] inherits <- base::inherits [13:11:07.393] invokeRestart <- base::invokeRestart [13:11:07.393] is.null <- base::is.null [13:11:07.393] muffled <- FALSE [13:11:07.393] if (inherits(cond, "message")) { [13:11:07.393] muffled <- grepl(pattern, "muffleMessage") [13:11:07.393] if (muffled) [13:11:07.393] invokeRestart("muffleMessage") [13:11:07.393] } [13:11:07.393] else if (inherits(cond, "warning")) { [13:11:07.393] muffled <- grepl(pattern, "muffleWarning") [13:11:07.393] if (muffled) [13:11:07.393] invokeRestart("muffleWarning") [13:11:07.393] } [13:11:07.393] else if (inherits(cond, "condition")) { [13:11:07.393] if (!is.null(pattern)) { [13:11:07.393] computeRestarts <- base::computeRestarts [13:11:07.393] grepl <- base::grepl [13:11:07.393] restarts <- computeRestarts(cond) [13:11:07.393] for (restart in restarts) { [13:11:07.393] name <- restart$name [13:11:07.393] if (is.null(name)) [13:11:07.393] next [13:11:07.393] if (!grepl(pattern, name)) [13:11:07.393] next [13:11:07.393] invokeRestart(restart) [13:11:07.393] muffled <- TRUE [13:11:07.393] break [13:11:07.393] } [13:11:07.393] } [13:11:07.393] } [13:11:07.393] invisible(muffled) [13:11:07.393] } [13:11:07.393] muffleCondition(cond, pattern = "^muffle") [13:11:07.393] } [13:11:07.393] } [13:11:07.393] else { [13:11:07.393] if (TRUE) { [13:11:07.393] muffleCondition <- function (cond, pattern = "^muffle") [13:11:07.393] { [13:11:07.393] inherits <- base::inherits [13:11:07.393] invokeRestart <- base::invokeRestart [13:11:07.393] is.null <- base::is.null [13:11:07.393] muffled <- FALSE [13:11:07.393] if (inherits(cond, "message")) { [13:11:07.393] muffled <- grepl(pattern, "muffleMessage") [13:11:07.393] if (muffled) [13:11:07.393] invokeRestart("muffleMessage") [13:11:07.393] } [13:11:07.393] else if (inherits(cond, "warning")) { [13:11:07.393] muffled <- grepl(pattern, "muffleWarning") [13:11:07.393] if (muffled) [13:11:07.393] invokeRestart("muffleWarning") [13:11:07.393] } [13:11:07.393] else if (inherits(cond, "condition")) { [13:11:07.393] if (!is.null(pattern)) { [13:11:07.393] computeRestarts <- base::computeRestarts [13:11:07.393] grepl <- base::grepl [13:11:07.393] restarts <- computeRestarts(cond) [13:11:07.393] for (restart in restarts) { [13:11:07.393] name <- restart$name [13:11:07.393] if (is.null(name)) [13:11:07.393] next [13:11:07.393] if (!grepl(pattern, name)) [13:11:07.393] next [13:11:07.393] invokeRestart(restart) [13:11:07.393] muffled <- TRUE [13:11:07.393] break [13:11:07.393] } [13:11:07.393] } [13:11:07.393] } [13:11:07.393] invisible(muffled) [13:11:07.393] } [13:11:07.393] muffleCondition(cond, pattern = "^muffle") [13:11:07.393] } [13:11:07.393] } [13:11:07.393] } [13:11:07.393] })) [13:11:07.393] }, error = function(ex) { [13:11:07.393] base::structure(base::list(value = NULL, visible = NULL, [13:11:07.393] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:07.393] ...future.rng), started = ...future.startTime, [13:11:07.393] finished = Sys.time(), session_uuid = NA_character_, [13:11:07.393] version = "1.8"), class = "FutureResult") [13:11:07.393] }, finally = { [13:11:07.393] if (!identical(...future.workdir, getwd())) [13:11:07.393] setwd(...future.workdir) [13:11:07.393] { [13:11:07.393] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:07.393] ...future.oldOptions$nwarnings <- NULL [13:11:07.393] } [13:11:07.393] base::options(...future.oldOptions) [13:11:07.393] if (.Platform$OS.type == "windows") { [13:11:07.393] old_names <- names(...future.oldEnvVars) [13:11:07.393] envs <- base::Sys.getenv() [13:11:07.393] names <- names(envs) [13:11:07.393] common <- intersect(names, old_names) [13:11:07.393] added <- setdiff(names, old_names) [13:11:07.393] removed <- setdiff(old_names, names) [13:11:07.393] changed <- common[...future.oldEnvVars[common] != [13:11:07.393] envs[common]] [13:11:07.393] NAMES <- toupper(changed) [13:11:07.393] args <- list() [13:11:07.393] for (kk in seq_along(NAMES)) { [13:11:07.393] name <- changed[[kk]] [13:11:07.393] NAME <- NAMES[[kk]] [13:11:07.393] if (name != NAME && is.element(NAME, old_names)) [13:11:07.393] next [13:11:07.393] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.393] } [13:11:07.393] NAMES <- toupper(added) [13:11:07.393] for (kk in seq_along(NAMES)) { [13:11:07.393] name <- added[[kk]] [13:11:07.393] NAME <- NAMES[[kk]] [13:11:07.393] if (name != NAME && is.element(NAME, old_names)) [13:11:07.393] next [13:11:07.393] args[[name]] <- "" [13:11:07.393] } [13:11:07.393] NAMES <- toupper(removed) [13:11:07.393] for (kk in seq_along(NAMES)) { [13:11:07.393] name <- removed[[kk]] [13:11:07.393] NAME <- NAMES[[kk]] [13:11:07.393] if (name != NAME && is.element(NAME, old_names)) [13:11:07.393] next [13:11:07.393] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:07.393] } [13:11:07.393] if (length(args) > 0) [13:11:07.393] base::do.call(base::Sys.setenv, args = args) [13:11:07.393] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:07.393] } [13:11:07.393] else { [13:11:07.393] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:07.393] } [13:11:07.393] { [13:11:07.393] if (base::length(...future.futureOptionsAdded) > [13:11:07.393] 0L) { [13:11:07.393] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:07.393] base::names(opts) <- ...future.futureOptionsAdded [13:11:07.393] base::options(opts) [13:11:07.393] } [13:11:07.393] { [13:11:07.393] NULL [13:11:07.393] options(future.plan = NULL) [13:11:07.393] if (is.na(NA_character_)) [13:11:07.393] Sys.unsetenv("R_FUTURE_PLAN") [13:11:07.393] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:07.393] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:07.393] .init = FALSE) [13:11:07.393] } [13:11:07.393] } [13:11:07.393] } [13:11:07.393] }) [13:11:07.393] if (TRUE) { [13:11:07.393] base::sink(type = "output", split = FALSE) [13:11:07.393] if (TRUE) { [13:11:07.393] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:07.393] } [13:11:07.393] else { [13:11:07.393] ...future.result["stdout"] <- base::list(NULL) [13:11:07.393] } [13:11:07.393] base::close(...future.stdout) [13:11:07.393] ...future.stdout <- NULL [13:11:07.393] } [13:11:07.393] ...future.result$conditions <- ...future.conditions [13:11:07.393] ...future.result$finished <- base::Sys.time() [13:11:07.393] ...future.result [13:11:07.393] } [13:11:07.397] - Launch lazy future ... done [13:11:07.397] 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.46 0.10 1.01