Skip to content

Commit

Permalink
Allow for comma-separated values in future.deprecated.ignore/R_FUTURE…
Browse files Browse the repository at this point in the history
…_DEPRECATED_IGNORE [#420] [ci skip]
  • Loading branch information
HenrikBengtsson committed Oct 30, 2020
1 parent 581ba28 commit 6c2fca5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/zzz.plan.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ plan <- local({
for (kk in seq_along(stack)) {
evaluator <- stack[[kk]]
if (inherits(evaluator, "multiprocess") &&
class(evaluator)[1] == "multiprocess") {
if (!"multiprocess" %in% getOption("future.deprecated.ignore", Sys.getenv("R_FUTURE_DEPRECATED_IGNORE", ""))) {
class(evaluator)[1] == "multiprocess") { ## <== sic!
ignore <- Sys.getenv("R_FUTURE_DEPRECATED_IGNORE", "")
ignore <- getOption("future.deprecated.ignore", ignore)
ignore <- unlist(strsplit(ignore, split="[, ]", fixed = FALSE))
if (!is.element("multiprocess", ignore)) {
## Warn only once
.warn <<- FALSE
.Deprecated(msg = sprintf("Strategy 'multiprocess' is deprecated in future (>= 1.20.0). Instead, explicitly specify either 'multisession' or 'multicore'. In the current R session, 'multiprocess' equals '%s'.", if (supportsMulticore()) "multicore" else "multisession"), package = .packageName)
Expand Down

0 comments on commit 6c2fca5

Please sign in to comment.