Skip to content

Commit

Permalink
Remove more rlang variant remnants (#1870)
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley authored Sep 26, 2023
1 parent 3ca6a02 commit 356900d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
25 changes: 0 additions & 25 deletions R/edition.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,28 +73,3 @@ local_edition <- function(x, .env = parent.frame()) {
edition_get <- function() {
the$edition %||% find_edition(".")
}


find_dep_version <- function(name, path, package = NULL) {
desc <- find_description(path, package)
if (is.null(desc)) {
return(NULL)
}

deps <- desc$get_deps()
i <- match(name, deps[["package"]])
if (is_na(i)) {
return(NULL)
}

dep <- deps[[i, "version"]]
dep <- strsplit(dep, " ")[[1]]
if (!is_character(dep, 2) && !is_string(dep[[1]], ">=")) {
return(NULL)
}

dep[[2]]
}
has_dep <- function(name, path, package = NULL) {
!is.null(find_dep_version(name, path, package = package))
}
4 changes: 0 additions & 4 deletions R/local.R
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,6 @@ local_test_directory <- function(path, package = NULL, .env = parent.frame()) {
# Set edition before changing working directory in case path is relative
local_edition(find_edition(path, package), .env = .env)

withr::local_options(
"testthat:::rlang_dep" = has_dep("rlang", path, package),
.local_envir = .env
)
withr::local_dir(
path,
.local_envir = .env
Expand Down

0 comments on commit 356900d

Please sign in to comment.