Skip to content

Commit 71201b5

Browse files
Merge branch 'release/1.58.0'
2 parents 1b9d1ec + 0f9d4dd commit 71201b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3858
-5305
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
- {os: ubuntu-latest, r: 'release' , language: ko, label: ko }
3939
- {os: ubuntu-latest, r: 'release' , language: zh_CN, label: zh_CN }
4040
- {os: ubuntu-latest, r: 'release' , language: zh_TW, label: zh_TW }
41-
- {os: ubuntu-latest, r: 'release' , globals_keepWhere: true, label: 'keepWhere' }
4241
- {os: ubuntu-latest, r: 'release' , globals_keepWhere: false, label: '!keepWhere' }
4342
- {os: ubuntu-latest, r: 'release' , plan: multicore, fork_multithreading_enable: false, label: 'multicore, no-multithreading-in-forks' }
4443
- {os: ubuntu-latest, r: 'release' , plan: multisession, fork_multithreading_enable: false, label: 'multisession, no-multithreading-in-forks' }

.github/workflows/revdepcheck-top.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,21 @@ jobs:
2121
- { r: "release", pkg: "future.mirai" }
2222
- { r: "release", pkg: "doFuture" }
2323
- { r: "release", pkg: "future.apply" }
24-
- { r: "release", pkg: "furrr" }
24+
- { r: "release", pkg: "furrr", not_cran: false }
2525
- { r: "release", pkg: "future.tests" }
26+
- { r: "release", pkg: "promises" }
27+
- { r: "release", pkg: "shiny", not_cran: false }
28+
- { r: "release", pkg: "plumber" }
2629
- { r: "release", pkg: "future.batchtools" , globals: develop, label: 'globals develop' }
2730
- { r: "release", pkg: "future.callr" , globals: develop, label: 'globals develop' }
2831
- { r: "release", pkg: "future.mirai" , globals: develop, label: 'globals develop' }
2932
- { r: "release", pkg: "doFuture" , globals: develop, label: 'globals develop' }
3033
- { r: "release", pkg: "future.apply" , globals: develop, label: 'globals develop' }
31-
- { r: "release", pkg: "furrr" , globals: develop, label: 'globals develop' }
34+
- { r: "release", pkg: "furrr", not_cran: false, globals: develop, label: 'globals develop' }
3235
- { r: "release", pkg: "future.tests" , globals: develop, label: 'globals develop' }
3336
- { r: "release", pkg: "doFuture" , plan: multisession, label: multisession }
3437
- { r: "release", pkg: "future.apply" , plan: multisession, label: multisession }
35-
- { r: "release", pkg: "furrr" , plan: multisession, label: multisession }
36-
- { r: "release", pkg: "future.apply" , globals_keepWhere: true, label: 'keepWhere' }
38+
- { r: "release", pkg: "furrr", not_cran: false, plan: multisession, label: multisession }
3739
- { r: "release", pkg: "future.apply" , globals_keepWhere: false, label: '!keepWhere' }
3840

3941
env:
@@ -47,8 +49,7 @@ jobs:
4749
R_FUTURE_PLAN: ${{ matrix.config.plan }}
4850
R_FUTURE_GLOBALS_KEEPWHERE: ${{ matrix.config.globals_keepWhere }}
4951
R_GLOBALS_BRANCH: ${{ matrix.config.globals }}
50-
## Specific to furrr (to disable expect_snapshot() tests)
51-
NOT_CRAN: false
52+
NOT_CRAN: true
5253

5354
steps:
5455
- uses: actions/checkout@v4
@@ -91,6 +92,10 @@ jobs:
9192
run: |
9293
url=$(Rscript -e "cat(remotes:::download_version_url('${{ matrix.config.pkg }}', version=NULL, repos='https://cloud.r-project.org', type='source'))")
9394
wget "$url"
95+
if [[ "${{ matrix.config.not_cran }}" == "false" ]]; then
96+
export NOT_CRAN=false
97+
fi
98+
echo "NOT_CRAN=${NOT_CRAN:-<not set>}"
9499
R CMD check --no-manual --as-cran "$(basename "$url")"
95100
96101
- name: Upload check results

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.49.0
2+
Version: 1.58.0
33
Title: Unified Parallel and Distributed Processing in R for Everyone
44
Depends:
55
R (>= 3.2.0)

NAMESPACE

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Generated by roxygen2: do not edit by hand
22

33
S3method("$<-",Future)
4+
S3method("[",FutureCluster)
45
S3method("[",FutureGlobals)
56
S3method("[",sessionDetails)
7+
S3method("[[",FutureCluster)
68
S3method(all.equal,FutureStrategyList)
79
S3method(all.equal,future)
810
S3method(as.FutureGlobals,FutureGlobals)
@@ -127,6 +129,9 @@ export(ClusterFutureBackend)
127129
export(ConnectionMisuseFutureCondition)
128130
export(ConnectionMisuseFutureError)
129131
export(ConnectionMisuseFutureWarning)
132+
export(DefaultDeviceMisuseFutureCondition)
133+
export(DefaultDeviceMisuseFutureError)
134+
export(DefaultDeviceMisuseFutureWarning)
130135
export(DeviceMisuseFutureCondition)
131136
export(DeviceMisuseFutureError)
132137
export(DeviceMisuseFutureWarning)
@@ -196,6 +201,13 @@ export(supportsMulticore)
196201
export(tweak)
197202
export(validateFutureGlobals)
198203
export(value)
204+
if (getRversion() >= "4.4") S3method(print,FutureCluster)
205+
if (getRversion() >= "4.4") S3method(recvData,FutureNode)
206+
if (getRversion() >= "4.4") S3method(sendData,FutureNode)
207+
if (getRversion() >= "4.4") export(FUTURE)
208+
if (getRversion() >= "4.4") export(makeClusterFuture)
209+
if (getRversion() >= "4.4") importFrom(parallel,recvData)
210+
if (getRversion() >= "4.4") importFrom(parallel,sendData)
199211
importFrom(digest,digest)
200212
importFrom(globals,Globals)
201213
importFrom(globals,as.Globals)

NEWS.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,79 @@
1+
# Version 1.58.0 [2025-06-05]
2+
3+
This is the third rollout out of several towards a near-future major
4+
release that I am really excited about. This has been made possible
5+
due to a multi-year effort of internal re-designs, work with package
6+
maintainers, release, and repeat. This release fixes a few
7+
regressions introduced in future 1.40.0 (2025-04-10), despite passing
8+
[all unit, regression, and system
9+
tests](https://www.futureverse.org/quality.html).
10+
11+
## New Features
12+
13+
* Now futures produce a warning when they detect that the _default_
14+
graphics device, as defined by R option `"device"`, is opened by,
15+
for instance, a `plot()` call without explicitly opening a graphics
16+
device. The reason for this check is that we rarely want to plot to
17+
the _default_ graphics device in parallel processing, which
18+
typically ends up plotting to a `Rplots.pdf` file that is local to
19+
the parallel worker. If that is truly wanted, please open a
20+
graphics devices explicitly (e.g. `pdf()` or `png()`) before
21+
plotting. Alternatively, explicitly set R option `device` inside
22+
the future expression.
23+
24+
## Beta Features
25+
26+
* Add `makeClusterFuture()` for creating a cluster of stateless
27+
parallel workers for processing via the future framework. This
28+
requires R (>= 4.4.0) [2024-04-24]. Please make sure to read
29+
`help("makeClusterFuture", package = "future")` to learn about
30+
potential pitfalls. The plan is to support more corner cases in
31+
future releases, and when not possible, add more mechanisms for
32+
detecting non-supported cases and given an informative error.
33+
34+
## Bug Fixes
35+
36+
* Setting `options(warn = 2)` on a parallel worker was ignored -
37+
warnings were not escalated to errors on the worker, and was
38+
instead relayed as-is in the parent R session, unless `options(warn
39+
= 2)` was also set in the parent. Now `options(warn = 2)` on a
40+
worker causes warnings to be escalated immediately to errors on the
41+
worker, which therefore also terminates the future.
42+
43+
* `future()` arguments `stdout` and `conditions` were not applied
44+
when packages that were specified via argument `packages` were
45+
loaded and attached. This prevented us from excluding, for
46+
instance, `packageStartupMessage`:s, causing them to be displayed
47+
in sequential and multicore processing.
48+
49+
* When the using `cluster` and `multisession` backends, one could, in
50+
some cases, end up with warnings on "package may not be available
51+
when loading" that are produced by `serialize()`. These type of
52+
warnings are now suppressed.
53+
54+
* Now the cluster future backend tries even harder to shut down
55+
parallel cluster workers when shutting down the backend. If it
56+
fails to communicate with one or more of the parallel workers, it
57+
will now close any socket connections that remain open towards such
58+
cluster nodes.
59+
60+
* The built-in checks for added, removed, or modified graphical
61+
devices introduced in **future** 1.40.0 (2025-04-10), could produce
62+
false positives, complaining about "A future expression must close
63+
any opened devices and must not close devices it did not
64+
open. Details: 1 devices differ: index=2, before='NA',
65+
after=''". The problem was that it did not prune the empty 'after'
66+
before the check.
67+
68+
* The `multicore` backend did not relay `immediateCondition`:s in a
69+
near-live fashion, but only when the results of the futures where
70+
collected.
71+
72+
* The `sequential`, `cluster`, `multisession`, and `multicore`
73+
backends relayed `immediateCondition`:s, but did not record them
74+
properly in the future object.
75+
76+
177
# Version 1.49.0 [2025-05-08]
278

379
This is the second rollout out of three-four major updates, which is

R/backend_api-01-FutureBackend-class.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#' Configure a backend that controls how and where futures are evaluated
22
#'
3+
#' @description
4+
#' _This functionality is only for developers who wish to implement their
5+
#' own future backend. End-users and package developers use futureverse,
6+
#' does not need to know about these functions._
7+
#'
8+
#' If you are looking for available future backends to choose from, please
9+
#' see the 'A Future for R: Available Future Backends' vignette and
10+
#' \url{https://www.futureverse.org/backends.html}.
11+
#'
312
#' @param \ldots (optional) Backend-specific named arguments.
413
#'
514
#' @param earlySignal Overrides the default behavior on whether futures
@@ -107,7 +116,7 @@ print.FutureBackend <- function(x, ...) {
107116
fields <- tweakable(attr(backend, "factory"))
108117
fields <- setdiff(fields, done)
109118
for (name in fields) {
110-
s <- c(s, sprintf("Argument %s: %s", sQuote(name), deparse(backend[[name]])))
119+
s <- c(s, sprintf("Argument %s: %s", sQuote(name), paste(deparse(backend[[name]]), collapse = "") ))
111120
}
112121

113122
## Active futures

0 commit comments

Comments
 (0)