You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my limited understanding, {renv} has a sophisticated configuration resolution mechanism:
user-level configs
Uses R options in the form of renv.config.<name>, or RENV_CONFIG_<NAME> (with resolving conflicts), e.g. in .Rprofile or .Renviron. These can be accessed in session with renv::config.
project-local settings
Allows two ways of specifying option defaults with resolving conflicts (e.g. in .Rprofile):
These can be accessed and changed in session with renv::settings and are persistent within renv/settings.json
The configuration options are well documented leveraging R's helpfile mechanism. I believe resolving project-local and user-level configurations is a very generic functionality for R packages, and many packages have opted to implement their own, using various file formats, heuristics and logic, creating friction for users and maintenance burden for developers. I myself have experimented before (since people have long asked to allow configuring {styler} with a config file), creating a prototype {fallback} that tackles the problem in an even more general way. However, I abandoned that approach due to a lack of time. But I don't think we need to re-invent the wheel for every package anew, it would be great to have a standard way of resolving configuration on a user and project level.
Hence, I was wondering if you'd consider exposing the config resolution mechanism of {renv} in a separate package so other package developers (or even just R users) could use it.
The text was updated successfully, but these errors were encountered:
In my limited understanding, {renv} has a sophisticated configuration resolution mechanism:
user-level configs
Uses R options in the form of
renv.config.<name>
, orRENV_CONFIG_<NAME>
(with resolving conflicts), e.g. in.Rprofile
or.Renviron
. These can be accessed in session withrenv::config
.project-local settings
Allows two ways of specifying option defaults with resolving conflicts (e.g. in
.Rprofile
):These can be accessed and changed in session with
renv::settings
and are persistent withinrenv/settings.json
The configuration options are well documented leveraging R's helpfile mechanism. I believe resolving project-local and user-level configurations is a very generic functionality for R packages, and many packages have opted to implement their own, using various file formats, heuristics and logic, creating friction for users and maintenance burden for developers. I myself have experimented before (since people have long asked to allow configuring {styler} with a config file), creating a prototype {fallback} that tackles the problem in an even more general way. However, I abandoned that approach due to a lack of time. But I don't think we need to re-invent the wheel for every package anew, it would be great to have a standard way of resolving configuration on a user and project level.
Hence, I was wondering if you'd consider exposing the config resolution mechanism of {renv} in a separate package so other package developers (or even just R users) could use it.
The text was updated successfully, but these errors were encountered: