-
Notifications
You must be signed in to change notification settings - Fork 7
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
unitize_dir does not restore working directory on quit in package development mode #252
Comments
Thanks for reporting. Honestly I hadn't even considered this corner case, where there is an environment in the search path masquerading as a package environment, but is not really a package environment. This could either be real easy to address, or possibly very difficult, depending on how the environment is built. I'll look at it at some point because I do agree that it would be nice if this worked, but what we're dealing here is the intersection of a hack (what In the meantime I think you have two options:
I am a reasonably active R package developer, and test/build packages all the time, use Loosely related issue: ropensci/drake#30 Finally, thanks for taking the time to take |
If I understand well devtools::load_all is not the best option before running tests but then devtools::test() using testthat does not restart environment neither before running the tests so the recommended way is to systematically install /restart / load and then run the tests finally, this is a very mild bug which better looks like a sane warning |
Yeah, basically you can't use My workflow is typically:
Note you should not need to restart R or re-load your packages (so long as you have a |
I looked into this further and concluded it is non-trivial to extend the search path management tools to include These changes are now on the development branch. |
under rstudio
inside an roci package development project
Error in library(name, pos = pos, quietly = TRUE, character.only = TRUE, :
‘roci’ is not a valid installed package
Warning in reattach(i, name = obj.name.clean, type = obj.type, data = search.target$search.path[[i]], :
Internal Warning: unable to fully restore search path; see prior error. Contact maintainer if this warning persists.
the error disappear if I fully install and restart the package (from rstudio button in the build pane)
but since this is a tool for development...
The text was updated successfully, but these errors were encountered: