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

delete redundant (?) loadNamespace() calls #254

Closed
maxheld83 opened this issue Jun 13, 2019 · 2 comments
Closed

delete redundant (?) loadNamespace() calls #254

maxheld83 opened this issue Jun 13, 2019 · 2 comments

Comments

@maxheld83
Copy link
Owner

There are some instances where I have to use more loadNamespace() than I thought should be necessary (they are all marked with TODO and this issue in the source).

This suggests something is wrong and/or I am not understanding this correctly.

For example:

the ghactions::document() action relies on roxygen, which is (rightfully) in Suggests: for ghactions, not Imports:.
So I have to call:

loadNamespace(package = "roxygen2", lib.loc = Sys.getenv("R_LIBS_ACTION"))
loadNamespace(package = "ghactions", lib.loc = Sys.getenv("R_LIBS_ACTION"))

What I don't understand is why I also have to call

loadNamespace(package = "brew", lib.loc = Sys.getenv("R_LIBS_ACTION"))

before the action will work (otherwise: missing package error).

brew is a dependency of roxygen2 and thus should be loaded when roxygen2 is loaded, no?

So this is weird.

@maxheld83 maxheld83 added the help wanted Extra attention is needed label Jun 13, 2019
@maxheld83 maxheld83 added this to the Backlog milestone Jun 13, 2019
@maxheld83
Copy link
Owner Author

this needs to be wrapped in withr::with_libPaths() (or whatever) because downstream dependencies do not inherit the lib.loc from loadNamespace().

@maxheld83 maxheld83 removed the help wanted Extra attention is needed label Jun 13, 2019
@maxheld83 maxheld83 removed this from the Backlog milestone Jun 13, 2019
maxheld83 added a commit to maxheld83/r-ci that referenced this issue Jun 15, 2019
maxheld83 added a commit to maxheld83/pensieve that referenced this issue Jun 15, 2019
@maxheld83
Copy link
Owner Author

this is really only part of the problem, remainder in #272

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

1 participant