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

feat(core): create a new function to run child processes via rust #21070

Conversation

FrozenPandaz
Copy link
Collaborator

@FrozenPandaz FrozenPandaz commented Jan 9, 2024

Current Behavior

Using the command option in project targets uses a node implementation that takes away interactivity from the running command. For example, when trying to run jest in a command, we do not see the progress bar.

Expected Behavior

The command option will now run a psuedo terminal, where we will be able to see interactivity. This allows Nx to be more seamless when running on workspaces that have pcv3 enabled.

The forked process task runner is also updated to use the psuedo terminal as well for forking processes.

Related Issue(s)

Fixes #

Copy link

vercel bot commented Jan 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Jan 16, 2024 10:18pm

@FrozenPandaz FrozenPandaz force-pushed the feature/nxc-154-use-the-new-function-in-forked-process-task-runner branch from b1a26c3 to 5ec29ca Compare January 9, 2024 23:09
@FrozenPandaz FrozenPandaz marked this pull request as ready for review January 11, 2024 19:51
@FrozenPandaz FrozenPandaz requested review from vsavkin and a team as code owners January 11, 2024 19:51
@Cammisuli Cammisuli force-pushed the feature/nxc-154-use-the-new-function-in-forked-process-task-runner branch from 57d35e6 to 37d0211 Compare January 15, 2024 19:43
@FrozenPandaz FrozenPandaz requested a review from a team as a code owner January 16, 2024 16:48
@Cammisuli Cammisuli force-pushed the feature/nxc-154-use-the-new-function-in-forked-process-task-runner branch from 97a7ccc to 4de5a7d Compare January 16, 2024 16:49
@Cammisuli Cammisuli force-pushed the feature/nxc-154-use-the-new-function-in-forked-process-task-runner branch from 4de5a7d to fef0c71 Compare January 16, 2024 16:54
@Cammisuli Cammisuli force-pushed the feature/nxc-154-use-the-new-function-in-forked-process-task-runner branch from bcf403d to eb50e01 Compare January 16, 2024 22:14
@FrozenPandaz FrozenPandaz enabled auto-merge (squash) January 17, 2024 00:03
Copy link
Member

@AgentEnder AgentEnder 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, few.comments that can easily wait for a cleanup pr

): Promise<boolean> {
env = processEnv(color, cwd, env);
// The rust runCommand is always a tty, so it will not look nice in parallel and if we need prefixes
// currently does not work properly in windows
Copy link
Member

Choose a reason for hiding this comment

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

Cleanup: fixed - remove in new pr

@@ -107,7 +120,155 @@ export class ForkedProcessTaskRunner {
});
}

public forkProcessPipeOutputCapture(
public async forkProcessLegacy(
Copy link
Member

Choose a reason for hiding this comment

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

Cleanup (next pr): add depreciation and todo

@FrozenPandaz FrozenPandaz disabled auto-merge January 17, 2024 07:56
@FrozenPandaz FrozenPandaz merged commit d4f3e63 into master Jan 17, 2024
6 checks passed
@FrozenPandaz FrozenPandaz deleted the feature/nxc-154-use-the-new-function-in-forked-process-task-runner branch January 17, 2024 07:57
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants