-
Notifications
You must be signed in to change notification settings - Fork 284
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
use_dev_package
tries to install from CRAN rather than the remote
#1870
Comments
It's pretty unusual to use renv while developing a package and, unless you have a specific reason to do so, I wouldn't recommend it. It's certainly not a use case that has been explored or designed around much in terms of devtools/usethis. I'm guessing you have not installed funspotr into the project-specific library for this new project? |
Yep exactly, it hadn't been installed into the project specific library. Probably less likely but this issue could also occur outside of a renv context, if adding the package before installing it, which is surely the situation that the rlang::check_installed() is trying to catch... It just doesn't work when the package in question comes from a non-standard (CRAN) source. |
I feel like the message telling you that the package wasn't installed worked as intended here. devtools and usethis basically assume that when you are working on a package, you have all of its dependencies installed locally. I think it makes more sense for you to install |
I created a package and initialised renv. I was using
use_dev_package("funspotr")
to add the{funspotr}
package to theDESCRIPTION
. No matter how I specified it e.g. even as:use_dev_package("funspotr", remote = "git::https://github.com/brshallo/funspotr.git")
usethis
would say the package wasn't installed and if I chose to install the package it would go to CRAN, where it obviously wouldn't find it and then would fail.I think if
use_dev_package
is trying to install a package it should try and install it fromremote
, if remote isn't specified the user should be prompted to enter one.The text was updated successfully, but these errors were encountered: