Giter VIP home page Giter VIP logo

Comments (11)

lorenzwalthert avatar lorenzwalthert commented on July 27, 2024

Thanks for the report. What's your R version? And is the repo you try to use {precommit} with a public one?

from precommit.

AliSajid avatar AliSajid commented on July 27, 2024

Hi. Thank you. I'm using R 4.2.2.

from precommit.

AliSajid avatar AliSajid commented on July 27, 2024

Hi. Pinging as I am still running into this and I am close to submitting the packages to BioConductor

from precommit.

lorenzwalthert avatar lorenzwalthert commented on July 27, 2024

Is this a public repo so I can try to reproduce the problem myself?

from precommit.

AliSajid avatar AliSajid commented on July 27, 2024

Oh absolutely. CogDisResLab/drugfindR

from precommit.

lorenzwalthert avatar lorenzwalthert commented on July 27, 2024

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.

lorenzwalthert avatar lorenzwalthert commented on July 27, 2024

Another alternative is to delete all renv caches, but I don't know how that works.

from precommit.

AliSajid avatar AliSajid commented on July 27, 2024

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.

lorenzwalthert avatar lorenzwalthert commented on July 27, 2024

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.

AliSajid avatar AliSajid commented on July 27, 2024

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.

lorenzwalthert avatar lorenzwalthert commented on July 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.