actions icon indicating copy to clipboard operation
actions copied to clipboard

Adding covr as an extra-package in setup-r-dependencies fails

Open edmondop opened this issue 2 years ago • 3 comments

I am trying to add COVR as a code coverage library, and the setup-libraries will now fail with the following error: covr: dependencies must be TRUE, FALSE, NA or a list of dependency types

This is my failing step:

      - uses: r-lib/actions/setup-r-dependencies@v2
        with:
          extra-packages: any::rcmdcheck, covr
          needs: check

The doc says: "extra-packages - One or more extra package references to install. Separate each reference by newlines or commas for more than one package."

Run r-lib/actions/setup-r-dependencies@v2
Run ## Installing pak
Installing pak
Dependency resolution
  The downloaded source packages are in
  	‘/tmp/Rtmpg38hoJ/downloaded_packages’
  ℹ Creating lockfile '.github/pkg.lock'
  
  ✔ Updated metadata database: 3.31 MB in 7 files.
  
  ℹ Creating lockfile '.github/pkg.lock'
  ℹ Updating metadata database
  ✔ Updating metadata database ... done
  
  ℹ Creating lockfile '.github/pkg.lock'
  ✖ Creating lockfile '.github/pkg.lock' [8.3s]
  
  
  Error: Error: <callr_remote_error: Cannot install packages:
  * covr: dependencies must be TRUE, FALSE, NA or a list of dependency types>
   in process 9588 
  -->
  <simpleError: Cannot install packages:
  * covr: dependencies must be TRUE, FALSE, NA or a list of dependency types>
  
   Stack trace:
  
   12. (function (...)  ...
   13. base:::withCallingHandlers(cli_message = function(msg) { ...
   14. get("lockfile_create_internal", asNamespace("pak"))(...)
   15. prop$stop_for_solution_error()
   16. private$plan$stop_for_solve_error()
   17. pkgdepends:::pkgplan_stop_for_solve_error(self, private)
   [18](https://github.com/.../runs/5605644266?check_suite_focus=true#step:6:18). base:::stop("Cannot install packages:\n", msg, call. = FALSE)
   19. base:::.handleSimpleError(function (e)  ...
   20. h(simpleError(msg, call))
   21. base:::stop(e)
   22. (function (e)  ...
  
   x Cannot install packages:
  * covr: dependencies must be TRUE, FALSE, NA or a list of dependency types 
  
  Execution halted
  Error: Process completed with exit code 1.

edmondop avatar Mar 22 '22 18:03 edmondop

This is probably a bug, but can you try any::covr, which is better, anyway?

gaborcsardi avatar Mar 22 '22 18:03 gaborcsardi

It worked! thank you so much :) What does adding any:: imply?

edmondop avatar Mar 22 '22 18:03 edmondop

https://github.com/r-lib/actions/tree/v2-branch/setup-r-dependencies#extra-packages-and-the-any-prefix

gaborcsardi avatar Mar 22 '22 19:03 gaborcsardi

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

github-actions[bot] avatar Nov 04 '22 13:11 github-actions[bot]