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

Compiler needs to be ok with multiple matching crates when using multiple workspaces in RUST_PATH or such #2819

Closed
z0w0 opened this issue Jul 6, 2012 · 3 comments

Comments

@z0w0
Copy link
Contributor

z0w0 commented Jul 6, 2012

e.g. cargo install -g tnetstring and cargo install tnetstring. If I was compiling my own project and it's dependencies, I would assume that the tnetstring installed locally would be used (as I might have some sort of custom tnetstring from an unofficial source), but instead it prints out "multiple crates found" like so:

./mongrel2.rc:8:0: 8:15 error: multiple matching crates for `tnetstring`
./mongrel2.rc:8 use tnetstring;
                ^~~~~~~~~~~~~~~
note: candidates:
note: path: /home/zack/coding/hydrox/.cargo/lib/libtnetstring-bfa24df4626b48a4-0.2pre.so
note: meta: #[link(name = "tnetstring",
       vers = "0.2pre",
       uuid = "ce93b70c-c22a-45fa-97a7-66ab97009005")]
note: path: /home/zack/.cargo/lib/libtnetstring-bfa24df4626b48a4-0.2pre.so
note: meta: #[link(name = "tnetstring",
       vers = "0.2pre",
       uuid = "ce93b70c-c22a-45fa-97a7-66ab97009005")]
error: aborting due to previous error

I am working on fixing this with #2662 but I thought I would note the issue regardless.

@z0w0
Copy link
Contributor Author

z0w0 commented Mar 8, 2013

Just a note: the same issue is present with Rustpkg so I won't close this, but normally rustpkg wouldn't have an issue because crates are only stored in ~/.rustpkg/lib but there is also going to be a "local workspace" thing being added to rustpkg which will mean local dependencies will be built into .rustpkg/lib and then installed later with the project, so this error will probably be hit again.

@pcwalton
Copy link
Contributor

I don't believe this is backwards incompatible, renominating.

@graydon
Copy link
Contributor

graydon commented Jun 6, 2013

absorbed into #5682

@graydon graydon closed this as completed Jun 6, 2013
saethlin pushed a commit to saethlin/rust that referenced this issue Apr 11, 2023
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

3 participants