12

Update Clippy dependencies without patch versions by smoelius · Pull Request #88...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/88517
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conversation

Copy link

Collaborator

rust-highfive commented on Aug 30, 2021

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

Copy link

Collaborator

rust-highfive commented on Aug 30, 2021

r? @Mark-Simulacrum

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

This comment has been hidden.

Copy link

Contributor

klensy commented on Aug 30, 2021

This will add additional versions for cargo_metadata and compiletest_rs.

Copy link

Contributor

Author

smoelius commented on Aug 30, 2021

This will add additional versions for cargo_metadata and compiletest_rs.

Is that an impediment?

Copy link

Contributor

klensy commented on Aug 31, 2021

@smoelius

There is some movement to keep number of (duplicated) dependencies as low as possible, in other case we always can do cargo update, yes?

For cargo_metadata this will be 3rd version for no particular reason, as for compiletest_rs, it used only in clippy and miri, so it can be bumped in miri repo too, to remove duplicate.

Copy link

Member

@flip1995 flip1995 left a comment

I prefer this non-patch version over the patch version. It only changes the Cargo.lock file half of what the patch version alternative does.

tar = "0.4"

toml = "0.5"

ureq = "2.2"

walkdir = "2.3"

This removes clap and adds walkdir?

Copy link

Contributor

Author

@smoelius smoelius on Aug 31, 2021

Removal of clap was me fat-fingering the patch by hand.

walkdir was added here: rust-lang/rust-clippy@997ddbb

This version of clippy does yet not seem to include that commit.

Both problems were fixed with my most recent push.

Cargo.lock

Outdated

@@ -429,6 +447,19 @@ dependencies = [

"serde_json",

]

[[package]]

name = "cargo_metadata"

We'll probably have to do a coordinated dep update for cargo_metadata and compiletest_rs.

Copy link

Contributor

@klensy klensy on Aug 31, 2021

Old version for cargo_metadata (with bunch of other stuff) can be dropped when rustfmt will be updated in rust repo (dependencies already updated in rustfmt repo).

Copy link

Member

@flip1995 flip1995 on Aug 31, 2021

edited

cargo_metadata in rustfmt seems to still use version 0.12 instead of 0.14. Is this intentional?
With rustfmt updated, we'd also need to update the tidy script and RLS.

Copy link

Contributor

@klensy klensy on Aug 31, 2021

It was updated to 0.12 as it was most common version in workspace and required less changes, in case if it will updated to newer version.

Copy link

Contributor

Author

smoelius commented on Aug 31, 2021

Should I close #88515 and remove the "do not merge" status from this PR?

Separately, all of this PR's changes, besides those to cargo_common_metadata.rs, could be generated with a script. Would it be helpful if I were to record that somehow? For example, I could suggest a change to Clippy's CONTRIBUTING.md file, say, around the Syncing changes section.

Copy link

Contributor

camsteffen commented on Aug 31, 2021

Should I close #88515 and remove the "do not merge" status from this PR?

Separately, all of this PR's changes, besides those to cargo_common_metadata.rs, could be generated with a script. Would it be helpful if I were to record that somehow? For example, I could suggest a change to Clippy's CONTRIBUTING.md file, say, around the Syncing changes section.

I dunno. Updates should be evaluated one by one anyways so I probably wouldn't use a script. shrug

smoelius

changed the title Do not merge: Update Clippy dependencies without patch versions

Update Clippy dependencies without patch versions

on Aug 31, 2021

Copy link

Contributor

Author

smoelius commented on Aug 31, 2021

Done.

I dunno. Updates should be evaluated one by one anyways so I probably wouldn't use a script.

From what I can tell, there is currently no Clippy "Dependabot," i.e., something to tell you when updates are possible. A script would at least provide this information, and one could always ignore the script's results.

Anyway, it's here: https://gist.github.com/smoelius/02c63fa0aa33d1f2bc913c8008890d45

Please let me know if anything else is needed for this PR.

Copy link

Member

flip1995 commented on Sep 1, 2021

From what I can tell, there is currently no Clippy "Dependabot,"

That's because we also have to look out for the Rust repo a bit to not duplicate deps.


To prevent duplicate deps, I suggest to keep cargo_metadata at 0.12 for now and do a coordinated update with Miri for compiletest_rs.

Copy link

Contributor

Author

smoelius commented on Sep 1, 2021

To prevent duplicate deps, I suggest to keep cargo_metadata at 0.12 for now

This means that semver will have to be held back as well.

Also, PathBuf does not implement AsRef<str>, but it does implement AsRef<OsStr> (as does Utf8PathBuf). So I changed the cargo_common_metadata lint to use AsRef<OsStr> instead of AsRef<str>. This way, when cargo_metadata is eventually upgraded to 0.14, the cargo_common_metadata lint should compile without changes. (I tested this in the clippy repo and it seemed to work.)

Also, I interpreted your comment @flip1995 to mean compiletest_rs should not be downgraded. Please let me know if this is not correct.

Copy link

Member

@flip1995 flip1995 left a comment

Some NITs I noticed.

To do the compiletest-rs update with MIRI, I suggest, that you open a PR against MIRI updating that dep. Once that gets merged you can do a submodule update for MIRI here in the Rust repo. To that submodule update, you can attach a commit updating the Clippy deps. In the last commit you can do the Cargo.lock update with cargo update -p miri -p clippy.

# begin automatic update

clippy_lints = { version = "0.1.50", path = "clippy_lints" }

clippy_lints = { version = "0.1", path = "clippy_lints" }

# end automatic update

Can you remove those comments, while you're at it. This is definitely not automatically updated smile

Copy link

Contributor

Author

smoelius commented on Sep 1, 2021

To do the compiletest-rs update with MIRI, I suggest, that you open a PR against MIRI updating that dep. Once that gets merged you can do a submodule update for MIRI here in the Rust repo. To that submodule update, you can attach a commit updating the Clippy deps. In the last commit you can do the Cargo.lock update with cargo update -p miri -p clippy.

I think this is done now.

Copy link

Contributor

klensy commented on Sep 1, 2021

Regex update can be perf sensitive, plus 7 commits kinda a lot, squash a little.

Copy link

Contributor

Author

smoelius commented on Sep 1, 2021

Regex update can be perf sensitive, plus 7 commits kinda a lot, squash a little.

How many do you think would be appropriate?

Copy link

Contributor

camsteffen commented on Sep 1, 2021

It looks like a few of the commits amend or reverse parts of the first commit so those can be squashed.

Copy link

Contributor

Author

smoelius commented on Sep 1, 2021

Better?

Copy link

Member

@flip1995 flip1995 left a comment

Copy link

Contributor

Author

smoelius commented on Sep 2, 2021

Should I now request a review from a rust maintainer?

Copy link

Member

flip1995 commented on Sep 9, 2021

I can't unresolve conversations here and also can't comment again on the same line where a resolved comment already is.... So here are links to the two comments I still have:

Copy link

Contributor

Author

smoelius commented on Sep 9, 2021

Apologies. I think it's fixed now.

Copy link

Member

@flip1995 flip1995 left a comment

Thanks! Waiting for CI to pass.

Copy link

Member

flip1995 commented on Sep 9, 2021

@bors r+ rollup=iffy (Cargo.lock update)

Copy link

Contributor

bors commented on Sep 9, 2021

pushpin Commit bd4b17a has been approved by flip1995

Copy link

Contributor

bors commented on Sep 9, 2021

hourglass Testing commit bd4b17a with merge 516e250...

Copy link

Collaborator

rust-log-analyzer commented on Sep 9, 2021

The job dist-aarch64-msvc failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

Copy link

Contributor

bors commented on Sep 9, 2021

broken_heart Test failed - checks-actions

Copy link

Contributor

Author

smoelius commented on Sep 9, 2021

I'm afraid the error doesn't mean much to me.

Copy link

Contributor

ehuss commented on Sep 9, 2021

@bors retry

Windows image update has broken things.

Copy link

Contributor

bors commented on Sep 13, 2021

hourglass Testing commit bd4b17a with merge c6f32f3...

Copy link

Contributor

bors commented on Sep 13, 2021

sunny Test successful - checks-actions
Approved by: flip1995
Pushing c6f32f3 to master...

bors

merged commit c6f32f3 into

rust-lang:master on Sep 13, 2021

11 checks passed

Copy link

Collaborator

rust-timer commented on Sep 13, 2021

Finished benchmarking commit (c6f32f3): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Assignees

No one assigned

Projects

None yet

Milestone

1.57.0

Linked issues

Successfully merging this pull request may close these issues.

None yet

12 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK