Skip to content
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

"?" name collision with devtools/pkgload #4

Open
gaborcsardi opened this issue May 17, 2019 · 2 comments
Open

"?" name collision with devtools/pkgload #4

gaborcsardi opened this issue May 17, 2019 · 2 comments

Comments

@gaborcsardi
Copy link

This is maybe not sg that should be fixed here, but in pkgload, just wanted to make note of it. pkgload also has ?, to render development documentation, and this overrides rdoc.

@jimhester do you think that there is an easy workaround for this?

@jimhester
Copy link

I think if rdoc just called help() rather than utils::help()at

rdoc/R/rdoc.R

Line 19 in 75fcca9

utils::`help`,
it would work with the devtools shims.

But you might have to do something like get("help")() to avoid a R CMD check note.

@mdequeljoe
Copy link
Owner

Yeh i think there may be two related points here:

  • as @jimhester suggested rdoc shouldn't always call utils::help. This is fixed by finding the closest help to call that is not from rdoc.

    rdoc/R/rdoc.R

    Line 19 in bb3920d

    find_help(),

    In trying the above suggestion I realised that in some cases help can refer to the one attached via rdoc which will cause issues.

  • The original point remains: if 'devtools_shims' are attached at some point after rdoc then documentation output will be decided via pkgload. I agree that there is probably not much that can be done here. At least now use_rdoc has been changed such that if is over-ridden, re-calling it will move it to the front of the search.

rdoc/R/rdoc.R

Lines 210 to 212 in bb3920d

use_rdoc <- function() {
if ("rdoc" %in% search())
rm_rdoc()

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

3 participants