From 48303c8f3c15b922a1901a1f4998dc3833d8e03f Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Thu, 17 Sep 2026 14:55:20 -0500 Subject: [PATCH 1/3] Re-document --- DESCRIPTION | 2 +- NAMESPACE | 26 ++++++++++++++++---------- man/build_rmd.Rd | 2 +- man/build_vignettes.Rd | 2 +- man/check_mac_release.Rd | 4 ++-- man/check_win.Rd | 4 ++-- man/devtools-package.Rd | 1 + man/document.Rd | 11 +++++++++-- man/install.Rd | 6 +++--- man/lint.Rd | 4 ++-- man/load_all.Rd | 6 ++++++ man/reexports.Rd | 6 +++--- man/run_examples.Rd | 4 ++-- man/spell_check.Rd | 2 +- man/submit_cran.Rd | 2 +- man/uninstall.Rd | 4 ++-- 16 files changed, 53 insertions(+), 33 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 09d596d90..e4add6b3c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -63,4 +63,4 @@ Config/testthat/parallel: true Encoding: UTF-8 Language: en-US Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.3 +Config/roxygen2/version: 8.1.0 diff --git a/NAMESPACE b/NAMESPACE index a527d6e2c..03d3f68f8 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -87,15 +87,21 @@ import(rlang) importFrom(ellipsis,check_dots_used) importFrom(lifecycle,deprecated) importFrom(memoise,memoise) -importFrom(pkgbuild,clean_dll) -importFrom(pkgbuild,find_rtools) -importFrom(pkgbuild,has_devel) -importFrom(pkgbuild,with_debug) -importFrom(pkgload,check_dep_version) -importFrom(pkgload,is_loading) -importFrom(pkgload,parse_deps) -importFrom(pkgload,unload) -importFrom(sessioninfo,package_info) -importFrom(sessioninfo,session_info) +importFrom(pkgbuild, + clean_dll, + find_rtools, + has_devel, + with_debug +) +importFrom(pkgload, + check_dep_version, + is_loading, + parse_deps, + unload +) +importFrom(sessioninfo, + package_info, + session_info +) importFrom(stats,update) importFrom(usethis,use_test) diff --git a/man/build_rmd.Rd b/man/build_rmd.Rd index c55571d08..7e9c07f58 100644 --- a/man/build_rmd.Rd +++ b/man/build_rmd.Rd @@ -27,6 +27,6 @@ format is read from metadata (i.e. not a custom format object passed to \code{build_rmd()} is deprecated, as it is a low-level helper for internal use. To render your package's \code{README.qmd} or \code{README.Rmd}, use \code{\link[=build_readme]{build_readme()}}. To preview a vignette or article, use functions like \code{\link[pkgdown:build_site]{pkgdown::build_site()}} or -\code{\link[pkgdown:build_articles]{pkgdown::build_article()}}. +\code{\link[pkgdown:build_article]{pkgdown::build_article()}}. } \keyword{internal} diff --git a/man/build_vignettes.Rd b/man/build_vignettes.Rd index ab296b5d0..57ebf3ba1 100644 --- a/man/build_vignettes.Rd +++ b/man/build_vignettes.Rd @@ -61,7 +61,7 @@ outputs.} \code{build_vignettes()} is deprecated because we no longer recommend that you build vignettes in this way, because it leaves build artifacts in your -development directory. Instead, use \code{\link[pkgdown:build_articles]{pkgdown::build_article()}} to +development directory. Instead, use \code{\link[pkgdown:build_article]{pkgdown::build_article()}} to render articles locally for preview and polishing. } \keyword{internal} diff --git a/man/check_mac_release.Rd b/man/check_mac_release.Rd index d763a06a8..0c9f694f6 100644 --- a/man/check_mac_release.Rd +++ b/man/check_mac_release.Rd @@ -48,7 +48,7 @@ Check on either the released or development versions of R, using \url{https://mac.r-project.org/macbuilder/submit.html}. } \seealso{ -Other build functions: -\code{\link{check_win}()} +Other build functions: +\code{\link[=check_win]{check_win()}} } \concept{build functions} diff --git a/man/check_win.Rd b/man/check_win.Rd index 768a1e798..468408019 100644 --- a/man/check_win.Rd +++ b/man/check_win.Rd @@ -74,7 +74,7 @@ deleted after a couple of days. }} \seealso{ -Other build functions: -\code{\link{check_mac_release}()} +Other build functions: +\code{\link[=check_mac_release]{check_mac_release()}} } \concept{build functions} diff --git a/man/devtools-package.Rd b/man/devtools-package.Rd index 86af12b14..e3aa01de8 100644 --- a/man/devtools-package.Rd +++ b/man/devtools-package.Rd @@ -36,6 +36,7 @@ Useful links: Authors: \itemize{ + \item Jennifer Bryan \email{jenny@posit.co} (\href{https://orcid.org/0000-0002-6983-2759}{ORCID}) \item Hadley Wickham \item Jim Hester \item Winston Chang diff --git a/man/document.Rd b/man/document.Rd index cf8d800fb..dfb1ad694 100644 --- a/man/document.Rd +++ b/man/document.Rd @@ -10,9 +10,16 @@ document(pkg = ".", roclets = NULL, quiet = FALSE) \item{pkg}{The package to use, can be a file path to the package or a package object. See \code{\link[=as.package]{as.package()}} for more information.} -\item{roclets}{Character vector of roclet names to use with package. +\item{roclets}{Character vector of \link[roxygen2:roclet]{roclets} to use. + The default, \code{NULL}, uses the roxygen \code{roclets} option, -which defaults to \code{c("collate", "namespace", "rd")}.} +which defaults to \code{c("collate", "namespace", "rd")}. This will update +(if needed) the \code{Collate} field with \code{\link[roxygen2:update_collate]{update_collate()}}, +produce the \code{NAMESPACE} file with \code{\link[roxygen2:namespace_roclet]{namespace_roclet()}}, and +produce the Rd files with \code{\link[roxygen2:rd_roclet]{rd_roclet()}}. + +(Note that \code{update_collate()} is not technically a roclet but is still +controlled with this argument for historical reasons.)} \item{quiet}{if \code{TRUE} suppresses output from this function.} } diff --git a/man/install.Rd b/man/install.Rd index e9d653d01..466fa11d7 100644 --- a/man/install.Rd +++ b/man/install.Rd @@ -24,7 +24,7 @@ package object. See \code{\link[=as.package]{as.package()}} for more informatio \item{reload}{if \code{TRUE} (the default), will automatically attempt to reload the package after installing. Reloading is not always completely possible -so see \code{\link[pkgload:unload]{pkgload::unregister()}} for caveats.} +so see \code{\link[pkgload:unregister]{pkgload::unregister()}} for caveats.} \item{quick}{if \code{TRUE}, skips some optional steps (e.g. help pre-rendering and multi-arch builds) to make installation as fast @@ -96,7 +96,7 @@ To install to a non-default library, use \code{\link[withr:with_libpaths]{withr: \seealso{ \code{\link[=with_debug]{with_debug()}} to install packages with debugging flags set. -Other package installation: -\code{\link{uninstall}()} +Other package installation: +\code{\link[=uninstall]{uninstall()}} } \concept{package installation} diff --git a/man/lint.Rd b/man/lint.Rd index 05da247e2..f17d625fa 100644 --- a/man/lint.Rd +++ b/man/lint.Rd @@ -14,7 +14,7 @@ package object. See \code{\link[=as.package]{as.package()}} for more informatio the previous results. Consult the lintr package to learn more about its caching behaviour.} -\item{...}{Additional arguments passed to \code{\link[lintr:lint]{lintr::lint_package()}}.} +\item{...}{Additional arguments passed to \code{\link[lintr:lint_package]{lintr::lint_package()}}.} } \description{ The default linters correspond to the style guide at @@ -22,5 +22,5 @@ The default linters correspond to the style guide at of them using the \code{linters} parameter. } \seealso{ -\code{\link[lintr:lint]{lintr::lint_package()}}, \code{\link[lintr:lint]{lintr::lint()}} +\code{\link[lintr:lint_package]{lintr::lint_package()}}, \code{\link[lintr:lint]{lintr::lint()}} } diff --git a/man/load_all.Rd b/man/load_all.Rd index 9544b4083..df69b260d 100644 --- a/man/load_all.Rd +++ b/man/load_all.Rd @@ -90,6 +90,12 @@ it makes internal objects easy to access. To export only the objects listed as exports, use \code{export_all = FALSE}. This more closely simulates behavior when loading an installed package with \code{\link[=library]{library()}}, and can be useful for checking for missing exports. +\item When reloading a package, \code{load_all()} runs the unload hooks +(\code{.onUnload()} and hooks registered with \code{\link[=setHook]{setHook()}}) of the old +namespace, but doesn't unload the namespace or its DLL. This keeps +dangling references to the old namespace in working order. Errors +thrown from \code{.onUnload()} are demoted to warnings so that they can't +prevent reloading. } } diff --git a/man/reexports.Rd b/man/reexports.Rd index 6d0845234..5e64496eb 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -21,10 +21,10 @@ These objects are imported from other packages. Follow the links below to see their documentation. \describe{ - \item{pkgbuild}{\code{\link[pkgbuild]{clean_dll}}, \code{\link[pkgbuild:has_rtools]{find_rtools}}, \code{\link[pkgbuild:has_compiler]{has_devel}}, \code{\link[pkgbuild]{with_debug}}} + \item{pkgbuild}{\code{\link[pkgbuild:clean_dll]{clean_dll()}}, \code{\link[pkgbuild:find_rtools]{find_rtools()}}, \code{\link[pkgbuild:has_devel]{has_devel()}}, \code{\link[pkgbuild:with_debug]{with_debug()}}} - \item{pkgload}{\code{\link[pkgload]{check_dep_version}}, \code{\link[pkgload:load_all]{is_loading}}, \code{\link[pkgload]{parse_deps}}, \code{\link[pkgload]{unload}}} + \item{pkgload}{\code{\link[pkgload:check_dep_version]{check_dep_version()}}, \code{\link[pkgload:is_loading]{is_loading()}}, \code{\link[pkgload:parse_deps]{parse_deps()}}, \code{\link[pkgload:unload]{unload()}}} - \item{sessioninfo}{\code{\link[sessioninfo]{package_info}}, \code{\link[sessioninfo]{session_info}}} + \item{sessioninfo}{\code{\link[sessioninfo:package_info]{package_info()}}, \code{\link[sessioninfo:session_info]{session_info()}}} }} diff --git a/man/run_examples.Rd b/man/run_examples.Rd index 89ec7c845..b503c85f5 100644 --- a/man/run_examples.Rd +++ b/man/run_examples.Rd @@ -25,7 +25,7 @@ name of \code{Rd} file to start with (with or without extensions), or a topic name. If omitted, will start with the (lexicographically) first file. This is useful if you have a lot of examples and don't want to rerun them every time you fix a problem. To run only one example, use -\code{\link[pkgload:dev_example]{pkgload::run_example()}}.} +\code{\link[pkgload:run_example]{pkgload::run_example()}}.} \item{show}{DEPRECATED.} @@ -50,7 +50,7 @@ restart the whole process. This function makes it a little easier by making it possible to run all examples from an R function. } \seealso{ -\code{\link[pkgload:dev_example]{pkgload::run_example()}} to run a single example. +\code{\link[pkgload:run_example]{pkgload::run_example()}} to run a single example. } \concept{example functions} \keyword{programming} diff --git a/man/spell_check.Rd b/man/spell_check.Rd index 0d8a7b6f6..3176aef3b 100644 --- a/man/spell_check.Rd +++ b/man/spell_check.Rd @@ -12,7 +12,7 @@ package object. See \code{\link[=as.package]{as.package()}} for more informatio \item{vignettes}{also check all \code{rmd} and \code{rnw} files in the pkg \code{vignettes} folder} -\item{use_wordlist}{ignore words in the package \link[spelling:wordlist]{WORDLIST} file} +\item{use_wordlist}{ignore words in the package \link[spelling:get_wordlist]{WORDLIST} file} } \description{ Runs a spell check on text fields in the package description file, manual diff --git a/man/submit_cran.Rd b/man/submit_cran.Rd index 7f8fce270..2e5ec5fb5 100644 --- a/man/submit_cran.Rd +++ b/man/submit_cran.Rd @@ -19,7 +19,7 @@ To complete the submission you will need respond to the email sent to the maintainer email address. We generally recommend using this part of the process defined by -\code{\link[usethis:use_release_issue]{usethis::use_release_issue()}}; this process maximizes the chances of a successful +\code{\link[usethis:use_release_issue]{use_release_issue()}}; this process maximizes the chances of a successful submission. } \keyword{internal} diff --git a/man/uninstall.Rd b/man/uninstall.Rd index 26aa7f089..c79591942 100644 --- a/man/uninstall.Rd +++ b/man/uninstall.Rd @@ -26,7 +26,7 @@ from a non-default library, use in combination with \code{\link[withr:with_libpa \seealso{ \code{\link[=with_debug]{with_debug()}} to install packages with debugging flags set. -Other package installation: -\code{\link{install}()} +Other package installation: +\code{\link[=install]{install()}} } \concept{package installation} From e74e4d815dd1d413a571cd29bc330a67410f2205 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Thu, 17 Sep 2026 14:55:32 -0500 Subject: [PATCH 2/3] `use_tidy_description()` --- DESCRIPTION | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e4add6b3c..330a803ef 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -56,11 +56,13 @@ Suggests: rstudioapi (>= 0.13), spelling (>= 2.2), xml2 -VignetteBuilder: knitr, quarto +VignetteBuilder: + knitr, + quarto Config/Needs/website: tidyverse/tidytemplate +Config/roxygen2/version: 8.1.0 Config/testthat/edition: 3 Config/testthat/parallel: true Encoding: UTF-8 Language: en-US Roxygen: list(markdown = TRUE) -Config/roxygen2/version: 8.1.0 From d8a8e117aa7466b983f5bf649eb4b37a9979c853 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Thu, 17 Sep 2026 14:58:36 -0500 Subject: [PATCH 3/3] `use_tidy_github_actions()` --- .github/workflows/R-CMD-check.yaml | 13 +------------ .github/workflows/format-suggest.yaml | 3 ++- .github/workflows/pkgdown.yaml | 6 ++---- .github/workflows/test-coverage.yaml | 8 +++----- 4 files changed, 8 insertions(+), 22 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 9948afb55..0ac7d7d61 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -24,17 +24,7 @@ jobs: matrix: config: - {os: macos-latest, r: 'release'} - - {os: windows-latest, r: 'release'} - # specifying oldrel-3 instead of oldrel-4, because ragg is a problem - # and that's what ragg itself is doing (???) - # seems like we lose coverage of rtools40's compiler, but that also - # doesn't seem like a devtools problem - # https://github.com/r-lib/ragg/pull/195/commits/0ce19424eab2dad15b38b41992804e3226d86e22 - - {os: windows-latest, r: 'oldrel-3'} - # use 4.0 or 4.1 to check with rtools40's older compiler - #- {os: windows-latest, r: 'oldrel-4'} - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - {os: ubuntu-latest, r: 'release'} - {os: ubuntu-latest, r: 'oldrel-1'} @@ -47,7 +37,7 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: r-lib/actions/setup-pandoc@v2 @@ -55,7 +45,6 @@ jobs: with: r-version: ${{ matrix.config.r }} http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - uses: r-lib/actions/setup-r-dependencies@v2 with: diff --git a/.github/workflows/format-suggest.yaml b/.github/workflows/format-suggest.yaml index 8c4f117d8..2a56c62ad 100644 --- a/.github/workflows/format-suggest.yaml +++ b/.github/workflows/format-suggest.yaml @@ -28,9 +28,10 @@ jobs: pull-requests: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: ref: ${{ github.event.pull_request.head.sha }} + allow-unsafe-pr-checkout: true - name: Install uses: posit-dev/setup-air@v1 diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index bfc9f4db3..16c6c8b8b 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -23,13 +23,11 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - uses: r-lib/actions/setup-r-dependencies@v2 with: @@ -42,7 +40,7 @@ jobs: - name: Deploy to GitHub pages 🚀 if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.5.0 + uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0 with: clean: false branch: gh-pages diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 0ab748d65..5e820d396 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -16,11 +16,9 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - uses: r-lib/actions/setup-r-dependencies@v2 with: @@ -38,7 +36,7 @@ jobs: covr::to_cobertura(cov) shell: Rscript {0} - - uses: codecov/codecov-action@v5 + - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7 with: # Fail if error if not on PR, or if on PR and token is given fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }} @@ -56,7 +54,7 @@ jobs: - name: Upload test results if: failure() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: coverage-test-failures path: ${{ runner.temp }}/package