holepunch icon indicating copy to clipboard operation
holepunch copied to clipboard

Error with `write_compendium_description()`

Open bitbacchus opened this issue 4 years ago • 6 comments

What I did

  1. I created a new package in RStudio and added three folders: Data, R and Analysis:

Screenshot from 2020-05-22 14-03-33

(tried on R 3.6.3 and R 4.0.0)

  1. In the R folder I added an R script:

Screenshot from 2020-05-22 14-05-27

  1. I tried to generate a DESCRIPTION file
> 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

bitbacchus avatar May 22 '20 12:05 bitbacchus

I am seeing the same issue with my own repo (https://github.com/jperkel/covidlit), thank you.

jperkel avatar Jun 11 '20 17:06 jperkel

Thanks both. This is a known issue and will be fixed next week. You can downgrade usethis to fix this issue temporarily.

karthik avatar Jun 12 '20 19:06 karthik

@karthik Which version of usethis should fix the problem?

nuest avatar Jun 24 '20 13:06 nuest

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.

karthik avatar Jun 25 '20 02:06 karthik

same for me. Tried downgrading usethis to 1.5.0, but same problem then.

nxskok avatar Jul 11 '20 01:07 nxskok

@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.

karthik avatar Jul 11 '20 01:07 karthik