revdepcheck icon indicating copy to clipboard operation
revdepcheck copied to clipboard

Increase flexibility of package specification

Open HenrikBengtsson opened this issue 8 years ago • 13 comments

Why no option for recursively checking the reverse dependency tree, cf. devtools::revdep_check(..., recursive = TRUE)?

HenrikBengtsson avatar Aug 06 '17 08:08 HenrikBengtsson

Simply, we are not doing this. Probably not very hard to implement, PRs are welcome.

On 6 Aug 2017 09:07, "Henrik Bengtsson" [email protected] wrote:

Why no option for recursively checking the reverse dependency tree, cf. devtools::revdep_check(..., recursive = TRUE)?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/r-lib/revdepcheck/issues/69, or mute the thread https://github.com/notifications/unsubscribe-auth/AAoTQA5tp_U2OFTB2-ynuGzm8b055iJuks5sVXRJgaJpZM4Ouqp1 .

gaborcsardi avatar Aug 06 '17 16:08 gaborcsardi

This would be very handy for pillar, we have 5 direct revdeps and hundreds of packages that may be affected by a change. (And CRAN will complain.)

krlmlr avatar Jan 11 '18 14:01 krlmlr

It might also be useful to allow only selected recursive deps - e.g. for pillar, tibble is the most important to check.

hadley avatar Jan 11 '18 14:01 hadley

Yeah, I'd just check reverse imports recursively (tibble, sf, and tsibble), not suggests, enhances, or linking-to.

krlmlr avatar Jan 11 '18 14:01 krlmlr

I also think recursive=n would be helpful, with recursive=0/FALSE and recursive=Inf/TRUE.

As an ad-hoc workaround, I've emulated recursive=1 as:

revdep_check()
revdep_add(packages = recursive_pkg_children)
revdep_check()

Hence https://github.com/r-lib/revdepcheck/issues/109#issuecomment-343643984.

HenrikBengtsson avatar Jan 11 '18 16:01 HenrikBengtsson

Considering that revdep_add() can add any package, and it is easy to look up reverse dependencies, I think what you need is relatively easy, without an explicit recursive argument, no?

gaborcsardi avatar Jan 11 '18 18:01 gaborcsardi

I agree, revdep_check() might be doing too much already. But it feels odd that I need to revdep_check(dependencies = character()) to initialize the revdep directory before I can revdep_add(). (Or is there a simpler way?) Also, I don't know off the top of my head how to enumerate revdeps with bioc = TRUE.

@HenrikBengtsson: Would you mind sharing your code to compute recursive_pkg_children?

krlmlr avatar Jan 11 '18 18:01 krlmlr

I don't have a function for recursive_pkg_children - I've done it manually this far.

HenrikBengtsson avatar Jan 11 '18 19:01 HenrikBengtsson

revdepcheck:::cran_revdeps("igraph", bioc = TRUE)

gaborcsardi avatar Jan 11 '18 19:01 gaborcsardi

I am not totally against this, but I just would not go crazy about the various options, because I am just not sure if it is worth it.

gaborcsardi avatar Jan 11 '18 19:01 gaborcsardi

@gaborcsardi: Thanks. This and a revdep/check.R file should do the job for now.

krlmlr avatar Jan 11 '18 20:01 krlmlr

Here's my check.R: https://github.com/r-lib/pillar/blob/390d17c38fbe3e08dac57bc1132c874429bc0cf6/revdep/check.R

Not pretty, and very slow, but seems to do the job. I now see that we need an option to limit the depth, now checking 4000 packages that have an import/depends chain that points to pillar.

krlmlr avatar Jan 12 '18 00:01 krlmlr

I think we should copy the interface of cloud_check() so that revdep_check() gets an explicit packages argument. Then you're free to add whatever packages you want (e.g. a random sample of revdeps).

hadley avatar May 02 '20 13:05 hadley