holepunch
holepunch copied to clipboard
Error with `write_compendium_description()`
What I did
- I created a new package in RStudio and added three folders: Data, R and Analysis:

(tried on R 3.6.3 and R 4.0.0)
- In the R folder I added an R script:

- I tried to generate a
DESCRIPTIONfile
> holepunch::write_compendium_description()
Finding R package dependencies ... Done!
Error: text is not a character vector
What happened
No DESCRIPTION file generated
What you expected to happen
A DESCRIPTION file ;-)
Some breadcrumbs that might help (hopefully)
I tried to track down where in the write_compendium_description() function the error occurs. It seems to be here: https://github.com/karthik/holepunch/blob/32479f8da69ea426fe9ca0ca64518b60456cf909/R/write_compendium_description.R#L85
Apparently, the function desc::description expects a character vector as input and complains about it. desc is indeed not a vector:
> class(desc)
[1] "description" "R6"
The desc object looks like this (Depends: is missing)
> desc
Package: CompendiumCompendium title0.0.1Compendium
descriptionlandscapemetrics
Title: What the Package Does (One Line, Title Case)
Version: 0.0.0.9000
Authors@R (parsed):
* First Last <[email protected]> [aut, cre] (<https://orcid.org/YOUR-ORCID-ID>)
Description: What the package does (one paragraph).
License: `use_mit_license()`, `use_gpl3_license()` or friends to
pick a license
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.0
I hope you can help me :-)
Thanks,
Sebastian
I am seeing the same issue with my own repo (https://github.com/jperkel/covidlit), thank you.
Thanks both. This is a known issue and will be fixed next week. You can downgrade usethis to fix this issue temporarily.
@karthik Which version of usethis should fix the problem?
1.51 or below should work. I'm hoping to carve out time to resolve the bug this week and usethis will no longer be a problem.
same for me. Tried downgrading usethis to 1.5.0, but same problem then.
@nxskok Are you on R 4.0? If so there is another small piece that's part of the fix. I truly am striving to get this fixed asap.