roxygen2 icon indicating copy to clipboard operation
roxygen2 copied to clipboard

Think about methods for generics in suggested packages

Open hadley opened this issue 4 years ago • 8 comments

e.g. https://dbplyr.tidyverse.org/reference/pivot_longer.tbl_lazy.html — the tidyr methods look different to the others because (as far as roxygen2 knows), they're not actually methods.

hadley avatar Feb 17 '21 13:02 hadley

Need to standardise and/or document hack to load packages before roxygenise() is run: https://github.com/tidyverse/dtplyr/blob/master/DESCRIPTION#L42

hadley avatar Apr 16 '21 12:04 hadley

There is

Roxygen: list(packages = "foobar")

now. Isn't that good?

gaborcsardi avatar Apr 16 '21 12:04 gaborcsardi

I know I tried that for dtplyr and I'm pretty sure it didn't work.

hadley avatar Apr 16 '21 12:04 hadley

Is that because you need to attach the package? I am fairly sure that the loading works.

gaborcsardi avatar Apr 16 '21 12:04 gaborcsardi

Yeah, that's it.

hadley avatar Apr 16 '21 13:04 hadley

We can attach packages then maybe?

gaborcsardi avatar Apr 16 '21 13:04 gaborcsardi

Yeah, that should be relatively harmless I'd think.

hadley avatar Apr 16 '21 13:04 hadley

The original goal of the packages field was to load packages that provided other roclets, but it doesn't seem like attaching these packages will cause harm and creating another field seems like overkill.

hadley avatar Apr 18 '22 13:04 hadley