Skip to content

Commit 07decfc

Browse files
FIX: Undo do.call(..., quote = TRUE) because it introduced other problems. Now using expr = quote(expr) to save it from do.call()
1 parent 83d2751 commit 07decfc

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: future.batchtools
2-
Version: 0.10.0-9030
2+
Version: 0.10.0-9031
33
Depends:
44
R (>= 3.2.0),
55
parallelly,

R/BatchtoolsSSHFuture-class.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ BatchtoolsSSHFuture <- function(expr = NULL, substitute = TRUE, envir = parent.f
2020
if (length(keep) > 0) dotdotdot <- dotdotdot[-keep]
2121

2222
args <- list(
23-
expr = expr, substitute = FALSE, envir = envir,
23+
expr = quote(expr), ## Avoid 'expr' being resolved by do.call()
24+
substitute = FALSE, envir = envir,
2425
workers = workers,
2526
cluster.functions = cluster.functions
2627
)
2728
if (length(dotdotdot) > 0) args <- c(args, dotdotdot)
2829

29-
future <- do.call(BatchtoolsCustomFuture, args = args, quote = TRUE)
30+
future <- do.call(BatchtoolsCustomFuture, args = args)
3031

3132
future <- structure(future, class = c("BatchtoolsSSHFuture", class(future)))
3233

R/batchtools_template.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ batchtools_by_template <- function(expr, envir = parent.frame(),
212212
if (length(keep) > 0) dotdotdot <- dotdotdot[-keep]
213213

214214
args <- list(
215-
expr = expr, substitute = FALSE, envir = envir,
215+
expr = quote(expr), ## Avoid 'expr' being resolved by do.call()
216+
substitute = FALSE, envir = envir,
216217
globals = globals,
217218
label = label,
218219
cluster.functions = cluster.functions,
@@ -221,7 +222,7 @@ batchtools_by_template <- function(expr, envir = parent.frame(),
221222
workers = workers
222223
)
223224
if (length(dotdotdot) > 0) args <- c(args, dotdotdot)
224-
future <- do.call(constructor, args = args, quote = TRUE)
225+
future <- do.call(constructor, args = args)
225226

226227
if (!future$lazy) future <- run(future)
227228

0 commit comments

Comments
 (0)