-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
chore: prefactor process manager #7034
chore: prefactor process manager #7034
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🟢 Turbopack Benchmark CI successful 🟢Thanks |
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.
Quick notes
pub async fn wait_with_piped_outputs<W: Write>( | ||
&mut self, | ||
mut stdout_pipe: W, | ||
mut stderr_pipe: Option<W>, |
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.
Independently capturing stderr wasn't an used outside of tests and can't be easily done with processes that are hooked up to a pseudo-terminal (possible, but involves redirecting stderr to a file and streaming that). In preparation we remove this feature.
.stdin(if open_stdin { | ||
Stdio::piped() | ||
} else { | ||
Stdio::null() | ||
}); |
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.
This is a behavior change as we will no longer have our children inherit our stdin
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 that matches the Go eversion)
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.
Just some minor API concerns, but otherwise LGTM.
🟢 CI successful 🟢Thanks |
Description
This PR lays some ground work for PTY support by hiding implementation details of building the command from users of the
ProcessManager
. The public interface forProcessManager
andChild
after this PR no longer use any part oftokio::process
.This PR adds our own
Command
struct that is intended to be used withProcessManager::spawn
instead of the raw command builder type which in the future might beportable_pty::CommandBuilder
. This approach offers a few benefits:stdin
. This was never intended behavior, but an oversight of us not explicitly callingstdin(Stdio::piped())
orstdin(Stdio::null())
.Testing Instructions
Existing test suite and 👀
Each commit should be easily reviewable on its own.
Closes TURBO-2070