Adding `testthat` to `Suggests` and `external.packages` snapshots dependencies
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
If I add the package testthat to both external.packages in packrat/packrat.opts and the Suggests-field in the DESCRIPTION the dependencies of testthat are included in the snapshot. This seems unnecessary as one could assume that the external package will take care of its own dependencies.
Steps to reproduce:
- Create a plain new project in RStudio.
- Enable packrat while excluding testthat
- Add
Suggests: testthattoDESCRIPTION - Run:
> packrat::snapshot()
Adding these packages to packrat:
_
R6 2.2.2
crayon 1.3.2
digest 0.6.12
magrittr 1.5
praise 1.0.0
Note that the directory packrat/lib doesn't contain any installed packages except packrat itself, a subsequent packrat::restore does install the dependencies.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the snapshot behavior involving packrat/packrat.opts and the Suggests field in DESCRIPTION. Reproduce the steps with testthat excluded, then compare the packages recorded by packrat::snapshot() with those installed by packrat::restore(). Done means external packages do not cause their own dependencies to be added unnecessarily to the snapshot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100