From 8dbc510058fb993f208a49c96285814c4a5df3bc Mon Sep 17 00:00:00 2001 From: Henrik Bengtsson Date: Thu, 30 May 2024 08:33:34 -0700 Subject: [PATCH] Add option 'future.plan.cleanup.legacy' for a while [#719] --- DESCRIPTION | 2 +- R/options.R | 3 +++ R/zzz.plan.R | 4 +++- vignettes/future-8-how-future-is-validated.md.rsp | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f039e9ad..b68d5e75 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: future -Version: 1.33.2-9006 +Version: 1.33.2-9007 Title: Unified Parallel and Distributed Processing in R for Everyone Imports: digest, diff --git a/R/options.R b/R/options.R index 889ba50a..f778c360 100644 --- a/R/options.R +++ b/R/options.R @@ -356,4 +356,7 @@ update_package_options <- function(debug = FALSE) { ## SETTINGS USED FOR DEPRECATING FEATURES ## future 1.22.0: update_package_option("future.globals.keepWhere", mode = "logical", debug = debug) + + ## future 1.34.0: + update_package_option("future.plan.cleanup.legacy", mode = "logical", debug = debug) } diff --git a/R/zzz.plan.R b/R/zzz.plan.R index 6bf5fe43..5c82c9b1 100644 --- a/R/zzz.plan.R +++ b/R/zzz.plan.R @@ -188,7 +188,9 @@ plan <- local({ } } else { ## Backward compatibility for future (<= 1.33.2) - ## ClusterRegistry(action = "stop") + if (getOption("future.plan.cleanup.legacy", FALSE)) { + ClusterRegistry(action = "stop") + } } } ## plan_cleanup() diff --git a/vignettes/future-8-how-future-is-validated.md.rsp b/vignettes/future-8-how-future-is-validated.md.rsp index 8273e701..55e96224 100644 --- a/vignettes/future-8-how-future-is-validated.md.rsp +++ b/vignettes/future-8-how-future-is-validated.md.rsp @@ -91,4 +91,4 @@ of the _Future API_ and the future ecosystem at large. [revdepcheck]: https://github.com/r-lib/revdepcheck [GitHub Actions]: https://github.com/features/actions -[R-hub]: https://builder.r-hub.io/ +[R-hub]: https://r-hub.github.io/rhub/