From 673ac4ebc3fb5bb38fbcfc4f75c5470392c0a5b8 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Thu, 12 Feb 2026 15:34:23 -0600 Subject: [PATCH 1/2] Review `dev_sitrep()` This doesn't seem that useful any more, but doesn't also seem too objectionable. I just did some minor polishing. Fixes #2664 --- R/sitrep.R | 31 ++++++++++++++----------------- man/dev_sitrep.Rd | 17 +++++++---------- 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/R/sitrep.R b/R/sitrep.R index c37adbaff..c49172b6c 100644 --- a/R/sitrep.R +++ b/R/sitrep.R @@ -71,28 +71,25 @@ check_for_rstudio_updates <- function( ) } -.r_release <- function() { - R_system_version(rversions::r_release()$version) +r_release <- function() { + R_system_version(rversions::resolve("release")$version) } -r_release <- memoise::memoise(.r_release) - #' Report package development situation #' -#' @template devtools -#' @inheritParams pkgbuild::has_build_tools -#' @description `dev_sitrep()` reports -#' * If R is up to date -#' * If RStudio is up to date -#' * If compiler build tools are installed and available for use -#' * If devtools and its dependencies are up to date -#' * If the package's dependencies are up to date +#' @description +#' Call this function if things seem weird and you're not sure +#' what's wrong or how to fix it. It reports: #' -#' @description Call this function if things seem weird and you're not sure -#' what's wrong or how to fix it. If this function returns no output -#' everything should be ready for package development. +#' * If R is up to date. +#' * If RStudio is up to date. +#' * If compiler build tools are installed and available for use. +#' * If devtools and its dependencies are up to date. +#' * If the package's dependencies are up to date. #' #' @return A named list, with S3 class `dev_sitrep` (for printing purposes). +#' @template devtools +#' @inheritParams pkgbuild::has_build_tools #' @export #' @examples #' \dontrun{ @@ -177,8 +174,8 @@ print.dev_sitrep <- function(x, ...) { "!" = "{.field Rtools} is not installed.", " " = "Download and install it from: {.url https://cloud.r-project.org/bin/windows/Rtools/}" )) + all_ok <- FALSE } - all_ok <- FALSE } if (!is.null(x$rstudio_version)) { @@ -197,7 +194,7 @@ print.dev_sitrep <- function(x, ...) { devtools_deps_old <- x$devtools_deps$diff < 0 if (any(devtools_deps_old)) { cli::cli_bullets(c( - "!" = "{.pkg devtools} or its dependencies out of date:", + "!" = "{.field devtools} or its dependencies out of date:", " " = "{.val {x$devtools_deps$package[devtools_deps_old]}}", " " = "Update them with {.code devtools::update_packages(\"devtools\")}" )) diff --git a/man/dev_sitrep.Rd b/man/dev_sitrep.Rd index 1a4cb435f..d92f47e8c 100644 --- a/man/dev_sitrep.Rd +++ b/man/dev_sitrep.Rd @@ -17,18 +17,15 @@ debugging. If \code{FALSE}, it will use result cached from a previous run.} A named list, with S3 class \code{dev_sitrep} (for printing purposes). } \description{ -\code{dev_sitrep()} reports +Call this function if things seem weird and you're not sure +what's wrong or how to fix it. It reports: \itemize{ -\item If R is up to date -\item If RStudio is up to date -\item If compiler build tools are installed and available for use -\item If devtools and its dependencies are up to date -\item If the package's dependencies are up to date +\item If R is up to date. +\item If RStudio is up to date. +\item If compiler build tools are installed and available for use. +\item If devtools and its dependencies are up to date. +\item If the package's dependencies are up to date. } - -Call this function if things seem weird and you're not sure -what's wrong or how to fix it. If this function returns no output -everything should be ready for package development. } \examples{ \dontrun{ From 9f9ad18a85012450f5f343587f2d8cd0fa968e01 Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Fri, 13 Feb 2026 10:06:05 -0800 Subject: [PATCH 2/2] Stop importing memoise::memoise() --- NAMESPACE | 1 - R/sitrep.R | 4 ---- 2 files changed, 5 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index a527d6e2c..0262b2d5c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -86,7 +86,6 @@ import(fs) 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) diff --git a/R/sitrep.R b/R/sitrep.R index c49172b6c..b42bfdbfc 100644 --- a/R/sitrep.R +++ b/R/sitrep.R @@ -1,7 +1,3 @@ -# Supress R CMD check note -#' @importFrom memoise memoise -NULL - rstudio_version_string <- function() { if (!is_rstudio_running()) { return(character())