Comments (11)
Thanks for the report. What's your R version? And is the repo you try to use {precommit} with a public one?
from precommit.
Hi. Thank you. I'm using R 4.2.2.
from precommit.
Hi. Pinging as I am still running into this and I am close to submitting the packages to BioConductor
from precommit.
Is this a public repo so I can try to reproduce the problem myself?
from precommit.
Oh absolutely. CogDisResLab/drugfindR
from precommit.
I can't reproduce your problem on my macOS M1 4.2.1. I get the output of running hooks (some are failing due to style and other issues) inside the RStudio terminal or on a macOS Terminal app. I recommend $ pre-commit clean
and then run pre-commit install
again, both outside the RStudio terminal.
from precommit.
Another alternative is to delete all renv caches, but I don't know how that works.
from precommit.
So this is unusual. I tried both your suggestions but ran into the same issue. It appears that one of the issues I see is that three packages that hit a 404 now have extensions .tar.gz
and not .tgz
.
Warning: failed to retrieve 'https://packagemanager.rstudio.com/all/latest/src/contrib/R.cache_0.16.0.tgz' [error code 22]
Warning: failed to retrieve 'https://packagemanager.rstudio.com/all/latest/src/contrib/R.methodsS3_1.8.2.tgz' [error code 22]
Warning: failed to retrieve 'https://packagemanager.rstudio.com/all/latest/src/contrib/R.oo_1.25.0.tgz' [error code 22]
Error: failed to retrieve package '[email protected]'
In addition: Warning messages:
1: curl: (22) The requested URL returned error: 404
2: curl: (22) The requested URL returned error: 404
3: failed to retrieve 'https://packagemanager.rstudio.com/all/latest/src/contrib/R.cache_0.16.0.tgz' [error code 22]
4: curl: (22) The requested URL returned error: 404
5: failed to retrieve 'https://packagemanager.rstudio.com/all/latest/src/contrib/R.methodsS3_1.8.2.tgz' [error code 22]
6: curl: (22) The requested URL returned error: 404
Traceback (most recent calls last):
8: renv::restore()
7: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
6: retrieve(packages)
5: handler(package, renv_retrieve_impl(package))
4: renv_retrieve_impl(package)
3: renv_retrieve_repos(record)
2: stopf("failed to retrieve package '%s'", renv_record_format_remote(record))
1: stop(sprintf(fmt, ...), call. = call.)
Execution halted
from precommit.
Yeah I also noted that. I am not familiar enough with CRAN to know what that means. But I don't know if it's unusual. Also, these packages are not archived, i.e. our requirement is the latest version on CRAN. Another thing you can try is to purge and re-install the packages:
purrr::walk(c("[email protected]", "[email protected]", "[email protected]"), function(pkg) {
renv::purge(pkg)
renv::install(pkg)
})
This can be done in any renv or outside an active {renv} project. Maybe this will help? If not, retry wit pre-commit clean
after the purge/install step.
from precommit.
So I used the trick of individually purging and reinstalling the renv packages and ran into more such errors. I repeated the process and now have it running without issue. Thank you.
I'm unsure what the issue was but it is solved now. It may be linked to the "Additional packages" list for the roxygen hook. I'll keep you updated. I think we can resolve this here.
Thank you for the excellent package and your prompt and helpful responses.
from precommit.
Glad it worked for you. Seems like the general solution to delete all renv infra is described in this StackOverflow answer:
root <- renv::paths$root()
unlink(root, recursive = TRUE)
utils::remove.packages("renv")
I still think that maybe the R version is the root cause for the problem. Ie you upgrade R and the linked installed binaries are not there or something like this. Letβs see if others run into this problem too.
from precommit.
Related Issues (20)
- consider using other cran mirror HOT 7
- Child Rmd documents pose problems for parsable-R hook? HOT 2
- Typo in available-hooks.Rmd for lintr warn arg HOT 1
- Roxygenize hook only looks at MRAN; alternative CRAN repos are not specifiable HOT 1
- Error: object 'never' not found on git commit HOT 10
- Different CRAN repositories for different platforms HOT 1
- precommit environment cannot be set up HOT 32
- CI fails for miniconda on Windows HOT 1
- precommit deps-in-desc hook failing after upgrade to R 4.3.0 in renv locked package HOT 12
- Don't rely on any GitHub Packages due to credential issues
- Update codemeta.json if codemeta-description-updated fails HOT 2
- style_file crashes because of docopt when processing single files with spaces in the path HOT 13
- Package digest not available for package R.cache HOT 15
- Roxygenise Hook using language: system
- Problem installing git2r via pre-commit Github Action HOT 7
- Hook execution got much slower
- detect print statements
- `roxygenize` cannot find Bioconductor pkg dependency when setting environment HOT 8
- Make updating `inst/WORDLIST` optional HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from precommit.