Coder Social home page Coder Social logo

Comments (4)

kevinushey avatar kevinushey commented on September 7, 2024 1

I've made a change to ensure the path suffix is consistent:

> renv_paths_cache()
[1] "~/Library/Application Support/renv/cache/R-3.5/v2"

> Sys.setenv(RENV_PATHS_CACHE = tempfile("renv-cache-"))
> renv_paths_cache()
[1] "/var/folders/qt/txb728ms5012wp_4yn369wth0000gn/T//RtmpVH36He/renv-cache-66933cb1f745/R-3.5/v2"

This does invalidate the old cache so old projects will need to be updated.

from renv.

cderv avatar cderv commented on September 7, 2024

After using further the new version of renv and installing new package with renv::install, I have now a renv/cache and other at root directory (binary, and repos)

packageVersion("renv")
#> [1] '0.2.0.68'
renv:::renv_paths_cache()
#> [1] "C:\\Users\\chris\\AppData\\Local/renv/cache/R-3.5/v2"
renv:::renv_cache_list()
#> [1] "C:\\Users\\chris\\AppData\\Local/renv/cache/R-3.5/v2/brew/1.0-6/83a95e35c28b386681e1a05f29fae496/brew/DESCRIPTION"             
#> [2] "C:\\Users\\chris\\AppData\\Local/renv/cache/R-3.5/v2/data.table/1.12.0/6756128aea115cf6aa17db1eab6c51d9/data.table/DESCRIPTION"
library(magrittr)
fs::dir_ls(renv:::renv_paths_common(""))
#> C:/Users/chris/AppData/Local/renv/binary
#> C:/Users/chris/AppData/Local/renv/cache
#> C:/Users/chris/AppData/Local/renv/R-3.5
#> C:/Users/chris/AppData/Local/renv/repos
#> C:/Users/chris/AppData/Local/renv/source

Created on 2019-04-06 by the reprex package (v0.2.1.9000)

I believe the old one is not useful anymore ?

from renv.

kevinushey avatar kevinushey commented on September 7, 2024

Thanks -- this wasn't intentional and should be fixed up now.

> packageVersion("renv")
[1] ‘0.2.0.69> renv_paths_cache()
[1] "~/Library/Application Support/renv/R-3.5/cache/v2"
> Sys.setenv(RENV_PATHS_CACHE = "~/.renv-cache")
> renv_paths_cache()
[1] "~/.renv-cache/R-3.5/v2"

Note that the path format is slightly different when using an environment variable. This is just so that you can reuse the same cache variable across multiple versions of R. Does that make sense? Or should we just use the same path format in each case?

from renv.

cderv avatar cderv commented on September 7, 2024

It make great sense to be able to reuse a cache environment variable across version. This path make sense "~/.renv-cache/R-3.5/v2" but we would expect the usual path to be "~/Library/Application Support/renv/cache/R-3.5/v2". 🤔

Currently We will have two different directory trees depending of use of environment variable or not...

  • renv_path_root/R_version/cache_name/cache_ver
  • renv_path_cache/R_version/cache_ver

Reading about env var I would have thought
RENV_PATH_CACHE ↔️ RENV_PATH_ROOT/CACHE_NAME

Is only cache directory sensitive to R version or also boostrap, repos and binary as it seems to be intended now ?

from renv.

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.