Closed aronatkins closed 2 years ago
I smoke tested this and #656 in a merged branch.
I tested the changes by:
external.packages = "packrat"
, which I assume is a requirement for working with local branches);packrat:::appDependencies(".")
and reconnect::writeManifest()
before and after running packrat::set_opts(ignored.packages = c("emo", "Rcpp", "stringr"))
;In both cases, all expected packages were ignored. I didn't find any other issues using basic Packrat functions related to these changes.
Running packrat::snapshot()
, I got an error Error: Unable to retrieve package records for the following packages: - 'packrat'
, which I'm assuming is due to packrat
being listed in external.packages
and/or being built from a local branch.
@toph-allen - I think you're right about the packrat dependency. The .snapshotImpl
function accepts an implicit.packrat.dependency
argument to drop the packrat dependency, but I don't know how best to avoid the snapshot error with a local packrat build. @kevinushey - any testing advice on this?
For Packrat's own tests, we use a dummy repository with a mock version of packrat available:
Could something similar be done for testing here? You could also try appending
Repository: CRAN
to the DESCRIPTION file of the external copy of packrat as well, to convince packrat that packrat is available on a CRAN-like repository.
If not, it might suffice to just add some code to packrat to check whether tests are running, and allow for packrat to be missing while running tests.
previously, we ignored only direct dependencies
Given a Shiny application having:
The default set of dependencies:
Prior to this change, with "emo" and "Rcpp" as ignores, only the top-level "emo" is ignored:
After this change, both "emo" and "Rcpp" are ignored:
If we were to choose a dependency with substantial dependencies, we'll see those dependencies disappear, as well; notice that "stringi" is not included as a result of ignoring "stringr"; neither of these are direct project dependencies: