Skip to content

Commit

Permalink
Add a secret, temporary option and env var for silencing deprecation …
Browse files Browse the repository at this point in the history
…warnings [#420]
  • Loading branch information
HenrikBengtsson committed Oct 30, 2020
1 parent b198273 commit 581ba28
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions R/zzz.plan.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,11 @@ plan <- local({
evaluator <- stack[[kk]]
if (inherits(evaluator, "multiprocess") &&
class(evaluator)[1] == "multiprocess") {
## 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)
if (!"multiprocess" %in% getOption("future.deprecated.ignore", Sys.getenv("R_FUTURE_DEPRECATED_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)
}

break
}
Expand Down

0 comments on commit 581ba28

Please sign in to comment.