Skip to content

Commit

Permalink
pacakge conflicts in non-interactive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
msberends committed Nov 27, 2023
1 parent 90778a8 commit 01a610c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: certedata
Title: A Certe R Package for Loading 'certedata' Universe
Version: 4.4.1
Version: 4.4.2
Authors@R: c(
person(given = c("Matthijs", "S."),
family = "Berends",
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export(certedata_conflicts)
export(certedata_install_packages)
export(certedata_packages)
importFrom(cli,cat_line)
importFrom(cli,cli_inform)
importFrom(cli,cli_progress_step)
importFrom(cli,cli_rule)
importFrom(cli,cli_text)
Expand Down
13 changes: 8 additions & 5 deletions R/attach.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ attach_all <- function(keep_silent = FALSE) {
}

if (keep_silent == FALSE) {
cli_rule(left = "Attaching {.pkg certedata}")
cli_rule(left = "Attaching {.pkg certedata {utils::packageVersion('certedata')}}")
if (any(to_attach %in% base)) {
cli_text("Attaching first from base R: {.pkg {to_attach[to_attach %in% base]}}")
}
Expand All @@ -141,6 +141,7 @@ attach_all <- function(keep_silent = FALSE) {
#' @details This function attaches all 'certedata' universe R packages and their accompanying third-party packages (in total `r length(core_all)` packages).
#'
#' To install the packages, see [certedata_install_packages()].
#' @importFrom cli cli_inform symbol
#' @export
certedata_attach <- function(...) {

Expand All @@ -150,10 +151,12 @@ certedata_attach <- function(...) {
if (!"package:conflicted" %in% search() && keep_silent == FALSE) {
x <- certedata_conflicts()
overwritten_by_certe <- sum(vapply(FUN.VALUE = logical(1), x, function(x) x[1] %like% "^package:certe"), na.rm = TRUE)

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'

Check warning on line 153 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=153,col=84,[object_usage_linter] no visible global function definition for '%like%'
if (overwritten_by_certe > 0) {
cli_rule(left = "Conflicts by Certe packages")
cli_text("Certe packages currently overwrite ", overwritten_by_certe,
" functions from other packages. Run {.fn certedata_conflicts} to view the full list.")
if (keep_silent == FALSE && overwritten_by_certe > 0) {
if (interactive()) {
cli_inform("{symbol$warning} Certe packages currently overwrite {overwritten_by_certe} functions from other packages. Run {.fn certedata_conflicts} to view the full list.")

Check warning on line 156 in R/attach.R

View workflow job for this annotation

GitHub Actions / lintr / lintr

file=R/attach.R,line=156,col=9,[object_usage_linter] no visible global function definition for 'cli_inform'
} else {
print(certedata_conflicts())
}
}
}

Expand Down

0 comments on commit 01a610c

Please sign in to comment.