Skip to content

devx: Fix whitespace job output is too verbose #10744

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

Open
mpickering opened this issue Jan 13, 2025 · 4 comments
Open

devx: Fix whitespace job output is too verbose #10744

mpickering opened this issue Jan 13, 2025 · 4 comments

Comments

@mpickering
Copy link
Collaborator

Consider this log: https://github.com/haskell/cabal/actions/runs/12749677510/job/35532656499?pr=10731

I couldn't see immediately where the failure was.

On line 1896, I discover:

[ Violation detected ] cabal-testsuite/PackageTests/ExtraProgPathLocal/cabal.project:
cabal-testsuite/PackageTests/ExtraProgPathLocal/cabal.project:3: <NEWLINE>
cabal-testsuite/PackageTests/ExtraProgPathLocal/cabal.project:4: <NEWLINE>

Either, the failures should be reported at the end, or run in non-verbose mode.

@philderbeast
Copy link
Collaborator

Not to diminish the problem but if I see there's a whitespace problem, I'll run the fix locally right away (and use git diff to see the fix). I don't bother looking at the logs.

$ time make fix-whitespace
...
________________________________________________________
Executed in  476.70 millis    fish           external

@mpickering
Copy link
Collaborator Author

mpickering commented Jan 13, 2025

That is useful if you wish to locally install fix-whitespace, but I don't have it installed locally so I rely on CI to tell me. I think that quite a few contributors will not have it installed so it's best that CI logs are as helpful as possible for quickly identifying the problem 😃

@andreasabel
Copy link
Member

This would be best fixed upstream at https://github.com/agda/fix-whitespace .
As a workaround, you could filter out the [ Checked ] lines from the output of fix-whitespace.

@ulysses4ever
Copy link
Collaborator

yeah, piping it through grep sounds like a great workaround to me.

mpickering added a commit to mpickering/fix-whitespace that referenced this issue Mar 14, 2025
Using --verbose on a large project prints out too much output
(see haskell/cabal#10744)

Printing out all the violations if there are a lot of them is quite
slow, printing out a lot to stdout is not that fast.

Therefore we reach a compromise where we print up to 10 reasons for
failure and omit the rest. If you want all the failures you can use
--verbose.

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

Successfully merging a pull request may close this issue.

4 participants