Byron / dua-cli

View disk space usage and delete unwanted data, fast.
https://lib.rs/crates/dua-cli
MIT License
4.19k stars 113 forks source link

fails to build due to process_read_dir argument error #72

Closed stevensonmt closed 3 years ago

stevensonmt commented 3 years ago
error[E0593]: closure is expected to take 4 arguments, but it takes 2 arguments
   --> /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/dua-cli-2.10.7/src/common.rs:139:14
    |
139 |             .process_read_dir(|_, dir_entry_results| {
    |              ^^^^^^^^^^^^^^^^ ---------------------- takes 2 arguments
    |              |
    |              expected closure that takes 4 arguments

This appears to be due to a breaking change in jwalk between version 0.5.0 and 0.5.2.

Byron commented 3 years ago

Thanks a lot for the headsup - I have created an issue in jwalk which I believe is a better place for the fix - this probably is an accident.

stevensonmt commented 3 years ago

It is weird though b/c your Cargo.toml explicitly calls for 0.5.0, so I couldn't figure out why I was getting that error when trying to build.

Byron commented 3 years ago

I think by default the lock file is ignored unless some flag is provided to enforce it. That certainly is a little surprising and I would expect it to be the default.

Sent from my iPhone

On Jan 4, 2021, at 11:05 AM, stevensonmt notifications@github.com wrote:

 It is weird though b/c your Cargo.toml explicitly calls for 0.5.0, so I couldn't figure out why I was getting that error when trying to build.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.

DianaNites commented 3 years ago

Jwalk yanked the offending version, and the build fails again?

Work around was to run cargo install with --locked so it uses the yanked version.

error[E0593]: closure is expected to take 2 arguments, but it takes 4 arguments
   --> .cargo/registry/src/github.com-1ecc6299db9ec823/dua-cli-2.10.8/src/common.rs:139:14
    |
139 |             .process_read_dir(|_, _, _, dir_entry_results| {
    |              ^^^^^^^^^^^^^^^^ ---------------------------- takes 4 arguments
    |              |
    |              expected closure that takes 2 arguments
Byron commented 3 years ago

Thanks for the heads-up - fixed in v2.10.9.