Option repo not reset when packrat is off
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
When packrat::on(), the repo is set to the one in packrat.lock replacing the current one
https://github.com/rstudio/packrat/blob/b13dcaad6f1dc3ee0e2d0dd8e5f12d974bac27b4/R/packrat-mode.R#L187-L191
However, when packrat::off(), it seems it is not reset in setPackratModeOff.
Could be a good idea to add the repo option in the current state saved by packrat and restore it when leaving packrat. Currently, I need to reset manually the option after a packrat::off()
What do you think?
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 in R/packrat-mode.R, comparing the repo option handling around the linked packrat mode code with setPackratModeOff. Trace how packrat saves and restores state, then verify that packrat::off() restores the repo option instead of leaving the packrat.lock repository active.
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
- 35/100