Closed marcospb19 closed 1 year ago
PR is a draft because this is the remaining output after the changes:
[INFO] Cleaned 5.34 GiB
[INFO] Using all installed toolchains: ["stable-2022-09-22-x86_64-unknown-linux-
gnu", "stable-x86_64-unknown-linux-gnu", "nightly-2022-06-20-x86_64-unknown-linu
x-gnu", "nightly-2022-08-06-x86_64-unknown-linux-gnu", "nightly-x86_64-unknown-l
inux-gnu", "1.63.0-x86_64-unknown-linux-gnu", "1.64.0-x86_64-unknown-linux-gnu"]
So now you don't know what project was cleaned.
The list of installed toolchains is shown for every project it sweeps, but I think it is always the same.
So we should probably just show it once at the start.
This is the function that loads the toolchains:
It's always constant, because it calls the rustup
binary, I think we can assume the binary doesn't change (also, cargo sweep nevers cd
into other directory).
Should be ready for review now, fixing the list of toolchains being outputted repeatedly will require a little bit of refactoring, so I prefer doing it in another PR.
Sorry I had to force push again, cargo clippy --fix
broke a test.
I just fixed the clippy warnings in #80 (and made a couple other changes that should make the errors easier to read) - do you mind rebasing over master?
Also, please revert the changes to the assertion message, like the error says they don't do what you expect in 2018 edition and I would prefer to switch the edition in a separate PR (edit: done https://github.com/holmgr/cargo-sweep/pull/83).
Oh ok, I'll do that, I was having a lot of trouble with the assertion message, so I force pushed like 5 times, let me fix it.
Do you mind adding a test showing the new output? Comparing run(sweep(&["--maxsize", "0"])).get_output().stdout
to some string would be ideal; I guess it's annoying because it hashes in the name but maybe you can normalize those?
Now it's failing because of Windows paths
"C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpBWHDFH\\debug\\.fingerprint\\
Fixed, if you want I can squash the last (one or two) commits.
Thanks for sticking with this!
Fixes #74.
cargo-sweep
logs every deleted file, this makes the output very noisy and hard to follow (outputs approximately a thousand lines per cleaned project).This PR changes the default output to omit deleted files, and only show them with the
--verbose
flag.