Skip to content
Prev 61799 / 63424 Next

Vectorize library() to improve handling of versioned deps [sprint project proposal]

Hi Gabriel,

Nice idea! I have encountered this problem several times, while probably a
better management of libraries could avoided the issue this is an elegant
solution.

How would this proposal handle arguments mask.ok, include.only and exclude?
For example, in the (edge) case two packages export a function with the
same name but we want to mask one of them (pkgA::fun, pkgC::fun).
How would that work for instance in library(c("pkgA", "pkgC"), mask.ok = c(
pkgC = "fun"))?
Would the name of the character be useful to decide which one is ok to
mask? (in the example I would expect the pkgC::fun be masked by pkgA::fun in
the inverse order or loading).

If this doesn't go ahead, perhaps a function could be implemented to check
these situations in the .libPaths (in a package if not in base) ?

Best,

Llu?s
On Mon, 7 Aug 2023 at 22:34, Gabriel Becker <gabembecker at gmail.com> wrote: