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

nimble allows installing package with same name #573

Closed
ghost opened this issue Oct 27, 2018 · 5 comments
Closed

nimble allows installing package with same name #573

ghost opened this issue Oct 27, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Oct 27, 2018

When installing two packages from different sources and different authors but with same name, it works if the package which gets installed has a greater version number.
The One problem is that nim doesn't support loading the package anymore.

Example:

  1. nimble install https://github.com/ephja/lzma installs lzma@0.1.0
  2. nimble install https://github.com/tim-st/nim-lzma@#test-nimble-version installs lzma@0.1.1
  3. in nim import lzma fails with cannot open file lzma now.
@dom96
Copy link
Collaborator

dom96 commented Oct 27, 2018

Any proposals on how to fix this?

@ghost
Copy link
Author

ghost commented Oct 27, 2018

The easiest way would be to not allow to install the package if a package with same name and different author (is the author name unique enough?) already exists. Of course this has downsides but I don't see a better solution when importing by url scheme (like Go supports) is not supported (import "github.com/user/package").

For the referenced issue I think it should be allowed and if author is same and package version is greater install normal way, if package author is different then only the package which explicitly depends on the package by url should load this dependency.

When "importing by url scheme as string" would be supported only packages that were installed by package name should be importable by package name (because they came from nimbles official list and are unqiue there) all others woud be forced to import by url scheme.

@alehander92
Copy link

alehander92 commented Oct 27, 2018

can't we specify an alias on nimble level

@dom96
Copy link
Collaborator

dom96 commented Oct 27, 2018

Import by url would require a major change in the Nim language.

@dom96
Copy link
Collaborator

dom96 commented Sep 21, 2019

I'm going to merge this into #574, these issues are pretty similar. I've put my thoughts on how to fix this in there (I think we should look at repo URL for uniqueness).

@dom96 dom96 closed this as completed Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants