ropenscilabs / r2readthedocs

Convert R package documentation to a 'readthedocs' website
https://docs.ropensci.org/r2readthedocs/
15 stars 0 forks source link

deprecation error when using r2readthedocs #15

Closed abhosekar closed 4 months ago

abhosekar commented 4 months ago

Hi, I am running the following two commands

path <- rtd_dummy_pkg ()
r2readthedocs (path)

and I get the following error:

Error in file_path_as_absolute(dir) :
  'x' must be a single character string
In addition: Warning message:
'Rd2md::Rd2markdown' is deprecated.
Use 'as_markdown' instead.
See help("Deprecated") and help("Rd2md-deprecated").

Here is the traceback

> traceback()
11: stop("'x' must be a single character string")
10: file_path_as_absolute(dir)
9: .get_package_metadata(pkgdir)
8: tools::loadPkgRdMacros(pkg_path)
7: parse_rd_file(path, pkg_path)
6: read_rdfile(rdfile)
5: as_markdown(read_rdfile(rdfile))
4: cat(as_markdown(read_rdfile(rdfile)), file = outfile, append = append)
3: Rd2md::Rd2markdown(f, outfile = fout)
2: convert_man(path)
1: r2readthedocs(path)

I get the same error with R 4.3.2 on Windows and R 4.4 on Linux.

mpadge commented 4 months ago

Thanks @abhosekar for catching that. I've updated similar code elsewhere, but a smooth transition requires the Rd2md package to first be updated on CRAN, to incorporate these changes. I'll fix here in the meantime by installing remote version of Rd2md, but will leave this issue open until Rd2md has been updated