ropensci-review-tools / pkgstats

Historical statistics of every R package ever
https://docs.ropensci.org/pkgstats/
17 stars 1 forks source link

`ctags_install()` fails due to unused argument `fileext` which should be `ext` #74

Closed thomaszwagerman closed 1 month ago

thomaszwagerman commented 1 month ago

Running ctags_install() on Ubuntu 24.04 fails:

> pkgstats::ctags_install()
Cloning into 'ctags'...
Error in fs::file_temp(pattern = "ctags-make-", fileext = ".txt") : 
  unused argument (fileext = ".txt")

See below:

https://github.com/ropensci-review-tools/pkgstats/blob/e6c0d98c38f0fa26693b67f3af1b2a427f9added/R/ctags-install.R#L48

On inspection, fs::file_temp() actually expects ext rather than fileext.

See fs::file_temp(): https://github.com/r-lib/fs/blob/2807019e843c956b508ba79fd001a9d1c0e460e0/R/temp.R#L42

I see why this is confusing, because base's tempfile() uses the fileext argument.

Happy to open a PR. I assume fs::file_temp() should be used, and the argument changed from fileext to ext but checking first whether should tempfile() should be used instead?

thomaszwagerman commented 1 month ago

On inspection, fs::file_temp() is used with ext in other files, opening a PR.

mpadge commented 1 month ago

thanks for this @thomaszwagerman, and sorry for any inconvenience.

mpadge commented 1 month ago

Also note that you now appear proudly on the allcontributors section of this package. Thanks!

thomaszwagerman commented 1 month ago

No worries, thank you!