futureverse / futureverse/future
Some R packages change 'future.*' options permanently
- Dominant language
- R
- Stars
- 1k
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
# Issue
Several CRAN packages changes Futureverse R options, e.g. `future.globals.maxSize` and `future.rng.onMisuse`. This may happen when one of their functions are called, or when the package is attached. Not pointing fingers at any particular package, here are a few examples illustrating the problem:
```r
$ R --vanilla --quiet
> getOption("future.globals.maxSize")
NULL
> library(future)
> getOption("future.globals.maxSize")
NULL
> library(parseRPDR)
...
> getOption("future.globals.maxSize")
[1] 107374182400
```
The problem with doing this is that it overrides whatever settings the R user has decided to use. Also, changing options like `future.rng.onMisuse` to `"ignore"` removes the RNG protection in other places.
# Tasks
* [x] Improve documentation to clarify that this is a no-no.
* [x] Give examples how to _temporarily_ set in function.
* [ ] Investigate if this can be protected against automatically.
* [ ] Investigate if this can be detected in revdep checks.
* [ ] Manually scan CRAN for cases and report to package maintainers, e.g.
- [x] `future.globals.maxSize`: https://github.com/search?q=org%3Acran%20future.globals.maxSize+language%3Ar&type=code
- [x] `future.rng.onMisuse`: https://github.com/search?q=org%3Acran+future.rng.onMisuse+language%3Ar&type=code
- [x] I've contacted all "affected" CRAN package maintainers (by GitHub or email) [2024-02-29]
# CRAN packages
* [x] https://github.com/martonkolossvary/parseRPDR/issues/1
* [x] https://github.com/monty-se/PINstimation/issues/6
* [x] https://github.com/holgstr/fmeffects/issues/11
* [x] nebula 1.5.3 (2024-02-15) https://github.com/lhe17/nebula/issues/44
* [ ] steps 1.3.0 (2022-10-04) https://github.com/steps-dev/steps/issues/37
* [ ] https://github.com/paolo-vergo/conformal-multi/issues/2
* [ ] https://github.com/paolo-vergo/conformal-multi/issues/3
* [ ] https://github.com/cran/mplusParallel.automation/blob/908686530cc7ae3601cd213e6202a6a6d7bfbf22/R/mplusParallel_automation.R#L529
Contributor guide
Research direction
Start by reviewing the issue's examples involving future.globals.maxSize and future.rng.onMisuse, along with the completed documentation tasks. Then investigate whether automatic protection or reverse-dependency detection is feasible; the issue is done only when one of those approaches has a defined implementation path and verification strategy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100