rstudio / renv

renv: Project environments for R.
https://rstudio.github.io/renv/
MIT License
1.02k stars 155 forks source link

Make `renv` folder hidden (change folder name to `.renv`) #1784

Open roaldarbol opened 9 months ago

roaldarbol commented 9 months ago

Most dependency managers I've used in various languages store their dependencies in folder beginning with . (e.g. (.conda, .yarn, .pixi), i.e. they are hidden folders. This is quite useful, especially when storing your files on a cloud drive as they won't get uploaded (I use filen.io for reference).

Is there a reason renv isn't a hidden folder? Could it be considered to change it to be hidden? Or what is the reason it has been kept visible?

Gewerd-Strauss commented 9 months ago

I second this. I need to run a renv-setup in a project that is interfaced with 3rd-party apps for reasons I am not going to go into. The search gets polluted by the truckload of readme- & news-files. Of 150 indexed files, 133 lie in the renv-folder, making search utterly pointless. Contrary to that, .renv would be excluded and hidden by default.

kevinushey commented 9 months ago

Thanks; I think I agree, especially since it's unlikely users will want to manually introspect files within the renv folder.

In the meantime, you can try configuring this by hand, e.g.

https://github.com/rstudio/renv/blob/d8b6af46721ad8b72e333f53c9aaa1043bf58a1d/NEWS.md?plain=1#L698-L701

That is, you could set RENV_PATHS_RENV = ".renv" in your project's .Renviron file.

roaldarbol commented 9 months ago

Good to know, and I agree, most users are unlikely to look through the folder (and the ones that will would most likely already be familiar with hidden folders). Is there a list of all the environment variables somewhere (e.g. RENV_PATHS_RENV)?

kevinushey commented 9 months ago

The path-specific environment variables are documented in https://rstudio.github.io/renv/reference/paths.html; other configuration-type things are discussed in https://rstudio.github.io/renv/reference/config.html and https://rstudio.github.io/renv/reference/settings.html.

roaldarbol commented 9 months ago

If you were to change to default behaviour, what would the timeline be for that, and what would need to be put in place to make it backwards compatible? I'd still be keen to see the default change, as you were saying, people won't (and shouldn't need to) look in that folder. :-)

groverj3 commented 4 months ago

Adding my voice to the choir. This would be a good change.