tidyverse / rvest

Simple web scraping for R
https://rvest.tidyverse.org
Other
1.49k stars 341 forks source link

Include R6 as Suggests? #371

Closed MichaelChirico closed 7 months ago

MichaelChirico commented 1 year ago

R6 is a build-time dependency of rvest, e.g.

https://github.com/tidyverse/rvest/blob/8e19075c54fdd8391873c5df454c8e6deb0a2230/R/text.R#L189

This is a place where R's dependency system is a bit lacking in detail. AIUI CRAN rules don't specify anything about declaring build-time dependencies, and I haven't seen anything in WRE that describes rules either. See also https://github.com/RcppCore/Rcpp/issues/1254.

So I don't think there's any rule saying 'R6' needs to be mentioned in the DESCRIPTION; nor is there any tooling to help make sure this list is up-to-date*. But still I think it's good practice that R6 should be mentioned somewhere in DESCRIPTION. I think the most natural place to do so is in 'Suggests'.

*That's not quite true. The reason I discovered this is with an extended version of R CMD check I wrote that runs tools:::.check_packages_used(dir = pkg_dir), which will flag the usage (but not surface it in R CMD check, not sure why)

hadley commented 1 year ago

It is? https://github.com/tidyverse/rvest/blob/chromote/DESCRIPTION#L30

hadley commented 1 year ago

Ooops, it is in that branch