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

Panic when compiling redis-rs with clippy #1517

Closed
Eijebong opened this issue Feb 6, 2017 · 8 comments
Closed

Panic when compiling redis-rs with clippy #1517

Eijebong opened this issue Feb 6, 2017 · 8 comments
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages

Comments

@Eijebong
Copy link

Eijebong commented Feb 6, 2017

redis-rs uses the "RUSTC" environment variable to determine the current rustc version by calling $RUSTC --version.
Since clippy sets this to "/home/user/.cargo/bin/cargo-clippy", the version is not the expected format at all and it just panics because there is no error handling in the build.rs

@mitsuhiko @badboy

@mitsuhiko
Copy link
Contributor

Not sure what to do about that. How else can we get the version?

@badboy
Copy link
Member

badboy commented Feb 6, 2017

I'm inclined to say "Just don't do it then", but that would be not so nice.
We could bail out and simply not set the with-system-unix-sockets if we can't parse output from $RUSTC --version. That atleast would enable a clippy run.

@mcarton mcarton added the C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages label Feb 6, 2017
@oli-obk
Copy link
Contributor

oli-obk commented Feb 7, 2017

Alternatively you can build clippy as a library and use RUSTFLAGS to enable clippy. Unfortunately I see no way to get cargo clippy working without either the ability to install libraries or using RUSTC

@Eijebong
Copy link
Author

Eijebong commented Feb 28, 2017

Same error with rocket_codegen @SergioBenitez

@mitsuhiko
Copy link
Contributor

I wonder if clippy could not ship a RUSTC wrapper that makes it behave more the same. Parsing RUSTC output is not unpopular.

@SergioBenitez
Copy link

@Eijebong Rocket should be emitting a warning if it can't retrieve the current version; the build script should not panic in this case.

@Eijebong
Copy link
Author

Ok, I got no warning whatsoever... I guess it was redis again but it panicked under the « compile rocket_codegen » line... Sorry :p

@SergioBenitez
Copy link

@Eijebong That's caused by rust-lang/cargo#3777. If you pass -vv, you should see the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages
Projects
None yet
Development

No branches or pull requests

6 participants