nmfs-fish-tools / ghactions4r

Reusable github actions workflows for R packages
https://nmfs-fish-tools.github.io/ghactions4r/
12 stars 1 forks source link

installation of dependencies in doc-and-style causing problems? #69

Closed iantaylor-NOAA closed 1 year ago

iantaylor-NOAA commented 1 year ago

Hi @k-doering-NOAA, Thanks for the continued usefulness of {ghactions4r} and sorry to bug you with a problem.

A recent change in r4ss to use importFrom of specific functions within {kableExtra} rather than the whole package (which caused a conflict with dplyr, see https://github.com/r4ss/r4ss/pull/819).

Now, the call-doc-and-style workflow is failing with the error Error: Error in load_imports(path) : The package "kableExtra" is required. Looking back through the action messages, I see (at this point):

ERROR: dependency ‘rvest’ is not available for package ‘kableExtra’
* removing ‘/home/runner/work/_temp/Library/kableExtra’

This is not an error in other packages or locally on my machine. @kellijohnson-NOAA wisely pointed out that the dependency installation might be different in doc-and-style than in other actions, and indeed, I see the use of remotes::install_deps(dependencies = TRUE) at https://github.com/nmfs-fish-tools/ghactions4r/blob/eb8b6fb50fbc533efe861b56b010ee2fe716a408/.github/workflows/doc-and-style-r.yml#L50 as opposed to the r-lib/actions/setup-r-dependencies used in doc-and-style prior to https://github.com/nmfs-fish-tools/ghactions4r/commit/eb8b6fb50fbc533efe861b56b010ee2fe716a408 as well as in other yml files. I don't know the history that prompted the change, but before that commit, doc-and-style was using setup-r-dependencies@v1 whereas others are using v2 (e.g. r-cmd-check). Would it be worth trying `setup-r-dependencies@v2 to see if that works for whatever cases necessitated the change as well as fixing the r4ss action?

k-doering-NOAA commented 1 year ago

@iantaylor-NOAA thanks so much! I think I missed this one when I updated all the other workflows to use setup-r-dependencies@v2 and replacing it (already merged in) seems to work- I just ran doc and style on the r4ss main branch manually and it worked fine, generating https://github.com/r4ss/r4ss/pull/821

Feel free to reopen if problems pop up.

iantaylor-NOAA commented 1 year ago

Looks good. Thank you for dealing with this!