From 30a45956d1f56f20ff6e94873e3ce82e691122c9 Mon Sep 17 00:00:00 2001 From: Ranke Johannes Date: Fri, 9 Feb 2024 06:51:18 +0100 Subject: [PATCH 1/2] Improve check for unexported S3 methods Fixes #1593 --- R/namespace.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/namespace.R b/R/namespace.R index b4d93d01..61102886 100644 --- a/R/namespace.R +++ b/R/namespace.R @@ -398,8 +398,9 @@ warn_missing_s3_exports <- function(blocks, env) { s3blocks <- blocks[map_lgl(blocks, block_has_tags, c("export", "exportS3method"))] s3objects <- map(blocks, function(block) block$object$value) + s3functions <- Filter(is.function, s3objects) - undocumented <- methods[!methods %in% s3objects] + undocumented <- methods[!methods %in% s3functions] srcrefs <- map(undocumented, attr, "srcref") map2(undocumented, names(undocumented), function(fun, name) { From 8d8b442e3d1ce8d1c282ca24382fc737428a22c1 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 9 Jul 2024 20:00:00 +0200 Subject: [PATCH 2/2] Add NEWS entry as suggested by @hadley --- NEWS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index f21ddb98..b59d6d6d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,8 +1,12 @@ # roxygen2 (development version) +* The check for unexported S3 methods was improved, so it does not hang any more + if a largish data object is in the package (#1593, @jranke). + * Custom [`@family` titles](https://roxygen2.r-lib.org/articles/index-crossref.html) now support Markdown syntax (#1608, @salim-b). + # roxygen2 7.3.2 * `@includeRmd` now additionally sets `options(cli.hyperlink = FALSE)` to make