[Rd] Request: better default R_LIBS_USER

Gabriel Becker g@bembecker @end|ng |rom gm@||@com
Thu Mar 23 23:57:21 CET 2023


Felipe,

Thanks for being interested in making R better. Its great to see engagement
from a new "virtual face", so to speak. That said, without speaking for
R-core, my experience is that the R-project and R-core team place a very
high premium on backwards compatibility. They will make breaking changes,
on occasion, but its rare and extreme for them to do so. I personally
don't think the amount of convenience/modern conceptual best practices
adherence we're talking about here rises to the level of justifying a
breaking change put in quickly.

As for why I'm calling this a breaking change, see inline:

>

On Thu, Mar 23, 2023 at 12:49 PM Felipe Contreras <
felipe.contreras using gmail.com> wrote:

> > Just expand %U to both:
> >
> >             paste(c(
> >             file.path(home, ".local", "lib", "r", x.y),
> >             file.path(home, "R", paste0(R.version$platform, "-library"),
> x.y)
> >             ), collapse = ":")
> >
> > Then R would install packages to the new location in new installations
> > by default, but still use packages from the old location if present.
>
> This would work, would it not?
>

So off the top of my head, this would mean that people who have versions of
R from before and after that change installed simultaneously would, *by
default* have package libraries that live in completely different places on
the drive.

Does that preclude a change like this from ever being made? No, but it does
seem more like a major version change than a minor version change to me.

For an example of why this could be a breaking change, i'd be willing to
bet there are shell scripts out there which assume the user directories
live at ~user/R/<os>/<version> and detect them as such. Do I think its
common? No. Do I think its the right way to do whatever that shell script
is doing? No, but I'd be surprised if there wasn't code that does it
somewhere. And that code will/would break under your proposed change.


> Moreover, this location is going to change the next time the minor
> > version is bumped anyway.
>
> Or just change it for the next version of R.
>

All of the above said, I do actually agree that it would be nice to change
the default in the long term (including for mac builds from source).
Perhaps this could be put on the list of possible changes for R 5.0, to be
bundled with other as-yet undecided breaking changes, members of R-core
feel the same way.

Best,
~G


> Cheers.
>
> --
> Felipe Contreras
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



More information about the R-devel mailing list