-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
driver: print rustc --version --verbose on "clippy-driver rustc --version" #5166
Conversation
fb4d447
to
bb576e9
Compare
bb576e9
to
9c159e6
Compare
Looking at #5167, I think we should rethink the output of clippy, when called with Maybe we could add |
Yeah that sounds like a good solution. |
fn print_rustc_version(args: &[String]) { | ||
// make "clippy-driver rustc --version" print rustc --version output | ||
if args.len() > 2 && args[1..2] == ["rustc".to_string(), "--version".to_string()] { | ||
let rustc_version = Command::new("rustc") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, there's no guarantee that there's a rustc
in the path, or that if there is, it has anything to do with the version of clippy-driver
we're running.
@flip1995 Yes, I think making If we could go back in time, I'd suggest that all clippy-specific options should be of the form |
Yeah, I also think this would be the better behavior. Just in case this should be way harder to implement, I'd also be good with just having
I think I would have disagreed with this, but let's not bikeshed something we would have to go back in time to change 😄 |
In addition, if |
ping @matthiaskrgr Are you interested in implementing this? Otherwise I'd close this PR, because just adding |
I posted a different attempt where |
@matthiaskrgr That's basically what this PR does, and it has the same problem (I commented on your PR as well as here). |
Closing in favor of #5178 |
Fixes #5159
changelog: make "clippy-driver rustc --version" print "rustc --version --verbose" output.