klmr / box

Write reusable, composable and modular R code
https://klmr.me/box/
MIT License
829 stars 47 forks source link

Documentation for re-exported objects via `box::help()` #332

Closed owenjonesuob closed 11 months ago

owenjonesuob commented 11 months ago

If we ask for help about an object exported by a module A, we can:

This is a solution to #330, but perhaps not optimal compared to the solution proposed by @klmr within in that issue.

klmr commented 11 months ago

Thanks for the PR! I’ve got to say that I was briefly excited that such a short solution would exist.

But unfortunately this approach won’t work. 😞 … the srcref attribute isn’t available for all objects, only for functions; but users can export other objects as well. ‘box’ will have to keep track of the origin of the object itself, as I originally thought.

owenjonesuob commented 11 months ago

Ah, that's a very good point!!

Interested to see how this one eventually turns out - I'll close this PR but will keep an eye on #330 😇