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

Support declaring extra dependencies #459

Closed
jeroen opened this issue Dec 3, 2019 · 4 comments
Closed

Support declaring extra dependencies #459

jeroen opened this issue Dec 3, 2019 · 4 comments
Labels
feature a feature request or enhancement

Comments

@jeroen
Copy link
Member

jeroen commented Dec 3, 2019

As discussed on slack, we want to formalize declaring several types of development dependencies in the description file. These are packages that are not needed to pass check, but used for development. E.g:

  • pkgdown: packages used by pkgdown articles
  • document: packages such as roxygen2 needed to generate manuals

By declaring these, we can automate rendering docs without having to do custom stuff in the travis file, or making these packages a requirement for running CMD check (as Suggests does).

The proposal is to prefix the fields with Config/Depends/ such that they do not trigger a NOTE.

Imports: foo, bar
Suggest: baz
Config/Depends/pkgdown: tidyverse, bench
Config/Depends/coverage: covr
Config/Depends/document: roxygen2

Fields may contain remotes syntax like cran::dplyr@0.8.2, r-lib/roxygen@branch.

We generalize the dependencies parameter from the remotes::install_...() functions to support these custom dependencies such as "pkgdown".

One open question is the dependency relationship between the dependency types :) For example:

remotes::install_github("dplyr", dependencies = "pkgdown")

This should probably dependencies in Config/Depends/pkgdown plus hard dependencies (Depends, Imports, LinkingTo), but not maybe Suggests (which are mostly required to run tests)?

@gaborcsardi
Copy link
Member

I think "pkgdown" should only install Config/Depends/pkgdown, to be able to express everything. In general, if it is a character vector, then it should only install the specified stuff.

So for your site you would typically do c("hard", "soft", "pkgdown").

We can also have "all", to install absolutely everything (non-recursively of course), and TRUE would mean c("hard", "soft"), like it already does.

@maelle
Copy link
Contributor

maelle commented Dec 16, 2019

I was wondering why usethis::use_coverage() added covr to Suggests (even if covr is only needed on Travis), and I suppose the proposal by Jeroen would mean that could be avoided?

@hadley
Copy link
Member

hadley commented Feb 24, 2020

I wonder if Config/Needs/... would be slightly better than Config/Depends/... since it avoids the existing meaning of the "Depends" field.

@jimhester
Copy link
Member

Closed by #483

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

5 participants