rstudio / packrat

Packrat is a dependency management system for R
http://rstudio.github.io/packrat/
401 stars 89 forks source link

errors from R CMD check #636

Open aronatkins opened 3 years ago

aronatkins commented 3 years ago
══ Warnings ════════════════════════════════════════════════════════════════════
── Warning (test-local-repositories.R:8:5): init fails when package not found in any repo ──
path[1]="repo-empty": No such file or directory
Backtrace:
 1. base::options(repos = c(CRAN = paste0("file:///", normalizePath("repo-empty")))) test-local-repositories.R:8:4
 3. base::normalizePath("repo-empty")

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure (test-packrat.R:95:5): snapshot captures new dependencies ───────────
"bread" %in% pkgs is not TRUE

`actual`:   FALSE
`expected`: TRUE 
── Failure (test-packrat.R:96:5): snapshot captures new dependencies ───────────
"toast" %in% pkgs is not TRUE

`actual`:   FALSE
`expected`: TRUE 
── Failure (test-packrat.R:120:5): snapshot captures only installed dependecies butwhen infer.dependencies is FALSE ──
"bread" %in% pkgs is not TRUE

`actual`:   FALSE
`expected`: TRUE 

[ FAIL 3 | WARN 1 | SKIP 5 | PASS 134 ]
Error: Test failures
Execution halted

1 error x | 0 warnings ✓ | 0 notes ✓
Error: R CMD check found ERRORs
kevinushey commented 3 years ago
══ Warnings ════════════════════════════════════════════════════════════════════
── Warning (test-local-repositories.R:8:5): init fails when package not found in any repo ──
path[1]="repo-empty": No such file or directory
Backtrace:
 1. base::options(repos = c(CRAN = paste0("file:///", normalizePath("repo-empty")))) test-local-repositories.R:8:4
 3. base::normalizePath("repo-empty")

This probably happens because R removes empty directories during build. We could probably subvert it by adding a single empty file or something similar? Or by creating that directory on demand rather than expecting it to exist.

I don't have a great idea on the other issues, though. :-/

aronatkins commented 3 years ago

The other failures had skip_on_travis but that doesn't work in GHA. They now have skip_on_ci as of https://github.com/rstudio/packrat/pull/638.

Sadly, we now see:

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure (test-dependencies.R:58:3): dependencies are discovered in inline R code ──
"emo" %in% packrat:::fileDependencies(emojiRmd) is not TRUE

`actual`:   FALSE
`expected`: TRUE 
── Failure (test-rmarkdown.R:22:3): We can discover dependencies with an evaluate hook ──
`deps` not equal to c("abc", "def", "ghi", "jkl").
target is NULL, current is character

Unlike the others, these failures do not happen in local "check" runs.