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

Remove deps #8605

Merged
merged 3 commits into from
Apr 2, 2022
Merged

Remove deps #8605

merged 3 commits into from
Apr 2, 2022

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Mar 29, 2022

This remove both regex and cargo_metadata as dependencies making clippy_dev compile ~3x faster (~46s -> ~16s locally). cargo_metadata was used to extract the version field from Cargo.toml, which is done trivially without that. regex was used to parse define_clippy_lint in update_lints which is now done using rustc_lexer. This isn't any simpler, but it compiles ~15s faster and runs ~3x faster (~2.1s -> ~0.7s locally).

The next biggest offenders to compile times are clap and winapi on windows. clap could be removed, but re-implementing enough is probably more work than it's worth. winapi is used by opener and walkdir so it's stuck there.

changelog: none

@rust-highfive
Copy link

r? @camsteffen

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 29, 2022
@xFrednet
Copy link
Member

This looks interesting. I'll take over the review to take some load of off @camsteffen. I'll review this over the week :)

r? @xFrednet

@rust-highfive rust-highfive assigned xFrednet and unassigned camsteffen Mar 29, 2022
Copy link
Member

@xFrednet xFrednet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a solid improvement and excellent work. I have one comment and some nits, but just little things.

The changes also had a major improvement for my compilation performance, it cut 30 seconds down to ~9 seconds. And the code is also more readable, IMO. Okay, enough praise 🙃

@xFrednet
Copy link
Member

xFrednet commented Apr 2, 2022

Everything looks good to me, thank you for this change. I think everyone is going to enjoy the faster compile time for clippy_dev 🎉

@bors r+

@bors
Copy link
Contributor

bors commented Apr 2, 2022

📌 Commit ae5af0c has been approved by xFrednet

@bors
Copy link
Contributor

bors commented Apr 2, 2022

⌛ Testing commit ae5af0c with merge 85b88be...

@bors
Copy link
Contributor

bors commented Apr 2, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing 85b88be to master...

@bors bors merged commit 85b88be into rust-lang:master Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants