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

Using log or getops crates reports "multple matching crates" error to be displayed #5

Closed
hugoduncan opened this issue Jan 28, 2015 · 10 comments

Comments

@hugoduncan
Copy link

For some crates (at least log and getopts), declaring extern crate getopts; leads to the following errors displayed in flycheck:

Multiple matching crates for `getopts`
can't find crate for `getopts`

This seems to be caused by the existence of log and getopts library files in rustlib.

Cargo doesn't report the same errors when run directly, as it uses different rustc arguments to flycheck-rust (-L dependency=… and --extern …=…).

@mcobzarenco
Copy link

+1

mcobzarenco added a commit to mcobzarenco/getopts that referenced this issue Feb 3, 2015
While waiting for a better fix to flycheck/flycheck-rust#5 I am using a renamed version of getopts.
@swsnr swsnr added the bug label Feb 4, 2015
@swsnr
Copy link
Contributor

swsnr commented Feb 4, 2015

@hugoduncan Feel free to open a pull request to improve flycheck-rust. I don't have the time to fix this issue currently, and I don't use Rust anymore.

@hugoduncan
Copy link
Author

Unfortunately it doesn't seem like a trivial fix, and will probably involve updating the rust support in flycheck itself. I can't see a way of doing it corrctly without parsing the Cargo.toml file.

@hugoduncan
Copy link
Author

It seemed simplest just to invoke cargo. I started flycheck-cargo.

@swsnr
Copy link
Contributor

swsnr commented Feb 5, 2015

@hugoduncan Cargo would build the entire project to check a single file, wouldn't it?

@hugoduncan
Copy link
Author

@lunaryorn Yes, and it definitely has speed issues.

@utkarshkukreti
Copy link
Contributor

Would this help: rust-lang/cargo#1225?

@swsnr
Copy link
Contributor

swsnr commented Feb 7, 2015

@utkarshkukreti Probably, though a structured format would be better, i.e. JSON.

@swsnr
Copy link
Contributor

swsnr commented Apr 4, 2015

Effectively blocked by rust-lang/cargo#1434.

@swsnr
Copy link
Contributor

swsnr commented Apr 16, 2015

Closing, in favour of #8

@swsnr swsnr closed this as completed Apr 16, 2015
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

4 participants