Detect filesystem loop during walking the projects#10188
Detect filesystem loop during walking the projects#10188bors merged 3 commits intorust-lang:masterfrom
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
alexcrichton
left a comment
There was a problem hiding this comment.
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-filebut since it's already adependency of
cargo-util, so nothing added actually.Use
walkdirto detect filesystem loop and gain performance boost!