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 997c6948d..a824c55f2 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()) @@ -71,28 +67,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 +170,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 +190,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 pak::pak(\"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{