twolodzko / kernelboot

Smoothed bootstrap and functions for sampling from kernel densities
3 stars 1 forks source link

NOTICE: plan(multiprocess) of future is deprecated #9

Closed HenrikBengtsson closed 2 years ago

HenrikBengtsson commented 3 years ago

Hi.

This is a friendly reminder that plan(multiprocess) of the future package is deprecated since future 1.20.0 (2020-11-03). It will eventually become defunct and removed. The background for this can be found in https://github.com/HenrikBengtsson/future/issues/420.

Your kernelboot package relies on multiprocess, cf. https://github.com/twolodzko/kernelboot/search?q=multiprocess.

Please migrate your code to the platform-independent plan(multisession) or the Linux/macOS-specific plan(multicore). If you want to emulate what multiprocess does, you can do something like:

  if (parallelly::supportsMulticore()) {
    oplan <- plan(multicore)
  } else {
    oplan <- plan(multisession)
  }
  on.exit(plan(oplan))

BTW, if you don't already do so, please make sure to undo any plan() you set in your code, as illustrated by the above example. This is needed to guarantee that calling your code won't override settings that the user has set previously. You can read about this in https://future.futureverse.org/reference/plan.html#for-package-developers.

Thank you,

Henrik (maintainer of the future package)

twolodzko commented 2 years ago

@HenrikBengtsson do I understand you correctly and this fixes the issue? https://github.com/twolodzko/kernelboot/commit/de4808bba7ac23c18113087ebaf69999c7baaf0d

HenrikBengtsson commented 2 years ago

Yes, that the way to replace the deprecated multiprocess setup.

HenrikBengtsson commented 2 years ago

FYI, there's still an Rd reference to multiprocess, cf. https://github.com/twolodzko/kernelboot/search?q=multiprocess

HenrikBengtsson commented 2 years ago

FYI, there's still an Rd reference to multiprocess, cf. https://github.com/twolodzko/kernelboot/search?q=multiprocess

A friendly reminder about this one; your package still depend on 'multiprocess' and 'R CMD check' will break when 'multiprocess' is removed.

twolodzko commented 2 years ago

@HenrikBengtsson thanks for notice but this is a false positive, I just forgot to cleanup to documentation. If there ever is a next release, the docs would be updated with the release, otherwise I don't see point to send new version to CRAN.

HenrikBengtsson commented 2 years ago

@HenrikBengtsson thanks for notice but this is a false positive,

I'm not 100% sure, but I think linking to non-existing documentation, like \link[future]{multiprocess}} eventually will, will trigger an R CMD check --as-cran NOTE. And when I submit future, that will trigger NOTE on CRAN incoming that I make one of the reverse dependencies worse, which in turn cause my submission to get stuck in the manual-inspection queue.

I just forgot to cleanup to documentation. If there ever is a next release, the docs would be updated with the release, otherwise I don't see point to send new version to CRAN.

Good you've fixed it. No rush to submit to CRAN. I can wait for your next release, because there are many other packages that needs to get updated too.