Skip to content

Commit 61ec665

Browse files
CLEANUP: Now all static-code inspection for identifying globals is done in Future() - no need to do it in future()
1 parent 7814724 commit 61ec665

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: future
2-
Version: 1.69.0-9008
2+
Version: 1.69.0-9009
33
Title: Unified Parallel and Distributed Processing in R for Everyone
44
Depends:
55
R (>= 3.2.0)

R/backend_api-Future-class.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,12 @@ Future <- function(expr = NULL, envir = parent.frame(), substitute = TRUE, stdou
137137
expr <- gp[["expr"]]
138138

139139
## Record packages?
140-
if (length(packages) > 0 || (length(gp[["packages"]]) > 0 && lazy)) {
140+
if (length(packages) > 0 || (length(gp[["packages"]]) > 0)) {
141141
packages <- c(gp[["packages"]], packages)
142142
}
143143

144144
gp <- NULL
145+
attr(globals, "already-done") <- TRUE
145146
}
146147
}
147148

R/core_api-future.R

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -176,18 +176,6 @@ future <- function(expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE
176176
onReference <- getOption("future.globals.onReference")
177177
if (is.null(onReference)) onReference <- "ignore"
178178

179-
if (!is.null(globals)) {
180-
gp <- getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, globals = globals, onReference = onReference, maxSize = +Inf)
181-
expr <- gp[["expr"]]
182-
globals <- gp[["globals"]]
183-
## Record packages?
184-
if (length(packages) > 0 || length(gp[["packages"]]) > 0) {
185-
packages <- c(gp[["packages"]], packages)
186-
}
187-
gp <- NULL
188-
attr(globals, "already-done") <- TRUE
189-
}
190-
191179
future <- Future(expr, substitute = FALSE,
192180
envir = envir,
193181
lazy = TRUE,

0 commit comments

Comments
 (0)