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

named remotes cause renv::init() to fail #2055

Closed
kevinushey opened this issue Dec 6, 2024 · 3 comments
Closed

named remotes cause renv::init() to fail #2055

kevinushey opened this issue Dec 6, 2024 · 3 comments

Comments

@kevinushey
Copy link
Collaborator

it seems the following syntax (used to tell renv which remotes belong to which package #1755) is not recognised by all components of renv:

Assume a DESCRIPTION. (studies/study2 in the repository above):

Depends:
    pkg1
Remotes:
    pkg1=github::mcanouil/renv-issue1977:src/packages/pkg1@pkg1-latest
renv::init()
This project contains a DESCRIPTION file.
Which files should renv use for dependency discovery in this project? 

1: Use only the DESCRIPTION file. (explicit mode)
2: Use all files in this project. (implicit mode)

Selection: 1
- Using 'explicit' snapshot type. Please see `?renv::snapshot` for more details.

Error in FUN(X[[i]], ...) : object of type 'closure' is not subsettable
Traceback (most recent calls last):
6: renv::init()
5: hydrate(library = library, repos = repos, prompt = FALSE, report = FALSE, 
       project = project)
4: renv_project_remotes(project, filter = filter, resolve = TRUE)
3: filter(specs, remotes)
2: map_chr(remotes, `[[`, "Package")
1: vapply(x, f, ..., FUN.VALUE = character(1))

Originally posted by @mcanouil in #1977

@mcanouil
Copy link
Contributor

mcanouil commented Dec 7, 2024

Does it also cover the "install" choice from renv::snapshot()? It does not seem so in the same Git repository using the main version.

Image

renv::restore() and renv::hydrate() seem to work as expected.

@kevinushey
Copy link
Collaborator Author

Thanks for catching that -- I believe 0e3da0a should resolve the issue, with the declared remote version of pkg1 being installed in this scenario.

@mcanouil
Copy link
Contributor

I confirmed there are no errors anymore.
Thanks!

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