Skip to content

Commit 7c12664

Browse files
authored
Improve check for unexported S3 methods (#1594)
Fixes #1593
1 parent 12c3555 commit 7c12664

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# roxygen2 (development version)
22

3+
* The check for unexported S3 methods was improved, so it does not hang any more
4+
if a largish data object is in the package (#1593, @jranke).
5+
36
* Custom [`@family`
47
titles](https://roxygen2.r-lib.org/articles/index-crossref.html) now support
58
Markdown syntax (#1608, @salim-b).
9+
610
# roxygen2 7.3.2
711

812
* `@includeRmd` now additionally sets `options(cli.hyperlink = FALSE)` to make

R/namespace.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,9 @@ warn_missing_s3_exports <- function(blocks, env) {
398398

399399
s3blocks <- blocks[map_lgl(blocks, block_has_tags, c("export", "exportS3Method"))]
400400
s3objects <- map(blocks, function(block) block$object$value)
401+
s3functions <- Filter(is.function, s3objects)
401402

402-
undocumented <- methods[!methods %in% s3objects]
403+
undocumented <- methods[!methods %in% s3functions]
403404
srcrefs <- map(undocumented, attr, "srcref")
404405

405406
map2(undocumented, names(undocumented), function(fun, name) {

0 commit comments

Comments
 (0)