Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ggrothendieck opened this issue Jan 6, 2023 · 4 comments
Open

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

ggrothendieck opened this issue Jan 6, 2023 · 4 comments

Comments

@ggrothendieck
Copy link

ggrothendieck commented Jan 6, 2023

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
Copy link
Collaborator

torfason commented Jan 6, 2023

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
Copy link

DavZim commented Jan 6, 2023

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
Copy link
Collaborator

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
Copy link
Author

ggrothendieck commented Mar 13, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants