-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Prepare to split clippy_lints
#14684
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
base: master
Are you sure you want to change the base?
Conversation
Thanks for assigning me to those PRs and requesting my review! However, I can't keep up with my reviews. I suggest Alex as the main reviewer, maybe with the help of Samuel. I fully trust you that you'll improve our tooling here! If you really want my review, just keep me assigned and I'll see what I can do this weekend. Otherwise, feel free to re-assign those PRs to Alex and/or Samuel. (applies to all clippy_dev PRs currently open, just commenting once here) |
I only assigned you to this one since splitting will (maybe) affect the sync in an annoying way. edit: Just rerolled the others. |
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.
Thanks for clarifying! Please also ping me on the PR that does the actual split.
This LGTM. AFAICT, CI failures are due to a different PR.
Just a NIT. Feel free to merge, once the others of the stack got merged
clippy_dev/src/update_lints.rs
Outdated
} | ||
} | ||
|
||
fn crate_root_path(self) -> &'static str { |
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.
NIT: Maybe a better name crate_lib_path
or even more explicit crate_lib_rs_path
.
No strong opinion here though.
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.
I'll leave this for when I end up having to rebase. Hopefully I don't forget.
This comment has been minimized.
This comment has been minimized.
When should this PR be merged?
|
Ignore the current state of this. I'm just transferring it to my main computer. I'll probably split this into a PR the does all the prep work before splitting and separate ones for each module being split. For the most part the conflicts shouldn't be too bad since git will see basically everything as a rename. Doing this with a sync is probably the best anyways just in case. I'll let @flip1995 make that call since he's the one who has to deal with it. |
* Move `declare_clippy_lint` to it's own crate * Move lint/group registration into the driver * Make `dev update_lints` handle multiple lint crates
This should be ready now. List of changes:
|
r? @Alexendoo |
[package] | ||
name = "declare_clippy_lint" | ||
version = "0.1.89" |
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.
Should be added to tests/versioncheck.rs
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.
Probably should. I don't think I added it to clippy_dev
either.
@@ -1,6 +1,7 @@ | |||
use clippy_config::Conf; | |||
use clippy_utils::diagnostics::span_lint; | |||
use clippy_utils::is_from_proc_macro; | |||
use declare_clippy_lint::declare_clippy_lint; |
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.
We could #[macro_use]
the crate to not require lint modules to change, up to you
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.
I totally forgot that's an option. I personally prefer not having things magically added to a scope, but this is a case where it's not unreasonable.
Based on #14633
The end goal here is to split
clippy_lints
into several independent crates and have the driver call out to each of them to register lints.clippy_lints
takes way too long to compile right now.r? @flip1995
changelog: none