From 3376c65df3e0e8ae49fb108d1f3d0240e1f01475 Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Tue, 4 Jul 2023 13:53:02 -0700 Subject: [PATCH 1/2] Compare to a numeric version Part of the response to CRAN's requests related to https://bugs.r-project.org/show_bug.cgi?id=18548 --- R/utils.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/utils.R b/R/utils.R index ec04c2a4..d0214306 100644 --- a/R/utils.R +++ b/R/utils.R @@ -16,7 +16,7 @@ compact <- function(x) { get(f, envir = asNamespace(p)) } -is_installed <- function(package, version = 0) { +is_installed <- function(package, version = "0") { installed_version <- tryCatch(utils::packageVersion(package), error = function(e) NA) !is.na(installed_version) && installed_version >= version } @@ -180,7 +180,7 @@ single_quote <- function(x) { } ns_s3_methods <- function(pkg) { - ns_env(pkg)$.__S3MethodsTable__. + ns_env(pkg)$.__S3MethodsTable__. } paste_line <- function(...) { From 3cf989607610befa5c1d18c6d45a258dcb7f03cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Wed, 7 Dec 2022 13:51:54 +0100 Subject: [PATCH 2/2] Revert "Do not assume that no pkgbuild is needed if no /src (#234)" This reverts commit 9cea17268fc1fcdbfafe3ef314fd96ecf90ff4f1. --- R/load.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/load.R b/R/load.R index 04255ea7..c51020a7 100644 --- a/R/load.R +++ b/R/load.R @@ -144,7 +144,11 @@ load_all <- function(path = ".", on.exit(compiler::enableJIT(oldEnabled), TRUE) } - if (missing(compile) && !missing(recompile)) { + # Compile dll if requested, we don't ever need to do this if a package doesn't + # have a src/ directory + if (!dir.exists(file.path(path, "src"))) { + compile <- FALSE + } else if (missing(compile) && !missing(recompile)) { compile <- if (isTRUE(recompile)) TRUE else NA }