Skip to content

fix: rlang imports issues #310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Imports:
purrr,
rappdirs,
readr,
rlang,
tibble,
usethis,
xml2
Expand All @@ -54,7 +55,6 @@ Suggests:
knitr,
mapproj,
maps,
rlang,
rmarkdown,
testthat (>= 3.1.5),
withr
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ importFrom(magrittr,"%>%")
importFrom(openssl,md5)
importFrom(purrr,map_chr)
importFrom(purrr,map_lgl)
importFrom(rlang,dots_list)
importFrom(rlang,inject)
importFrom(stats,na.omit)
importFrom(tibble,as_tibble)
importFrom(tibble,tibble)
Expand Down
7 changes: 4 additions & 3 deletions R/cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ set_cache <- function(cache_dir = NULL,
max_age = days * 24 * 60 * 60,
logfile = file.path(cache_dir, logfile)
)
cache_environ$cache_args <- list2(
cache_environ$cache_args <- list(
cache_dir = cache_dir,
days = days,
max_size = max_size,
Expand Down Expand Up @@ -202,6 +202,7 @@ set_cache <- function(cache_dir = NULL,
#' [`disable_cache`] to only disable without deleting, and [`cache_info`]
#' @export
#' @import cachem
#' @importFrom rlang dots_list inject
clear_cache <- function(..., disable = FALSE) {
if (any(!is.na(cache_environ$epidatr_cache))) {
cache_environ$epidatr_cache$destroy()
Expand All @@ -210,7 +211,7 @@ clear_cache <- function(..., disable = FALSE) {
} else {
recovered_args <- list()
}
args <- rlang::dots_list(
args <- dots_list(
...,
confirm = FALSE,
!!!recovered_args,
Expand All @@ -220,7 +221,7 @@ clear_cache <- function(..., disable = FALSE) {
if (disable) {
cache_environ$epidatr_cache <- NULL
} else {
rlang::inject(set_cache(!!!args))
inject(set_cache(!!!args))
}
}

Expand Down
Loading