-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Documentation not found for reexports #330
Comments
Thanks for the report, I can confirm that this is a bug. Unfortunately I am not sure that it will be easy to fix, since the way reexports are currently handled loses all information about them being reexports. (Note to self:) I’ll probably have to change the return type of |
I'm afraid I only managed to dig a little way into this myself before getting stuck - I will share my only finding in case it is helpful, though I suspect you might have a better way internally of getting the same info! With the same example from above: attr(attr(bio$is_valid, "srcref"), "srcfile")
#> /path/to/box/vignettes/bio/seq.r From some quick ad hoc testing, this seems to point to the right file (i.e. the file where the function is defined) even if we re-export a function all the way up a stack of modules. |
Hmm. This is actually more complex than I thought. Consider the following module
If a user now imports Not sure what a good solution for this is, except to force users to provide new documentation for documents that are re-exported under an alias. And annotating reeexports with ‘roxygen2’ isn’t supported yet (and there are issues with that as well; such as enforcing that documentation is applied to a reexport that names a single object). |
(Note to self:) also asked about on Stack Overflow. |
Error description
If a module imports, and then re-exports, an object from another module, then
box::help()
doesn't look for documentation in the right place.We can see this with
./bio
from the "Nesting modules" section of the "Getting started" vignette. If we implementbio
using the "reexport" pattern at the end of that section:Then we fail to retrieve help for
is_valid()
, becausebox::help()
is looking for documentation inbio
rather than inseq
:R version
‘box’ version
1.1.3 (from CRAN),
build/HEAD
(from GitHub)The text was updated successfully, but these errors were encountered: