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

WIP: groundwork for allowing cargo install #16

Closed
wants to merge 1 commit into from

Conversation

oli-obk
Copy link

@oli-obk oli-obk commented Feb 17, 2016

This requires clippy to be statically linkable (simply removing all plugin-related configurations does this). To do this properly, clippy would need to be split into a staticlib crate and a plugin crate that uses the staticlib crate. Then cargo-clippy can use the staticlib crate

cc @Manishearth

There's lots of hacky code in here to detect lib.rs and main.rs and it the code assumes that cargo build already ran (without --release). This will obviously be done right in case this is the way that we should go forward.

fixes #11

@Manishearth
Copy link

I'd prefer cargo install clippy to work, really; with tweaks to cargo install so that it can cache dependencies somewhere.

But this is a good step forward. My main gripe is that by replicating rustc_driver we're introducing a lot more instability.

@Manishearth
Copy link

Oh, we're using CompilerCalls; I forgot that existed. Previous gripe rescinded.

(I'm open to merging this into clippy itself as a binary, if it would work that way. cargo install clippy would be nice to have)

@oli-obk
Copy link
Author

oli-obk commented Feb 17, 2016

But this is a good step forward. My main gripe is that by replicating rustc_driver we're introducing a lot more instability.

Oh, we're using CompilerCalls; I forgot that existed. Previous gripe rescinded.

one thing is that I just copied out the code (from rustc_driver) that moves lints and stuff from Registry to Session. But since we know the kind of things clippy does, we can limit it to just early and late lint passes, thus reducing breakage-surface.

@oli-obk
Copy link
Author

oli-obk commented Feb 17, 2016

(I'm open to merging this into clippy itself as a binary, if it would work that way. cargo install clippy would be nice to have)

Shouldn't be a problem. I'll open a PR for splitting clippy into plugin and staticlib as a first step.

@oli-obk
Copy link
Author

oli-obk commented May 12, 2016

this has been implemented on clippy directly

@oli-obk oli-obk closed this May 12, 2016
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

Successfully merging this pull request may close these issues.

Support cargo install
2 participants