diff --git a/DESCRIPTION b/DESCRIPTION index 35bd1e4..a90b028 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: checked Title: Systematically Run R CMD Checks -Version: 0.2.8.9000 +Version: 0.2.9 Authors@R: c( person( diff --git a/NEWS.md b/NEWS.md index c6b42e9..923bfe6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,8 +1,14 @@ -# checked (devel) +# checked (0.2.9) * Add `igraph_subgraph_from_edges` wrapper to used work around deprecation messages and alternate between `igraph::subgraph.edges` and `igraph::subgraph_from_edges` depending on the `igraph` version. + +* Address CRAN results issues + +* In `install_packages_process` use `withCallingHandlers` instead + of the `tryCatch` to prevent accidental interruptions if `install.packages()` + triggers a benign warning. # checked 0.2.8 diff --git a/R/install.R b/R/install.R index 4ef1eac..adabe58 100644 --- a/R/install.R +++ b/R/install.R @@ -19,7 +19,7 @@ install_packages_process <- R6::R6Class( private$callr_r_bg( function(..., escalate_warning, available_packages_filters) { options(available_packages_filters = available_packages_filters) - tryCatch( + withCallingHandlers( utils::install.packages(...), warning = function(w) { if (escalate_warning(w)) { diff --git a/R/task_graph.R b/R/task_graph.R index cc80f21..1985a4f 100644 --- a/R/task_graph.R +++ b/R/task_graph.R @@ -419,7 +419,7 @@ is_package_satisfied <- function(v, lib.loc) { # nolint object_name_linter } igraph_subgraph_from_edges <- function(...) { - if (packageVersion("igraph") < "2.1.0") { + if (utils::packageVersion("igraph") < "2.1.0") { igraph::subgraph.edges(...) } else { igraph::subgraph_from_edges(...) diff --git a/man/custom_install_task_spec.Rd b/man/custom_install_task_spec.Rd index 5e23cc8..88a291f 100644 --- a/man/custom_install_task_spec.Rd +++ b/man/custom_install_task_spec.Rd @@ -17,7 +17,8 @@ custom_install_task_spec(...) \item{\code{INSTALL_opts}}{ an optional character vector of additional option(s) to be passed to \command{R CMD INSTALL} for a source package install. E.g., - \code{c("--html", "--no-multiarch", "--no-test-load")}. + \code{c("--html", "--no-multiarch", "--no-test-load")} or, for + macOS, \code{"--dsym"}. Can also be a named list of character vectors to be used as additional options, with names the respective package names. diff --git a/man/install_task_spec.Rd b/man/install_task_spec.Rd index d1c4e96..f439c20 100644 --- a/man/install_task_spec.Rd +++ b/man/install_task_spec.Rd @@ -15,7 +15,8 @@ install_task_spec(type = getOption("pkgType"), INSTALL_opts = NULL, ...) \item{INSTALL_opts}{ an optional character vector of additional option(s) to be passed to \command{R CMD INSTALL} for a source package install. E.g., - \code{c("--html", "--no-multiarch", "--no-test-load")}. + \code{c("--html", "--no-multiarch", "--no-test-load")} or, for + macOS, \code{"--dsym"}. Can also be a named list of character vectors to be used as additional options, with names the respective package names. diff --git a/tests/testthat/test-checks_df.R b/tests/testthat/test-checks_df.R index 61bec32..3d67f7a 100644 --- a/tests/testthat/test-checks_df.R +++ b/tests/testthat/test-checks_df.R @@ -6,6 +6,12 @@ path <- c( file.path(examples_path, "exampleOkay"), file.path(examples_path, "exampleBad") ) +expected_revdeps <- tools::package_dependencies( + "DALEXtra", + db = utils::available.packages(repos = "https://cran.r-project.org/"), + reverse = TRUE, + which = "all" +)[[1]] test_that("rev_dep_check_tasks_df works with deafult params", { expect_silent( @@ -15,7 +21,7 @@ test_that("rev_dep_check_tasks_df works with deafult params", { ) ) expect_s3_class(df, "data.frame") - expect_true(NROW(df) >= 8) + expect_true(NROW(df) >= 2*length(expected_revdeps)) expect_named(df, c("alias", "version", "package", "custom")) expect_s3_class(df$package, "list_of_task_spec") @@ -118,7 +124,7 @@ test_that("rev_dep_check_tasks_df development_only = TRUE", { ) ) expect_s3_class(df, "data.frame") - expect_true(NROW(df) >= 4) + expect_true(NROW(df) >= length(expected_revdeps)) expect_named(df, c("alias", "version", "package", "custom")) expect_s3_class(df$package, "list_of_task_spec")