rstudio / rstudio/packrat

Option repo not reset when packrat is off

Open
#423 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.