-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Detect filesystem loop during walking the projects #10188
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
Running
I've tried using For removing unnecessary collect for some calls on |
4b42725
to
5d5b4a2
Compare
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'm not personally too familiar with walkdir::Ancestor
but I think it'd be pretty reasonable to switch Cargo over to using walkdir
. I suspect that it'd be nice to offload some of the more nitty-gritty here and getting nice perf wins would also be good.
I've done the |
I think the |
Use unordered since order of warning differs on each platform.
Since `StripPrefixError` returned from [`Path::strip_prefix`] is just an error with "prefix not found. We can simply return false for it. Also use `Match::is_ignore` instead of manually matching. [`Path::strip_prefix`]: https://doc.rust-lang.org/1.57.0/std/path/struct.Path.html#method.strip_prefix
2a1781e
to
b49fe50
Compare
Below are traces for each implementation.
👑
|
@bors: r+ This looks awesome, thanks! |
📌 Commit b49fe50 has been approved by |
☀️ Test successful - checks-actions |
Update cargo 8 commits in a359ce16073401f28b84840da85b268aa3d37c88..fcef61230c3b6213b6b0d233a36ba4ebd1649ec3 2021-12-14 18:40:22 +0000 to 2021-12-17 02:30:38 +0000 - Minor docs change for `cargo test --help` (rust-lang/cargo#10210) - Make clippy happy (rust-lang/cargo#10205) - Enhance descriptions of issue templates (rust-lang/cargo#10202) - Add workaround for sporadic kills when building on Macos (rust-lang/cargo#10196) - Detect filesystem loop during walking the projects (rust-lang/cargo#10188) - Error about not having any crates with documentation (rust-lang/cargo#10204) - Don't document libs with doc=false (rust-lang/cargo#10201) - Bumps up tar to 0.4.36 (rust-lang/cargo#10198)
Update cargo 8 commits in a359ce16073401f28b84840da85b268aa3d37c88..fcef61230c3b6213b6b0d233a36ba4ebd1649ec3 2021-12-14 18:40:22 +0000 to 2021-12-17 02:30:38 +0000 - Minor docs change for `cargo test --help` (rust-lang/cargo#10210) - Make clippy happy (rust-lang/cargo#10205) - Enhance descriptions of issue templates (rust-lang/cargo#10202) - Add workaround for sporadic kills when building on Macos (rust-lang/cargo#10196) - Detect filesystem loop during walking the projects (rust-lang/cargo#10188) - Error about not having any crates with documentation (rust-lang/cargo#10204) - Don't document libs with doc=false (rust-lang/cargo#10201) - Bumps up tar to 0.4.36 (rust-lang/cargo#10198)
Resolves #9528
This PR also adds a new dependencysame-file
but since it's already adependency of
cargo-util
, so nothing added actually.Use
walkdir
to detect filesystem loop and gain performance boost!