Skip to content

Ability to declare a non-cran dependency #2094

Open

Description

@gaborcsardi

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.

Activity

  1. kevinushey commented on Feb 21, 2025

    @kevinushey
    Collaborator

    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",
      ...
    )
  2. gaborcsardi commented on Feb 21, 2025

    @gaborcsardi
    Author

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

  3. MilesMcBain commented on Apr 11, 2025

    @MilesMcBain

    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",
    ...
    )

    This looks quite similar to @anthonynorth's {using}, which I ended up supporting in {capsule} for this purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions