packrat should be forgiving about Repository setting
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
Currently, a packrat lockfile can look like:
PackratFormat: 1.4
PackratVersion: 0.4.8.51
RVersion: 3.3.3
Repos: NAME1=http://<some_repo>
Package: ISLR
Source: NAME2
Version: 1.2
Hash: 548250b957790df34ba5cb9387b740c1
Notice how the Source: Repo doesn't match the name of the recorded Repos. This causes restore to fail unless NAME2 happens to be CRAN.
Instead, packrat should always try to install packages from the Repos listed if a package record is from a CRAN-like repo (as determined during snapshot):
https://github.com/rstudio/packrat/blob/master/R/pkg.R#L323-L324
This type of lockfile happens when a client has a different name for their repo than the actual name of the repo housing the package, which is completely acceptable in R. Packrat works if the package source is CRAN, but is less forgiving otherwise.
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 at R/pkg.R lines 323-324 and inspect how snapshot records CRAN-like sources and restore resolves Repos entries. Reproduce the behavior with the lockfile shown, then verify that restore installs ISLR from a listed Repos entry despite the Source name mismatch.
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
- Clearly specified
- Newbie friendliness
- 50/100