-
Notifications
You must be signed in to change notification settings - Fork 334
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
build_reference(): a function cannot share the package's name #1414
Comments
I can reproduce this with the desc package (that has a function called |
Especially as R CMD check warns about duplicate aliases (so downlit doesn't expect |
Just ran into this as well and followed Davis' advice at tidymodels/hardhat#130 (comment) for a temporary workaround in https://github.com/RoheLab/vsp. Attempted fix: RoheLab/vsp@cdd1799 |
This seems more like a roxygen2 issue than a downlit one, given the R CMD check warning. |
There is even already an issue there r-lib/roxygen2#1160 |
I encountered this error because I had the same alias for a method twice in the same Rd file (I do not use roxygen). It was not the same as the package name; and R CMD check apparently does not not catch that. It was difficult to find what caused it because the duplication was not in the Rd file where the pkdown compilation broke. The compilation broke in another Rd that used the offending method in the example. It would have been very helpful to get an error message telling me which value had length 2. |
unless I misunderstood your comment, in which case it'll be easier to open a new issue I think. |
The build_reference() function gives an error I did not have before a recent update:
Error: Failed to parse Rd in myfunction.Rd ℹ values must be length 1, but FUN(X[[1]]) result is length 2
I wasn't able to fully understand the error, but finally figured that it was due to my function having the same name as my package. Changing it did the trick, however I guess it is not a weird name and it should be allowed. Is there a way to do so ?
Here is the traceback:
The text was updated successfully, but these errors were encountered: