@@ -201,8 +201,9 @@ import_from <- function(package, funs, expanded = FALSE) {
201201 )
202202}
203203
204- # Conflicting `@importAllFrom` directives are detected at document-time. An
205- # error is thrown so the user has to resolve the conflict to build the package.
204+ # Conflicting `@importAllFrom` directives (either with another `@importAllFrom`
205+ # or a regular `@importFrom`) are detected at document-time. An error is thrown
206+ # so the user has to resolve the conflict to build the package.
206207check_import_conflicts <- function (imports ) {
207208 syms <- map(imports , \(x ) strip_quotes(x $ funs ))
208209 imported <- data.frame (
@@ -222,7 +223,6 @@ check_import_conflicts <- function(imports) {
222223 # Re-exports aren't real conflicts: when several packages export the same
223224 # object (e.g. `%>%`), importing it from more than one is harmless.
224225 conflicts <- discard(conflicts , \(x ) is_reexport(x $ sym [[1 ]], unique(x $ pkg )))
225-
226226 if (length(conflicts ) == 0 ) {
227227 return (invisible ())
228228 }
@@ -235,7 +235,6 @@ check_import_conflicts <- function(imports) {
235235 conflict <- conflicts [[1 ]]
236236 example_sym <- auto_quote(conflict $ sym [[1 ]])
237237 example_pkg <- conflict $ pkg [conflict $ expanded ][[1 ]]
238-
239238 cli :: cli_abort(c(
240239 " Found {length(conflicts)} conflicting import{?s} from {.code @importAllFrom}." ,
241240 set_names(bullets , rep(" *" , length(bullets ))),
0 commit comments