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

[RFC] Fix --silent flag #2695

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Aug 15, 2023

Support for -s/--silent was accidentally dropped in 5998b56. I'm not actually sure what the most useful thing to do here is. The previous --silent CLI docs say

  -s --silent             Make ivy logs during script import resolution go silent instead of
                          printing; though failures will still throw exception.

However, from things like #1946 it seems clear that it's not just a matter of silencing ivy resolution, but would likely involve silencing other stuff as well.

This PR just silences everything, since it just stubs out the stdout/stderr streams, which would silence user-inserted printlns and other things. That also doesn't seem that useful given #1946. However, the use case of #1946 seems like it could be satisfied by show, which redirects all stdout to stderr so that only the final value being shown goes to stdout.

One option is to move --silent to a flag on show that squelches stderr, so that we can have show silence all non-JSON output while still allowing the JSON output to be used

I'm not sure what we should do here. Is there some spec for --silent that would be useful, and if so for what?

@lihaoyi lihaoyi changed the title Fix --silent flag [RFC] Fix --silent flag Aug 15, 2023
@lefou lefou marked this pull request as draft May 7, 2024 07:59
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 this pull request may close these issues.

1 participant