elide-dev / elide

fast polyglot runtime
https://elide.dev
MIT License
100 stars 16 forks source link

[WIP] feat(node): add `child_process` module #1097

Open sgammon opened 1 month ago

sgammon commented 1 month ago

Draft Powered by Pull Request Badge

Summary

Adds initial support for Node's child_process module. Relates to:

Task list

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 64.98952% with 334 lines in your changes missing coverage. Please review.

Project coverage is 53.02%. Comparing base (652036f) to head (ecf6350).

Files with missing lines Patch % Lines
...vm/internals/node/childProcess/NodeChildProcess.kt 65.04% 118 Missing and 40 partials :warning:
...ime/intrinsics/js/node/childProcess/ForkOptions.kt 0.00% 77 Missing :warning:
...e/gvm/internals/node/childProcess/InterElideIPC.kt 0.00% 36 Missing :warning:
...c/main/kotlin/elide/runtime/exec/GuestExecution.kt 0.00% 13 Missing :warning:
...me/intrinsics/js/node/childProcess/SpawnOptions.kt 87.83% 1 Missing and 8 partials :warning:
...intrinsics/js/node/childProcess/ExecSyncOptions.kt 87.69% 2 Missing and 6 partials :warning:
...ntrinsics/js/node/childProcess/SpawnSyncOptions.kt 87.50% 2 Missing and 6 partials :warning:
...ime/intrinsics/js/node/childProcess/ExecOptions.kt 87.71% 2 Missing and 5 partials :warning:
...ackages/cli/src/main/kotlin/elide/tool/cli/main.kt 0.00% 6 Missing :warning:
...ckages/cli/src/main/kotlin/elide/tool/cli/Elide.kt 0.00% 3 Missing :warning:
... and 5 more
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/elide-dev/elide/pull/1097/graphs/tree.svg?width=650&height=150&src=pr&token=FXxhJlpKG3&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev)](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev) ```diff @@ Coverage Diff @@ ## main #1097 +/- ## ========================================== + Coverage 52.56% 53.02% +0.45% ========================================== Files 413 412 -1 Lines 15055 15419 +364 Branches 2720 2923 +203 ========================================== + Hits 7914 8176 +262 - Misses 6231 6257 +26 - Partials 910 986 +76 ``` | [Flag](https://app.codecov.io/gh/elide-dev/elide/pull/1097/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev) | Coverage Δ | | |---|---|---| | [jvm](https://app.codecov.io/gh/elide-dev/elide/pull/1097/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev) | `53.02% <64.98%> (+0.45%)` | :arrow_up: | | [lib](https://app.codecov.io/gh/elide-dev/elide/pull/1097/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev) | `53.02% <64.98%> (+0.45%)` | :arrow_up: | | [native](https://app.codecov.io/gh/elide-dev/elide/pull/1097/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/elide-dev/elide/pull/1097?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev) | Coverage Δ | | |---|---|---| | [...de/runtime/gvm/internals/node/events/NodeEvents.kt](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree&filepath=packages%2Fgraalvm%2Fsrc%2Fmain%2Fkotlin%2Felide%2Fruntime%2Fgvm%2Finternals%2Fnode%2Fevents%2FNodeEvents.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev#diff-cGFja2FnZXMvZ3JhYWx2bS9zcmMvbWFpbi9rb3RsaW4vZWxpZGUvcnVudGltZS9ndm0vaW50ZXJuYWxzL25vZGUvZXZlbnRzL05vZGVFdmVudHMua3Q=) | `47.85% <ø> (+0.77%)` | :arrow_up: | | [...elide/runtime/gvm/internals/node/path/NodePaths.kt](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree&filepath=packages%2Fgraalvm%2Fsrc%2Fmain%2Fkotlin%2Felide%2Fruntime%2Fgvm%2Finternals%2Fnode%2Fpath%2FNodePaths.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev#diff-cGFja2FnZXMvZ3JhYWx2bS9zcmMvbWFpbi9rb3RsaW4vZWxpZGUvcnVudGltZS9ndm0vaW50ZXJuYWxzL25vZGUvcGF0aC9Ob2RlUGF0aHMua3Q=) | `66.00% <100.00%> (+0.27%)` | :arrow_up: | | [...me/intrinsics/js/node/childProcess/ChildProcess.kt](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree&filepath=packages%2Fgraalvm%2Fsrc%2Fmain%2Fkotlin%2Felide%2Fruntime%2Fintrinsics%2Fjs%2Fnode%2FchildProcess%2FChildProcess.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev#diff-cGFja2FnZXMvZ3JhYWx2bS9zcmMvbWFpbi9rb3RsaW4vZWxpZGUvcnVudGltZS9pbnRyaW5zaWNzL2pzL25vZGUvY2hpbGRQcm9jZXNzL0NoaWxkUHJvY2Vzcy5rdA==) | `100.00% <100.00%> (ø)` | | | [...nsics/js/node/childProcess/ChildProcessDefaults.kt](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree&filepath=packages%2Fgraalvm%2Fsrc%2Fmain%2Fkotlin%2Felide%2Fruntime%2Fintrinsics%2Fjs%2Fnode%2FchildProcess%2FChildProcessDefaults.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev#diff-cGFja2FnZXMvZ3JhYWx2bS9zcmMvbWFpbi9rb3RsaW4vZWxpZGUvcnVudGltZS9pbnRyaW5zaWNzL2pzL25vZGUvY2hpbGRQcm9jZXNzL0NoaWxkUHJvY2Vzc0RlZmF1bHRzLmt0) | `100.00% <100.00%> (ø)` | | | [...rc/main/kotlin/elide/runtime/exec/GuestExecutor.kt](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree&filepath=packages%2Fengine%2Fsrc%2Fmain%2Fkotlin%2Felide%2Fruntime%2Fexec%2FGuestExecutor.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev#diff-cGFja2FnZXMvZW5naW5lL3NyYy9tYWluL2tvdGxpbi9lbGlkZS9ydW50aW1lL2V4ZWMvR3Vlc3RFeGVjdXRvci5rdA==) | `0.00% <0.00%> (ø)` | | | [...de/runtime/gvm/internals/node/fs/NodeFilesystem.kt](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree&filepath=packages%2Fgraalvm%2Fsrc%2Fmain%2Fkotlin%2Felide%2Fruntime%2Fgvm%2Finternals%2Fnode%2Ffs%2FNodeFilesystem.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev#diff-cGFja2FnZXMvZ3JhYWx2bS9zcmMvbWFpbi9rb3RsaW4vZWxpZGUvcnVudGltZS9ndm0vaW50ZXJuYWxzL25vZGUvZnMvTm9kZUZpbGVzeXN0ZW0ua3Q=) | `65.42% <94.73%> (+2.18%)` | :arrow_up: | | [...tlin/elide/runtime/gvm/internals/ProcessManager.kt](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree&filepath=packages%2Fgraalvm%2Fsrc%2Fmain%2Fkotlin%2Felide%2Fruntime%2Fgvm%2Finternals%2FProcessManager.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev#diff-cGFja2FnZXMvZ3JhYWx2bS9zcmMvbWFpbi9rb3RsaW4vZWxpZGUvcnVudGltZS9ndm0vaW50ZXJuYWxzL1Byb2Nlc3NNYW5hZ2VyLmt0) | `61.53% <33.33%> (-8.47%)` | :arrow_down: | | [.../internals/node/childProcess/ChildProcessNative.kt](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree&filepath=packages%2Fgraalvm%2Fsrc%2Fmain%2Fkotlin%2Felide%2Fruntime%2Fgvm%2Finternals%2Fnode%2FchildProcess%2FChildProcessNative.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev#diff-cGFja2FnZXMvZ3JhYWx2bS9zcmMvbWFpbi9rb3RsaW4vZWxpZGUvcnVudGltZS9ndm0vaW50ZXJuYWxzL25vZGUvY2hpbGRQcm9jZXNzL0NoaWxkUHJvY2Vzc05hdGl2ZS5rdA==) | `75.00% <75.00%> (ø)` | | | [...ckages/cli/src/main/kotlin/elide/tool/cli/Elide.kt](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree&filepath=packages%2Fcli%2Fsrc%2Fmain%2Fkotlin%2Felide%2Ftool%2Fcli%2FElide.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev#diff-cGFja2FnZXMvY2xpL3NyYy9tYWluL2tvdGxpbi9lbGlkZS90b29sL2NsaS9FbGlkZS5rdA==) | `36.44% <0.00%> (-0.35%)` | :arrow_down: | | [...ime/intrinsics/js/node/childProcess/StdioConfig.kt](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree&filepath=packages%2Fgraalvm%2Fsrc%2Fmain%2Fkotlin%2Felide%2Fruntime%2Fintrinsics%2Fjs%2Fnode%2FchildProcess%2FStdioConfig.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev#diff-cGFja2FnZXMvZ3JhYWx2bS9zcmMvbWFpbi9rb3RsaW4vZWxpZGUvcnVudGltZS9pbnRyaW5zaWNzL2pzL25vZGUvY2hpbGRQcm9jZXNzL1N0ZGlvQ29uZmlnLmt0) | `95.16% <95.16%> (ø)` | | | ... and [9 more](https://app.codecov.io/gh/elide-dev/elide/pull/1097?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev) | | ... and [12 files with indirect coverage changes](https://app.codecov.io/gh/elide-dev/elide/pull/1097/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/elide-dev/elide/pull/1097?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/elide-dev/elide/pull/1097?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev). Last update [652036f...ecf6350](https://app.codecov.io/gh/elide-dev/elide/pull/1097?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elide-dev).
sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
14 New issues
0 Accepted issues

Measures
0 Security Hotspots
65.4% Coverage on New Code
4.7% Duplication on New Code

See analysis details on SonarCloud