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

renv / install.packages ignore requested repo #1888

Open
cportner opened this issue Apr 30, 2024 · 2 comments
Open

renv / install.packages ignore requested repo #1888

cportner opened this issue Apr 30, 2024 · 2 comments
Milestone

Comments

@cportner
Copy link

arrow currently has an issue when the Mac version has heavily restricted capabilities. The recommended solution is to download from https://apache.r-universe.dev. However, if I use

install.packages("arrow", repos = "https://apache.r-universe.dev")

from within a renv-enabled project, install.packages keeps using the cran version. This persisted after deleting the package and using renv::purge("arrow"). The only way I could finally get the r-universe version installed was to close the project, install arrow when renv was not loaded, and then go back to the project and install arrow again.

The expected behavior is that renv honors a requested repo.

@kevinushey
Copy link
Collaborator

I'm not able to reproduce:

> renv::install("arrow", repos = c(apache = "https://apache.r-universe.dev"))
# Downloading packages -------------------------------------------------------
- Downloading arrow from apache ...             OK [file is up to date]
Successfully downloaded 1 package in 1.3 seconds.

The following package(s) will be installed:
- arrow [15.0.1]
These packages will be installed into "~/Library/R/arm64/4.3/library".

Can you provide more details?

@cportner
Copy link
Author

cportner commented May 1, 2024

I think I see what is going on. The manual makes it seem like you can simply provide the URL for the repo, but that does not appear to be enough. Not sure if this is specific to r-universe, but it is not very transparent what you need to do.

When I do not specify the repos as a vector with apache = URL package installation reverts to cran.

Screenshot 2024-05-01 at 14 21 15 Screenshot 2024-05-01 at 14 22 22

However, if I specify "apache = URL" it does load it from r-universe:

Screenshot 2024-05-01 at 14 23 45

If the problem is that I am trying to load from a subdomain (apache in this case), would it not make sense for renv and install packages to infer that this is, in fact, the domain I want to use?

@kevinushey kevinushey added this to the 1.1.0 milestone May 17, 2024
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

2 participants