Skip to content

Commit

Permalink
Do not import, use explicit ::
Browse files Browse the repository at this point in the history
So it is easier to embed into pak.
  • Loading branch information
gaborcsardi committed Nov 21, 2023
1 parent 5762e2f commit 0ba4c61
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
3 changes: 0 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,5 @@ export(without_cache)
export(without_compiler)
export(without_latex)
importFrom(R6,R6Class)
importFrom(callr,rcmd_process)
importFrom(callr,rcmd_process_options)
importFrom(cli,symbol)
importFrom(utils,head)
importFrom(utils,tail)
4 changes: 1 addition & 3 deletions R/build-bg.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ pkgbuild_process <- R6Class(
)
)

#' @importFrom callr rcmd_process rcmd_process_options

rcb_init <- function(self, private, super, path, dest_path, binary,
vignettes, manual, clean_doc, args, needs_compilation,
compile_attributes, register_routines, quiet) {
Expand All @@ -119,7 +117,7 @@ rcb_init <- function(self, private, super, path, dest_path, binary,
withr_set_makevars(compiler_flags(debug = FALSE), new_path = private$makevars_file)
withr_with_envvar(
c("R_MAKEVARS_USER" = private$makevars_file), {
options <- rcmd_process_options(
options <- callr::rcmd_process_options(
cmd = options$cmd,
cmdargs = c(options$path, options$args),
wd = options$out_dir,
Expand Down
7 changes: 3 additions & 4 deletions R/callback.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#' @importFrom cli symbol
#' @importFrom utils head tail

# This is adapted from https://github.com/r-lib/rcmdcheck/blob/7ee14764c2b17ee2c2f4131a9e19d1b56a66ed0f/R/callback.R
Expand Down Expand Up @@ -60,7 +59,7 @@ block_callback <- function(quiet) {
should_time <<- TRUE
if (grepl(" \\.\\.\\. OK\\s*$", x)) {
state <<- "OK"
style(ok = symbol$tick, " ", pale = no(x, "OK"))
style(ok = cli::symbol$tick, " ", pale = no(x, "OK"))
} else if (grepl(" \\.\\.\\. NOTE\\s*$", x)) {
state <<- "NOTE"
style(note = c("N ", no(x, "NOTE")))
Expand All @@ -72,12 +71,12 @@ block_callback <- function(quiet) {
style(err = c("E ", no(x, "ERROR")))
} else if (grepl("^\\* checking tests \\.\\.\\.[ ]?$", x)) {
state <<- "tests"
style(pale = c(symbol$line, " ", no(x)))
style(pale = c(cli::symbol$line, " ", no(x)))
} else if (grepl("^\\* DONE\\s*$", x)) {
state <<- "OK"
NA_character_
} else {
style(pale = c(symbol$line, " ", no(x)))
style(pale = c(cli::symbol$line, " ", no(x)))
}
}

Expand Down

0 comments on commit 0ba4c61

Please sign in to comment.