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

Use global print output #395

Merged
merged 14 commits into from
Feb 12, 2025
Merged

Use global print output #395

merged 14 commits into from
Feb 12, 2025

Conversation

schneems
Copy link
Contributor

Switches from stdout to the global writer which defaults to stderr. This swich guarantees consistent print output when the print stream is dropped and then we have to construct a new one to emit an error message.

@schneems schneems marked this pull request as ready for review February 12, 2025 01:27
@schneems schneems requested a review from a team as a code owner February 12, 2025 01:27
Copy link
Contributor

@colincasey colincasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but can you explain the rationale behind switching from stdout to stderr again? What's the benefit there?

Base automatically changed from schneems/use_bullet_stream_cmd_interface to main February 12, 2025 19:47
@schneems
Copy link
Contributor Author

Looks good but can you explain the rationale behind switching from stdout to stderr again? What's the benefit there?

Sure. Here's an internal link https://salesforce-internal.slack.com/archives/C02GZCPPV38/p1738340566002289.

For everyone else, as an oversimplification: Stdout is for machines, stderr is for humans. Here's some more info https://unix.stackexchange.com/questions/331611/do-progress-reports-logging-information-belong-on-stderr-or-stdout.

As a related sidebar: I'm wanting to propose that $ pack CLI re-routes all buildpack output to stderr so that we can allow using pack build with unix pipes by emitting only specific, structured information to stdout. There's also some ordering issues that are related:

@schneems schneems changed the title [stacked] Use global print output Use global print output Feb 12, 2025
@schneems schneems force-pushed the schneems/global-print branch from 4871b3f to 54a3165 Compare February 12, 2025 19:53
@schneems schneems merged commit ef4af81 into main Feb 12, 2025
6 checks passed
@schneems schneems deleted the schneems/global-print branch February 12, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants