snapshot.sources env var or options is not picked by snapshot() function
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I noticed that setting
Sys.setenv(R_PACKRAT_SNAPSHOT_SOURCES = FALSE)
did not deactivate the snapshot.source in snapshot()
Strangely when trying to debug, I noticed that
https://github.com/rstudio/packrat/blob/965cca1b04f326dc39a95b175ac8383fed3c068e/R/snapshot.R#L300
was always FALSE. Maybe because snapshot.sources arg is passed to snapshotImpl by snapshot()
I will try to work on a reprex and a test to reproduce this and PR a fix
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 by reproducing the issue with Sys.setenv(R_PACKRAT_SNAPSHOT_SOURCES = FALSE) and inspect R/snapshot.R around line 300, including how snapshot() passes snapshot.sources to snapshotImpl. Add a regression test for the environment variable or option, and confirm that snapshot.sources is disabled when it is set to FALSE.
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
- 45/100