Skip to content

address error on devtools::document() #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
simonpcouch opened this issue Sep 12, 2024 · 2 comments
Closed

address error on devtools::document() #27

simonpcouch opened this issue Sep 12, 2024 · 2 comments

Comments

@simonpcouch
Copy link
Contributor

Seeing:

> devtools::document()
Error in `map2()`:In index: 1.With name: fit.probability_threshold.
Caused by error in `basename()`:
! a character vector argument expected
---
Backtrace:1. └─devtools::document()
  2.   └─roxygen2::roxygenise(pkg$path, roclets)
  3.     └─base::lapply(...)
  4.       ├─roxygen2 (local) FUN(X[[i]], ...)
  5.       └─roxygen2:::roclet_process.roclet_namespace(X[[i]], ...)
  6.         └─roxygen2:::warn_missing_s3_exports(blocks, env)
  7.           └─purrr::map2(...)
  8.             └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
  9.               ├─purrr:::with_indexed_errors(...)
 10.               │ └─base::withCallingHandlers(...)
 11.               ├─purrr:::call_with_cleanup(...)
 12.               └─roxygen2 (local) .f(.x[[i]], .y[[i]], ...)
 13.                 └─roxygen2:::warn_roxy_function(fun, "S3 method {.arg {name}} needs @export or @exportS3method tag")

Strangely, this isn't an issue if I backdate my roxygen2 to 7.2.3. I suppose we can go ahead and export S3 methods and see if that resolves :)

@simonpcouch
Copy link
Contributor Author

Bizarre... the first devtools::document() in a fresh session runs fine, the second results in the failure.

Also see:

Warning message:
In class(f) <- c("s3method", "function") :
  Setting class(x) to multiple strings ("s3method", "function", ...); result will no longer be an S4 object

@simonpcouch
Copy link
Contributor Author

Ah, see r-lib/roxygen2#1589. I had set a breakpoint inside the noted function—once I removed it, the error went away. Weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant