-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Renv installation fails with dependency only available in Archive #1735
Comments
I don't think so; this is how CRAN repositories behave as well. Indeed, as you say, once a package has been archived, it's no longer declared or listed in the PACKAGES index, even though older versions are actually available in the Archive.
That's an excellent idea; I hadn't realized that this file is available! I could extend
I think (2) is the right approach, so I'll try to explore that when I'm next working on |
As far as escape hatches go, I believe you should be able to manually install the archived package, and then install the main package, e.g.
Does that work? |
Hey @kevinushey , thank you very much for the detailed reply 🙏 I had a couple of fires to fight, so just managed to come back to this.
Yes, this works 👍 And was the escape hatch I used to setup our original
I also did know about this file until I went down the rabbit hole on this one 😄 ! I might also have some time to work on this at work in the next few weeks, so I'll update here if I make any progress / have any questions. Thank you for confirming that you also think that making use of this information is the correct way to address this. |
@kevinushey I saw that you've added this to the v1.1.0 milestones for renv and that you have an experimental branch working on this feature. Any insight on the status of the feature? |
No more insight yet; I just need to confirm whether or not this change would really be safe to add to |
Hey @kevinushey would be interested in the status here. I am using renv in restoring environments in automated pipelines, so manual interaction (like renv::install) is not really an option. Our internal RSPM also did archive some packages (I am not so familiar with the reasons why and how and for which versions this happens?) and now renv::restore fails within the pipeline for lock-files that contain these packages in "older" (in this case Nov'23, so 15 months) versions. Any ideas? Can we override this behavior with something like Best wishes and thanks for the awesome package! |
I've just merged #1771, which tries to make use of the repository's If not, can you please file a new issue with more details? It would help to know which packages in particular are affected, so I can test. |
I installed and tried - it seems But calling of the functions at least shows:
But in my renv I have 2.3.0 - which is of course older than the latest in the archive, but also still available under "archived" in the Package Manager. Sorry I can't provide an example for a package - it only happened just for our internal packages. |
Hello! Thanks for the great package 🎉
Description of Issue
I'm looking for some guidance on how
renv
handles dependencies stored in the archive of a repo. Specifically we are using Artifactory, and have a packageABC
that isn't available at/src/contrib
on the repo, it's only available at/src/contrib/Archive
. This file doesn't appear in thePACKAGES
index for the repo.From checking through the
renv
source, it seems thatrenv
uses thisPACKAGES
index exclusively to determine what is available on the repo. This means thatrenv::install("ABC", repos="artifactory.example.com/repo")
fails withError: package 'ABC' is not available
.If I do
renv::install("ABC@0.1.2", repos="artifactory.example.com/repo")
(i.e. requesting the specific version that is in the archive. Then this succeeds. From checking the source, this seems to be because specific version installations elicit an additionalrenv
heuristic check in the/Archive
location.So that's good, that we can explicitly fetch the package. However, what I don't know how to handle is when I try to install a package
MainPackage
that depends on the archived packageABC
. In this situation, when I runrenv::install("MainPackage", repos="artifactory.example.com/repo")
,renv
goes to fetch the package dependencies and in the end errors withError: package 'ABC' is not available
.It looks to me that during the dependency fetching,
renv
is only consulting thePACKAGES
index, and therefore doesn't know that theABC
package is available in the archive.Questions
PACKAGES
index somehow? (I should note that the same package is available on public CRAN, and on CRAN it also doesn't appear in thePACKAGES
index, which makes me think that this is not the case. However, I'm relatively new to the R eco system, so def wouldn't put it past myself simply having completely the wrong end of the stick about how these things should be working!)renv
be looking further afield to determine the available packages on a repo? I've noticed while exploring this issue that cranlike repos provide anarchive.rds
file available at/src/contrib/Meta/archive.rds
, shouldrenv
also consult this and add the data to its list of index DB's when determining what packages are available?renv
also be performing its own archive heuristic check (i.e. looking in/Archive
) for packages that don't appear in it's index DB's?Thank you for any insight you can shed on this 🙏 .
renv
is great!The text was updated successfully, but these errors were encountered: