Extract various classes to the shared modules, `ExecutablePython` now has `env` map as it can be used by conda.
GitOrigin-RevId: eb45ea29f49132fa4f91c979f71453e6a2ade344
Use `ExecService` `api.kt` to exec any binary and extensions from `execService.python/api.kt` for python-specific things (i.e helpers)
GitOrigin-RevId: bb217798a9d1ee886c4b12220ec1f66a5ef08336
According to feedback, the name `upgrade` confuses people.
We refused `getEelApi` because this call usually implies a getter, and a getter usually implies some lightweight operation.
We refused `make`, `convert`, `get` and other short methods because they're as confusing as `upgrade`.
GitOrigin-RevId: 56adf5362f93bc4f98954db79c039e5e898b4550
It is not convenient to use progress reporting: it is sometimes better to collect it explicitly to customize output
GitOrigin-RevId: 79a68ec8b35540cfdc6aab4fda54245a7a270247
To migrate `runExecutable` to `ExecService`, we must report progress somehow.
We now emulate something like `runCommandLine` by reporting stdout/stderr as a progress.
GitOrigin-RevId: 3df511f797b06c02458c0cc30920b1ba7c20edfd
1. `ProcessOutput` is a legacy thing with some redundant flags: replaced with modern `EelProcessExecutionResult`.
2. There was a bug in `ProcessInteractiveHandler`: one could fetch all data from stdout, and we then did that again to get a result. That leads to an empty result. It is now fixed, see `executeInteractive` doc.
GitOrigin-RevId: 7fa57f8110a202a32a3531ff6507d42a270075a3
See `TestApplicationWithEel` for the explanation of `osesMayNotHaveRemoteEels` option.
See `RunExecutableTest` for usage.
GitOrigin-RevId: b7546d831328087993a6fc8e53ccf39dcd758bc5
DO:
For upper-level (public) API use `PyResult`.
(Optionally) for low-level APIs inside your modules use python `Result<S, E>`.
Represent errors as `PyError` whenever possible.
Report `PyError` to `ErrorSink` at the top of your code.
DON'T:
Use `kotlin.Result`
Use `PyExecutionException`
Use any exception to represent user errors.
GitOrigin-RevId: 4ecf69e1fae8be9192cd33b90e0147c725a98964
+ replace processDescription and timeout fields with ExecOptions
+ add workingDirectory and env variables to exec options
+ support ProcessOutputTransformer for cases when both stdout/stderr and custom error handling is needed
+ make PyError classes open to have custom business errors
GitOrigin-RevId: 99c969e730cdbf23df4c9b176a43f78ede43001a
This service should be used to execute one-shot processes (when you are only interested in execute-and-get-result).
It also supports simple helpers.
Code is fully Eel-compatible.
See `ExecService` and its showcase as an entry.
GitOrigin-RevId: 38f04914667b9b6c979c3cfe5acdd48718a75229