rstudio / rstudio/packrat

packrat gives very little information when a package is not compatible with R

Open
#302 2 comments 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

knitr-1.13 requires R greater than 3.0.2. However, when running packrat::restore against a project which demands knitr-1.13 on a system using R-3.0.2, we get very little output about the reason for the failed install.

Here is the output when attempting to install knitr from CRAN on R-3.0.2:

> install.packages(c("knitr"),repos="https://cran.rstudio.com/")
Installing package into ‘/home/vagrant/R’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib
Warning message:
package ‘knitr’ is not available (for R version 3.0.2)

Here is the output when attempting to install from source:

> install.packages("knitr_1.13.tar.gz",type="source",repos=NULL)
Installing package into ‘/home/vagrant/R’
(as ‘lib’ is unspecified)
ERROR: this R is version 3.0.2, package 'knitr' requires R > 3.0.2
Warning message:
In install.packages("knitr_1.13.tar.gz", type = "source", repos = NULL) :
  installation of package ‘knitr_1.13.tar.gz’ had non-zero exit status

Here is the output from packrat::restore (trimmed):

Installing knitr (1.13) ...
curl: (22) The requested URL returned error: 404 Not Found
curl: (22) The requested URL returned error: 404 Not Found
curl: (22) The requested URL returned error: 404 Not Found
curl: (22) The requested URL returned error: 404 Not Found
curl: (22) The requested URL returned error: 404 Not Found
FAILED
Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePkgs,  :
  Couldn't find source for version 1.13 of knitr

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

Reproduce packrat::restore for knitr 1.13 in an R 3.0.2 environment and compare its output with the direct source installation error shown in the issue. Trace the restore failure from “Installing knitr (1.13) ...” through the missing-source error; done means the output explains that the package is incompatible with the installed R version.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.