-
Notifications
You must be signed in to change notification settings - Fork 7
Print 10 violations in normal mode #71
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
base: master
Are you sure you want to change the base?
Conversation
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
Sounds good to me. |
On the second thought... I think the issue in the past was that collecting violations slowed down the tool quite a bit. That's why it was hidden behind the So, this patch probably gets back to square one? Re-using the verbose flag was also a bad idea because on big projects just printing out file names (what verbose have been always doing) quickly becomes overwhelming. So, I think, more flags are necessary anyway. E.g. |
@ulysses4ever I checked the profile and the slow part is printing the violations to stdout. Always collecting warnings is slightly slower, but not noticeable. |
Oh, that’s good then. I still think decoupling violations printing from --verbose would be a good improvement but may be it can be done separately. Just FYI, I can’t approve things here, just sticking around as a past contributor. |
Thanks Artem. I don't mind splitting up the flag if that's what @andreasabel prefers. My goal is a solution which can run on CI and you can see what the violations are. |
Sorry for the delay in looking into this.
|
This limits the number of errors displayed per file.
I pushed a commit to this extend. What do you think, @mpickering and @ulysses4ever ? |
@andreasabel it's a fine interface but I don't think it solves the original problem. If you follow the link to the cabal ticket, you will see the crux of it well-put by Matt:
Right now it's still hard to find one violation in a project with hundreds of modules, like Cabal, because of all the filenames that --verbose prints. |
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 #48
What do you think @andreasabel ? The other solution I can think of was to add a flag which controlled whether violations were printed out.