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

load_all() no longer works with package objects (as created by as.package) #1923

Closed
kevinushey opened this issue Nov 13, 2018 · 5 comments
Closed

Comments

@kevinushey
Copy link
Contributor

setwd(tempdir())
usethis::create_package("test")
#> ✔ Setting active project to '/private/var/folders/qt/txb728ms5012wp_4yn369wth0000gn/T/Rtmp7dXsc3/test'
#> ✔ Creating 'R/'
#> ✔ Creating 'man/'
#> ✔ Writing 'DESCRIPTION'
#> ✔ Writing 'NAMESPACE'
pkg <- devtools::as.package("test")
devtools::load_all(pkg)
#> Error in path.expand(path): invalid 'path' argument

Created on 2018-11-13 by the reprex package (v0.2.1)

AFAIK this worked with devtools 1.13.6.

@jimhester
Copy link
Member

Is there a reason you need this?

@kevinushey
Copy link
Contributor Author

It's a pattern we were using in the IDE:

rstudio/rstudio#3876

It made it easier to (only using devtools) load a package when given the path to a test file living within that package.

@hack-r
Copy link

hack-r commented Dec 30, 2018

I noticed this as well. It's useful.

@kevinushey
Copy link
Contributor Author

Thanks!

HughParsonage pushed a commit to HughParsonage/devtools that referenced this issue Jul 2, 2019
This was broken when we changed pkgload::load_all() to take a path
rather than a package object.

Fixes r-lib#1923
@lock
Copy link

lock bot commented Jul 9, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jul 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants