Skip to content

Commit df3dfa3

Browse files
CLEANUP: Remove workaround for civis (<= 3.1.3) regarding 'envir' argument [#815]
1 parent f60be5b commit df3dfa3

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

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.70.0-9000
2+
Version: 1.70.0-9001
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: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,8 @@ Future <- function(expr = NULL, envir = parent.frame(), substitute = TRUE, stdou
232232
for (key in args_names) core[[key]] <- args[[key]]
233233

234234
## Backward compatibility: drop field 'envir' in future (>= 1.69.0)
235-
## 1. civis::CivisFuture() relies on 'envir'
236-
## 2. there might be other unknown dependencies out there => option
237235
if (getOption("future.Future.envir.keep", FALSE)) {
238236
core[["envir"]] <- envir
239-
} else if (all(c("required_resources", "docker_image_name",
240-
"docker_image_tag") %in% args_names) && "civis" %in% loadedNamespaces()) {
241-
## Looks like Future() was called from CivisFuture
242-
core[["envir"]] <- envir
243237
}
244238

245239
structure(core, class = c("Future", class(core)))
@@ -604,7 +598,6 @@ run.Future <- function(future, ...) {
604598
args <- list(
605599
quote(future[["expr"]]),
606600
substitute = FALSE,
607-
envir = future[["envir"]], ## For backward compatibility with 'civis'
608601
lazy = TRUE,
609602
stdout = future[["stdout"]],
610603
conditions = future[["conditions"]],
@@ -616,6 +609,11 @@ run.Future <- function(future, ...) {
616609
calls = future[["calls"]]
617610
)
618611

612+
## For backward compatibility since future (>= 1.69.0)
613+
if ("envir" %in% names(future)) {
614+
args[["envir"]] <- future[["envir"]]
615+
}
616+
619617
## SPECIAL: 'cluster' takes argument 'persistent' for now /HB 2023-01-17
620618
has_persistent <- ("persistent" %in% names(future))
621619
if (has_persistent) args[["persistent"]] <- future[["persistent"]]

0 commit comments

Comments
 (0)