rstudio / rsconnect

Publish Shiny Applications, RMarkdown Documents, Jupyter Notebooks, Plumber APIs, and more
http://rstudio.github.io/rsconnect/
129 stars 79 forks source link

use "fake" packages for test dependencies #1011

Closed aronatkins closed 8 months ago

aronatkins commented 9 months ago

We should follow the example of renv and create a fake on-disk repository that contains the packages that are required by test content.

This would include at least:

For example, renv uses these packages: https://github.com/rstudio/renv/tree/main/tests/testthat/packages

This is wired in with: https://github.com/rstudio/renv/blob/63f3073aa60937498bc7d3f8a5a242bded237d4b/tests/testthat/helper-scope.R#L2-L59

The on-disk repository is created during setup: https://github.com/rstudio/renv/blob/63f3073aa60937498bc7d3f8a5a242bded237d4b/tests/testthat/helper-setup.R#L151-L231

We can undo the changes from https://github.com/rstudio/rsconnect/pull/1010 with this change.

hadley commented 8 months ago

Or, and bear with me here, we don't do that, because it's probably harmless to skip these tests on CRAN, and creating a fake repo might be quite a bit of work? 😄

aronatkins commented 8 months ago

I'm feeling the same (skip on CRAN). I created this issue while chatting with @kevinushey to enumerate other options to #1010. Closing; we can revisit if we uncover other reasons to use this type of isolation.