Skip to content

Commit 2189b67

Browse files
Future expression are now evaluated in the global environment, regardless of backend
1 parent 3a8facf commit 2189b67

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
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.34.0-9112
2+
Version: 1.34.0-9113
33
Title: Unified Parallel and Distributed Processing in R for Everyone
44
Imports:
55
digest,

R/expressions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ evalFuture <- function(
507507
## a tryCatch() statement. /HB 2016-03-14
508508
...future.result <- tryCatch({
509509
withCallingHandlers({
510-
...future.value <- withVisible(eval(expr, envir = envir))
510+
...future.value <- withVisible(eval(expr, envir = globalenv()))
511511
FutureResult(
512512
value = ...future.value$value,
513513
visible = ...future.value$visible,

tests/globals,manual.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ for (strategy in supportedStrategies()) {
271271
sub <- function(x, ...) value(future(x[...], globals = "x"))
272272
y <- tryCatch(sub(x, 2:3), error = identity)
273273
str(y)
274-
stopifnot((strategy %in% c("multisession") && inherits(y, "error")) || identical(y, y_truth))
274+
str(strategy)
275+
stopifnot(inherits(y, "error"))
275276

276277

277278
message("- Packages - manual ...")

0 commit comments

Comments
 (0)