Repository navigation
fix(core): do not throw error if worker.stdout is not instanceof socket - #34224
Conversation
👷 Deploy request for nx-docs pending review.Visit the deploys page to approve it
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hello 👋 - this is a bug in both Bun and Deno it turns out. I've created reproductions and issue reports for them. I'll update this PR to dodge the check where necessary, but there could still be a few dragons as neither are officially supported runtimes. Bun and Deno are typically treated in the same way .NET CLI is treated for Nx. Nx itself runs in This isnt to say it won't work, or that it shouldn't work, but generally the stance is that if something's breaking when using them to run nx itself, that points to a bug in bun or deno, not Nx. |
|
View your CI Pipeline Execution ↗ for commit 24d8517
☁️ Nx Cloud last updated this comment at |
|
Hey 👋, thanks for the response. Makes perfect sense to me that nx doesn't officially support deno or bun. Thanks for making those issues. I like what you did checking the runtime and warning instead of strictly erroring. Am new here, what does it take to get this merged and released? Other than fix the 3 failing checks |
|
I'll get it the rest of the way over the line, thanks for kicking it off :) |
deno worker.stdout is a Readable/Writeable. To provide better deno support an error should not be thrown
…port Add a new utility function to handle piping and unreffing child process streams with cross-runtime compatibility. The function: - Pipes the source to destination - Attempts to unref the source stream - Uses duck-typing to check for unref support - Provides helpful warnings for alternative runtimes (Bun/Deno)
There was a problem hiding this comment.
Nx Cloud has identified a flaky task in your failed CI:
Since the failure was identified as flaky, the solution is to rerun CI. Because this branch comes from a fork, it is not possible for us to push directly, but you can rerun by pushing an empty commit:
git commit --allow-empty -m "chore: trigger rerun"
git push
🎓 Learn more about Self-Healing CI on nx.dev
…et (#34224) deno worker.stdout is a Readable/Writeable. To provide better deno support an error should not be thrown <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> If `worker.stdout` or `worker.stderr` are not instanceof Socket then nx throws an error. This is problematic in Deno where `stdout` and `stderr` are Readable/Writable and not Socket. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> `startupPluginWorker` function should work in Deno runtime ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> - denoland/deno#31961 - oven-sh/bun#26505 --------- Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com> (cherry picked from commit e189dcc)
|
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. |
deno worker.stdout is a Readable/Writeable. To provide better deno support an error should not be thrown
Current Behavior
If
worker.stdoutorworker.stderrare not instanceof Socket then nx throws an error. This is problematic in Deno wherestdoutandstderrare Readable/Writable and not Socket.Expected Behavior
startupPluginWorkerfunction should work in Deno runtimeRelated Issue(s)