-
Notifications
You must be signed in to change notification settings - Fork 365
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
fix: Improve custom commands formatters and add outputs #3228
base: release/2.0
Are you sure you want to change the base?
fix: Improve custom commands formatters and add outputs #3228
Conversation
def output_text(msg): | ||
ConanOutput().info(msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output text shouldn't use ConanOutput()
, that goes to sys.stderr, it should probably use cli_out_write()
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but ConanOutput()
is kind of "non-parseable" user output right? Why should it use cli_out_write()
? This is what was confusing to me and what I'd like to clarify with this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is a "formatter", it is intended for some kind of "final message" result. Even if in the text format is not machine readable, it should go to stdout
, not to stderr
, because it is the output of the command.
If that is not the case, and it is just informational message, it can be put in the command itself, and not in the formatter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still see the ConanOutput().info()
and not cli_out_write()
, did you forget to push changes?
def output_text(msg): | ||
ConanOutput().info(msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still see the ConanOutput().info()
and not cli_out_write()
, did you forget to push changes?
Co-authored-by: James <[email protected]>
Some additional info I found missing while I was developing custom commands for the build info