-
Notifications
You must be signed in to change notification settings - Fork 124
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
Support quiet mode #301
Comments
Thanks for filing an issue! This should be feasible to do for the built-in commands as a starting point ( It needs to be prioritized, though, so I'm going to leave this on the backlog for now. |
@nashif how would you want this command to behave?
options:
|
I suggest that west update is silent, only showing warnings/errors. That is the way normal tools work, at least in linux. Then west update -v can spit out more stuff and perhaps west update -d can spit out loads of debug stuff also |
Most of the output of I don't think "normal" tools that download something are completely silent by default; probably because most interactive users don't want to wait minutes-long timeouts to discover network or server issues and they also want to have an idea of how much longer this is going to take. Note interactive use was not the main purpose of this bug. I think version control tools that download new versions are never silent by default, likely because most users want to know if there's new code (to rebase on, etc.)
|
@marc-hb basically took the words out of my mouth on this one. |
@mbolivar-nordic @marc-hb Perhaps you are talking about progress. This is what repo does: $ repo sync -j30 -n ... A new version of repo (2.15) is available. Fetching: 40% (427/1054) aosp/platform/frameworks/native If it showed the git output of 1k repos I would go mad! |
It's great for repo to have an "aggregate" progress bar and this is actually being discussed in #508 where we came from. It's not silent though and again I'm not sure downloading is really relevant to this bug; it wasn't mentioned in the description and using the network tends to have different verbosity by default. So maybe move this particular topic to a new issue? |
Thanks @marc-hb I have said my piece :-) |
I agree with @marc-hb that even repo is not "default quiet" given the example.
You must really strongly prefer (I do actually have that preference, and your point about it probably being a good idea for west to make progress bars a little quieter -- though still not silent -- by default is well taken.) I also agree that the assertion "well behaved command line tools should be silent on success by default" is historically true for Unix utilities. But it does not strike me as relevant to interactive tools like west, and it seems to me that other tools in the space (grepo, jiri, git itself) serve as counterexamples. So while I'm sympathetic to avoiding spammy output, I think quiet by default for all west commands is not the right thing. |
@mbolivar-nordic I'll settle for less noisy. The quieter the tool, the quieter I will become. I did not know that 'west update' is interactive, so perhaps that explains some of the console spam. I'd argue that git was written to be a little noisy partly because no one understood what it was doing. As it gets more mature perhaps it will quieten down? Oh yes, I think ninja is quite broken as a build tool. Perhaps it came from the Windows world. I've even seen an issue where people are begging for separate stdout/stderr and getting rejected. Perhaps we should teach posix in schools. |
Maybe but you're completely missing the different way downloading is always treated for the reasons listed above.
I've observed the opposite: the UI seems to have more suggestions and even new commands like https://blog.ted.com/the-quotable-linus-torvalds-live-onstage-at-ted/
https://stevebennett.me/2012/02/24/10-things-i-hate-about-git/ |
I think the most important thing would be to allow for a quiet option here (of course passing it to git). Changing the default is more controversial, and I think small steps are better than huge changes (since if we quieten west init/update down by default I am sure we will hear from many people who are not in this thread since they are not aware of the discussion, whereas if we just provide a new option, nobody will cry I suppose) As for details: I would do quiet being mutually exclusive with verbose! And verbose is for me lower prio since those commands are already pretty verbose. So I would add a quiet (-q) flag, wait for people to request verbose, and if they do, probably discuss whether make it mutually exclusive but that would be my first intuition. But the relative importance of "give me a way to silence this super-long output" vs "give me EVEN MORE output" is for me 10:1. |
While it is NOT exactly what was discussed in this issue, @pdgendt has just submitted a new |
By all means please re-open this issue if @pdgendt 's brand new |
Right now when flashing we get lots of output from both west and pyocd, for example:
When using west with sanitycheck in verbose mode, this is lots of output that disturbs the test progress reporting (might be relevant with sanitycheck -vv, but sanitycheck -v should not have this type of information).
Can we add support for -q (for quiet) with flash and probably with other commands please?
The text was updated successfully, but these errors were encountered: