Skip to content

Commit

Permalink
(devel/R-withr) Update 2.5.0 to 3.0.0
Browse files Browse the repository at this point in the history
# withr 3.0.0

## Performance of withr

* `defer()` is now a thin wrapper around `base::on.exit()`. This is
  possible thanks to two contributions that we made to R 3.5:

  - We added an argument for FIFO cleanup: `on.exit(after = FALSE)`.
  - Calling `sys.on.exit()` elsewhere than top-level didn't work. This
    is needed for manual invokation with `deferred_run()`.

  Following this change, `defer()` is now much faster (although still
  slower than `on.exit()` which is a primitive function and about as
  fast as it gets). This also increases the compatibility of `defer()`
  with `on.exit()` (all handlers are now run in the expected order
  even if they are registered with `on.exit()`) and standalone
  versions of `defer()`.


## Breaking change

* When `source()` is used with a local environment, as opposed to
  `globalenv()` (the default), you now need to set
  `options(withr.hook_source = TRUE)` to get proper withr support
  (running `defer()` or `local_` functions at top-level of a script).
  THis support is disabled by default in local environments to avoid a
  performance penalty in normal usage of withr features.


## Other features and bugfixes

* `deferred_run()` now reports the number of executed expressions with
  a message.

* `deferred_run()` can now be run at any point in a knitr file (#235).

,* `local_tempfile()` now writes `lines` in UTF-8 (#210) and always uses
  `\n` for newlines (#216).

* `local_pdf()` and friends now correctly restore to the previously
  active device (#138).

* `local_()` now works even if withr isn't attached (#207).

* `local_par()` and `with_par()` now work if you don't set any parameters
  (#238).

* `with_language()` now properly resets the translation cache (#213).

* Fixes for Debian packaging.


# withr 2.5.2

* Fixes for CRAN checks.


# withr 2.5.1

* Fixes for CRAN checks.
  • Loading branch information
mef committed Jan 23, 2024
1 parent 03d8cbd commit e4fbed8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions devel/R-withr/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.9 2024/01/23 13:33:39 mef Exp $
# $NetBSD: Makefile,v 1.10 2024/01/23 14:41:22 mef Exp $

R_PKGNAME= withr
R_PKGVER= 2.5.2
R_PKGVER= 3.0.0
CATEGORIES= devel

MAINTAINER= pkgsrc-users@NetBSD.org
Expand All @@ -15,6 +15,12 @@ TEST_DEPENDS+= R-knitr-[0-9]*:../../print/R-knitr
TEST_DEPENDS+= R-rmarkdown-[0-9]*:../../textproc/R-rmarkdown
TEST_DEPENDS+= R-testthat-[0-9]*:../../devel/R-testthat

TEST_DEPENDS+= tex-ec-[0-9]*:../../fonts/tex-ec
TEST_DEPENDS+= tex-inconsolata-[0-9]*:../../fonts/tex-inconsolata
TEST_DEPENDS+= tex-latex-bin-[0-9]*:../../print/tex-latex-bin
TEST_DEPENDS+= tex-xkeyval-[0-9]*:../../print/tex-xkeyval
TEST_DEPENDS+= tex-url-[0-9]*:../../print/tex-url

USE_LANGUAGES= # none

.include "../../math/R/Makefile.extension"
Expand Down
8 changes: 4 additions & 4 deletions devel/R-withr/distinfo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$NetBSD: distinfo,v 1.9 2022/04/30 14:47:28 mef Exp $
$NetBSD: distinfo,v 1.10 2024/01/23 14:41:22 mef Exp $

BLAKE2s (R/withr_2.5.0.tar.gz) = 5e9b11b49b3a3e4f78c80c84e007cbfd0353b3e8d4d77da60617adf351af77c9
SHA512 (R/withr_2.5.0.tar.gz) = 9fb29b1d2866803e1a5e2b2ca6790c1c7531e43d8805f722930512803e60481c7ed5b034ee85ec9c4f5bae40e39238e8fcb435f7b290f71dfda0fc9f219e65ec
Size (R/withr_2.5.0.tar.gz) = 102089 bytes
BLAKE2s (R/withr_3.0.0.tar.gz) = fde56182d8b27c406113812f17692b62c837e7ce9d34b2b69f118add42a62c3d
SHA512 (R/withr_3.0.0.tar.gz) = 9556d76543513cf37da79cbb0c333f86f09c54ea81b23599234a7e8af2f7216639ee2ac6cfa8f2088406798fbf7544f00e492d35694c47a686579d3b2f31c24b
Size (R/withr_3.0.0.tar.gz) = 107677 bytes

0 comments on commit e4fbed8

Please sign in to comment.