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

Ability to declare a non-cran dependency #2094

Open
gaborcsardi opened this issue Feb 20, 2025 · 2 comments
Open

Ability to declare a non-cran dependency #2094

gaborcsardi opened this issue Feb 20, 2025 · 2 comments

Comments

@gaborcsardi
Copy link

It would be nice to be able to declare a non-cran dependency, in a way that is detected by dependencies(), without creating a full DESCRIPTION file.

One way would be to put something like

# pak::pak("user/repo@branch")
library(repo)

into a deps.R file. AFAIK people already use these files as a convention to declare undetected CRAN(-like) dependencies, so this would be a natural addition.

We could also have an alternative syntax with renv::install(...) instead of the pak() call.

@kevinushey
Copy link
Collaborator

kevinushey commented Feb 21, 2025

Spitballing, but some ideas:

library(package)  #* user/repo@branch

Alternatively, we could use some different function for loading packages and encode the remote as part of the call, e.g.

uses(
  package = "user/repo@branch",
  ...
)

@gaborcsardi
Copy link
Author

I think there is value in being able to copy-paste the installation command, hence the pak::pak() and renv::install() syntax.

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