Skip to content
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

Tweak message for when nothing is cleaned from a project #93

Closed
marcospb19 opened this issue Feb 4, 2023 · 5 comments · Fixed by #127
Closed

Tweak message for when nothing is cleaned from a project #93

marcospb19 opened this issue Feb 4, 2023 · 5 comments · Fixed by #127

Comments

@marcospb19
Copy link
Collaborator

marcospb19 commented Feb 4, 2023

I think it would be a good small improvement if cargo-sweep emitted a different message for when it cleans 0.00 bytes from a project.

After running this at my $HOME:

$ cargo sweep -t 100 -r

I got this:

[INFO] Cleaned 0.00 bytes from "/home/marcospb19/cargo-sweep/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/code/rust/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/ds/client/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/ds/file-backed-queue/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/ds/gui/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/ds/proto/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/ds/recording-datatypes/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/ds/scoring/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/ds/server/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/ds/server-store/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/languages/cacau/target"
[INFO] Cleaned 70.13 KiB from "/home/marcospb19/languages/cocoa/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/languages/dada/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/languages/lalrpop/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/languages/lox/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/languages/rustfmt/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/languages/sushi/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/ouch/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/ouch/target/package/ouch-0.4.0/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/rust-skeleton-hexagonal/target"
[INFO] Cleaned 23.63 KiB from "/home/marcospb19/stuff/dotao/target"
[INFO] Cleaned 23.88 KiB from "/home/marcospb19/stuff/fs-tree/target"
[INFO] Cleaned 6.48 GiB from "/home/marcospb19/stuff/keyrocky/target"
[INFO] Cleaned 0.00 bytes from "/home/marcospb19/stuff/reflect/target"
[INFO] Cleaned 3.04 KiB from "/home/marcospb19/stuff/wsid/target"

A lot of lines look like this:

[INFO] Cleaned 0.00 bytes from "/home/marcospb19/cargo-sweep/target"

Instead of "Cleaned 0.00 bytes from", it could tell something like "Did nothing on", "Cleaned nothing from" or "Nothing to do at".

@jyn514
Copy link
Collaborator

jyn514 commented Feb 4, 2023

Hmm, maybe instead we should lower the log level to DEBUG if nothing was cleaned?

@marcospb19
Copy link
Collaborator Author

marcospb19 commented Feb 4, 2023

That would be bad if you're not using --recursive.

# Please sweep on current directory
$ cargo sweep --installed

I'd expect some output to be shown with some message, if nothing is outputted, I can assume it worked and sweeped the project.

Also, it's very useful to see what --recursive detected and tried to clean.

@Expurple
Copy link
Contributor

I think, this can be closed now

@marcospb19
Copy link
Collaborator Author

marcospb19 commented Apr 1, 2024

True! Thanks.

GitHub tip: you can add "Fixes #NNN" or "Fix #NNN" to automatically close the referred issue with the PR merge 😉.

@marcospb19 marcospb19 linked a pull request Apr 1, 2024 that will close this issue
@Expurple
Copy link
Contributor

Expurple commented Apr 1, 2024

Yeah, I actually included "#NNN" in the commit message, but looks like it either requires "Fix" / "Fixes" or only works in pull requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants