Closed SimonDedman closed 1 year ago
Hi @SimonDedman, thanks a lot for checking development version installation; i'm preparing for a "quick" fix to the previous CRAN release.
It looks like the errors were due to some packages ({alluvial} and {ggfittext}) not being installed that are required to build the vignettes. Those packages are listed under Suggests:
rather than under Imports:
in the DESCRIPTION, which i understand to be the correct policy for packages that are only required for vignettes. Could you install those packages and try again?
That works. However I'd have a think about whether it's more important to follow the advised policy for suggests vs imports, if doing so causes the install to fail. If the expected pathway is: user installs package, fails, searches bug page, finds this thread, follows instructions, tries again... that might cause you more hassle than it's worth? And that's assuming folks do those steps rather than starting their own thread, emailing you directly, or just giving up.
I could be wrong, but my understanding / memory is that having packages listed under Imports:
that are only used in vignettes results in a note or warning that prevents publication on CRAN. (I'll make a point to test this.) In any event, the R package guide provides the core reasons to follow this practice, which i agree with—i don't want someone to be unable to use {ggalluvial} because they don't have {ggfittext} installed, for example.
One thing to note is that you can specify dependencies = TRUE
in remotes::install_github()
(as in install.packages()
) to install packages listed under Suggests:
as well as those necessary for the package to function. This should prevent having to run a second set of installs after one fails with build_vignettes = TRUE
. Though, as you say, someone new to the subtlety will still easily make the mistake once. (Ultimately, i think any R user will eventually have to deal with error messages like this that are a few levels deep and require help, if only through searching the email lists or Q&A fora. My experience convinces me that having some interaction with the developer community is part of being a regular user.)
> remotes::install_github("corybrunson/ggalluvial@main", build_vignettes = TRUE)
Packages updated beforehand, CRAN install worked fine immediately after.