Skip to content

Multiple matching crates for parent crate [E0464] #101

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

Open
CAD97 opened this issue Feb 10, 2018 · 1 comment
Open

Multiple matching crates for parent crate [E0464] #101

CAD97 opened this issue Feb 10, 2018 · 1 comment

Comments

@CAD97
Copy link

CAD97 commented Feb 10, 2018

See https://travis-ci.org/Robbepop/string-interner/jobs/339735884 for the build log (config.link_deps()).
And https://travis-ci.org/Robbepop/string-interner/jobs/339733480 for an earlier one (config.target_ruscflags = Some("-L target/debug/deps").

Locally on my Windows machine, config.link_deps() fails due to #81 and config.target_rustcflags = Some("-L target/debug/deps") works fine. config.clean_rmeta is called after setting the link arguments in both cases.

Compile test harness here: https://github.com/CAD97/string-interner/blob/d95952459bb0b0a99448c9f5c84ff182b2ef7e38/tests/compiletests.rs
Singular compile-fail test here: https://github.com/CAD97/string-interner/blob/d95952459bb0b0a99448c9f5c84ff182b2ef7e38/tests/compile-fail/pooled_str_outlives.rs

@laumann
Copy link
Collaborator

laumann commented Feb 12, 2018

Is this a bug in clean_rmeta()?

Currently, link_deps() shouldn't be used if your PATH variable contains spaces - I have kind of decided not to fix that issue here (#81), but rather try to get it fixed in rustc/compiletest. So for the moment, I would just say, don't use paths with spaces in conjunction with link_deps().

But the problem you're pointing to was observed when mixing cargo check and cargo test. Both commands produce .rmeta files, but they are not compatible and rustc then gets confused when two versions of the same crate was found on PATH (IIRC). So is this a case where some .rmeta files are left behind when they shouldn't be?

For reference, here's the implementation of config.clean_rmeta().

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