-
Notifications
You must be signed in to change notification settings - Fork 70
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
Consider using stdout in bin/build instead of launch.toml #14
Comments
@dzuelke |
In addition, we've seen with the previous generation of buildpacks, that many authors and others who interacted with buildpacks considered the use of stdout for conveying information problematic in practice. We've seen requests to move further away from using stdout, rather than closer, so we now have input in both directions. |
@jkutner but surely if you write a buildpack in another language, you wouldn't just @nebhale I'm not sure I follow. I'm saying that stdout shouldn't be used for informational output, but stderr, which is standard Unix practice, and which is what almost all programs do. It's the reason you can do |
Sorry, I was sloppy with my terminology. What I mean to say is: In addition, we've seen with the previous generation of buildpacks, that many authors and others who interacted with buildpacks considered the use of stdin/stdout for conveying programmatic input/output problematic in practice. We've seen requests to move further away from using stdin/stdout for programmatic input/output, rather than closer, so we now have design requests in both directions. |
Appreciate the feedback @dzuelke! Definitely want to make sure these interfaces are reasonable.
I definitely agree with this practice for command line utilities on UNIX systems. That said, I'm not convinced that we should do this for Here are some disadvantages I can think of:
Do those reasons make sense to you? What benefits do you see for sending the metadata to stdout? |
I guess :) Thanks folks! It was just a minor nitpick really. |
As an alternative to writing a
launch.toml
, thebin/build
script could be considered a proper program in the Unix sense: it writes status info (such as all build progress info) to stderr, and its program output, which more or less is the launch info, to stdout.It's trivial to simply send everything that's written by programs or
echo
to stderr at the beginning of a script:That way, buildpack authors must not pay special attention to e.g. programs they're calling misbehaving by printing informational output to stdout instead of stderr.
Same then for
bin/develop
, which would no longer have to writedevelop.toml
./cc @jkutner
The text was updated successfully, but these errors were encountered: