-
Notifications
You must be signed in to change notification settings - Fork 37
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
length method vs R CMD Check #342
Comments
Would you mind providing a basic package reprex? |
Sure, I'll put something together, including the failed check. |
Somewhat shockingly, I had to include the
I hope that helps track it down! |
You just need one documentation file to be present, which I guess isn't too surprising given that the error comes from the "checking for code/documentation mismatches" check. |
I see the same problem when registering a method for You can see the problem more easily with A bit of rlang gymnastics yields a back trace for the warning:
And it's calling it with |
This prevents it from being listed in `functions_in_S3_table` (https://github.com/wch/r-source/blob/16c4fbf48efb4d43ef5dccadc86576100edd85b4/src/library/tools/R/QC.R#L370-L383) and later generating a warning when calling `formals` on each element of that list. Fixes #342
@jonthegeek thanks for trying S7 out and reporting these problems! |
Happy to help! I'd been trying to decide how to structure a data--of-a-particular-shape-focused package, and S7 appeared on CRAN just in time 😊 |
) This prevents it from being listed in `functions_in_S3_table` (https://github.com/wch/r-source/blob/16c4fbf48efb4d43ef5dccadc86576100edd85b4/src/library/tools/R/QC.R#L370-L383) and later generating a warning when calling `formals` on each element of that list. Fixes #342
I'm not sure how to reprex this, because so far I only see the issue inside R CMD Check. This is the warning I get:
I got it by trying to define a
length
method.S7::method(length, rapid) <- function(x) length(x@info)
It otherwise works with the dev version of S7 (but fails with the CRAN version).
I'm assuming that it's somehow related to length being a primitive rather than an actual S3 generic, but beyond that I'm not sure where to look.
The text was updated successfully, but these errors were encountered: