rticulate / import

An Import Mechanism For R
https://import.rticulate.org
Other
222 stars 14 forks source link

can't import from two different versions of package #74

Open ggrothendieck opened 1 year ago

ggrothendieck commented 1 year ago

This does not work to simultaneously load the same function, foo, from two different releases. Instead of getting the two different versions the same version is retrieved twice.

https://gist.github.com/DavZim/9b5e1705c726346f5a50cdec1f61509f

The test package containing just foo is here

https://github.com/DavZim/testPkg

with releases here

https://github.com/DavZim/testPkg/releases

and discussion here

https://stackoverflow.com/questions/75017879/use-function-from-a-package-but-different-versions-simultaneously/75019428

torfason commented 1 year ago

Thanks for the report. Is the implication of that discussion that this issue is fixed by the development version of import (v.1.3.0.9004), and that pushing a release of the current dev version to CRAN would fix this?

DavZim commented 1 year ago

Unfortunately not. With the development version of import, the problem still exists. As I didn't see any other way to do this I am beginning to wonder if its even possible at all to have two versions of the same function of the same package loaded at the same time, even in different environments.

The gist mentioned above replicates the error.

torfason commented 1 year ago

OK, it looks like this is interesting, but it also looks like kind of a big feature. If at all possible, it would at minimum making sure there are two libraries available, each with a different version of the package.

If anyone is interested in contributing this feature (along with the required tests), and if it looked like it was robust, I think it could be included in the next release. But I'll probably not find time to implement this myself.

ggrothendieck commented 1 year ago

A workaround is to use the changer package (on CRAN) whose purpose is to change the name of a package.

On Mon, Mar 13, 2023 at 5:34 AM Magnus Thor Torfason < @.***> wrote:

OK, it looks like this is interesting, but it also looks like kind of a big feature. If at all possible, it would at minimum making sure there are two libraries available, each with a different version of the package.

If anyone is interested in contributing this feature (along with the required tests), and if it looked like it was robust, I think it could be included in the next release. But I'll probably not find time to implement this myself.

— Reply to this email directly, view it on GitHub https://github.com/rticulate/import/issues/74#issuecomment-1465798689, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB32F7QVQMMMLCLZWJVAPG3W33S3JANCNFSM6AAAAAATS62KVE . You are receiving this because you authored the thread.Message ID: @.***>

-- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com