Skip to content

Can’t find crates that Cargo got from crates.io #6

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

Closed
andersk opened this issue Apr 4, 2015 · 5 comments
Closed

Can’t find crates that Cargo got from crates.io #6

andersk opened this issue Apr 4, 2015 · 5 comments
Assignees
Labels

Comments

@andersk
Copy link
Contributor

andersk commented Apr 4, 2015

In a Cargo project with a dependency on (say) the num crate, flycheck-rust reports “can't find crate for num” on the extern crate num; line.

$ cat Cargo.toml
[package]
name = "foo"
version = "0.0.1"

[dependencies]
num = "*"

$ cat src/lib.rs
extern crate num;

$ cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling rustc-serialize v0.3.12
   Compiling libc v0.1.5
   Compiling log v0.3.1
   Compiling rand v0.3.7
   Compiling num v0.1.21
   Compiling foo v0.0.1 (file:///tmp/foo)
@andersk
Copy link
Contributor Author

andersk commented Apr 4, 2015

I guess this is probably the same underlying problem as #5.

@swsnr
Copy link
Contributor

swsnr commented Apr 4, 2015

@andersk Can you should me the output of find target in your project directory? I presume the layout of the build directory of Cargo changed.

Ultimately, though, we'll always suffer from issues like this, until we have a way to extract the build settings from Cargo itself. See rust-lang/cargo#1434.

@utkarshkukreti
Copy link
Contributor

The debug build output is now stored in /target/debug instead of /target. This should work: https://gist.github.com/utkarshkukreti/d7e2016e72bb03af15eb

@andersk
Copy link
Contributor Author

andersk commented Apr 4, 2015

@utkarshkukreti: Yes, that’s exactly it, and your patch fixes it.

@swsnr swsnr closed this as completed in 1045185 Apr 4, 2015
@swsnr
Copy link
Contributor

swsnr commented Apr 4, 2015

@andersk @utkarshkukreti Great, thanks. I fixed the issue.

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

No branches or pull requests

3 participants