-
-
Notifications
You must be signed in to change notification settings - Fork 67
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: com-lihaoyi/os-lib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.10.2
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: com-lihaoyi/os-lib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.10.4
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 15 commits
- 18 files changed
- 4 contributors
Commits on May 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c38eb0f - Browse repository at this point
Copy the full SHA c38eb0fView commit details -
Enable already-passing native tests (#273)
`ExampleTests`, `ProcessPipelineTests`, and `SpawningSubprocessTests` still fail seemingly spuriously. But at least the ones that already pass we can enable
Configuration menu - View commit details
-
Copy full SHA for e86cec8 - Browse repository at this point
Copy the full SHA e86cec8View commit details
Commits on May 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 17e73fd - Browse repository at this point
Copy the full SHA 17e73fdView commit details
Commits on Jun 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0dbc51a - Browse repository at this point
Copy the full SHA 0dbc51aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 81dd55b - Browse repository at this point
Copy the full SHA 81dd55bView commit details
Commits on Jul 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6c3a300 - Browse repository at this point
Copy the full SHA 6c3a300View commit details
Commits on Jul 20, 2024
-
Add API to redirect
os.Inherit
ed streams globally to be consistent ……with std streams redirections (#283) Fixes #282 Unlike usage of `System.in`/`System.out`/`System.err` programmatically, or the `scala.Console` equivalents, output from subprocesses with `os.Inherit` is not affected by `System.setIn`/`setOut`/`setErr`. This is often counterintuitive, because you expect redirecting these streams to redirect all output, only to find output from subprocess leaking through a side channel to the original process `in`/`out`/`err`. This PR adds the `os.Inherit.in`/`out`/`err` dynamic variables, which can be used to re-assign `os.Inherit` on a scoped threadlocal basis. This allows developers who use `System.setOut` or `Console.withOut` to also redirect subprocess output within the scope of the stdout redirect, without users working within those scopes to have to remember to redirect them manually at every callsite. Because we do not control `System.setOut` or `Console.withOut`, there isn't really a way for us to detect and do this automatically (e.g. redirects may happen even before OS-Lib has been even classloaded) and so we have to rely on it being opt-in. As an escape hatch, in case users do not want this behavior, we provide a `os.Inherit0` redirect which performs identically to the original `os.Inherit` even in the process of redirecting `os.Inherit.{in,out,err}` Covered by an added unit test
Configuration menu - View commit details
-
Copy full SHA for 59b5fd9 - Browse repository at this point
Copy the full SHA 59b5fd9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39a93cb - Browse repository at this point
Copy the full SHA 39a93cbView commit details
Commits on Jul 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c422212 - Browse repository at this point
Copy the full SHA c422212View commit details
Commits on Aug 4, 2024
-
Move test projects into
os/test/
folder (#289)They aren't important enough to be top-level folders, since they really belong to the test suite
Configuration menu - View commit details
-
Copy full SHA for 6ab4c65 - Browse repository at this point
Copy the full SHA 6ab4c65View commit details
Commits on Aug 5, 2024
-
Added proper SIGTERM/SIGKILL handling for sub-processes (#286)
Fixes #284. The idea is to introduce a new flag to both `os.proc.call` and `os.ProcGroup.call`, as well as backing implementations in `os.ProcessLike`. The flag, `timeoutGracePeriod`, allows for a configurable use of `SIGKILL`, which forcibly kills a process, after the issue of a `SIGTERM`, which allows a process to clean up. The values for the flag have the following behaviours: |value | behaviour| |------|-----------| | -1 | When `timeout != -1`, only a `SIGTERM` will be issued, requiring the child process to gracefully terminate. | | 0 | When `timeout != -1`, only a `SIGKILL` is issued, demanding the child terminate immediately with no chance of graceful cleanup. | | n > 0 | `timeout != -1`, first issue a `SIGTERM` and then wait for a further `n` milliseconds before issuing a `SIGKILL`, this provides a reasonable timeframe for process cleanup, but accounts for misbehaving processes. | For now, the default has been set to `timeoutGracePeriod = 1000`.
Configuration menu - View commit details
-
Copy full SHA for 6609238 - Browse repository at this point
Copy the full SHA 6609238View commit details
Commits on Aug 6, 2024
-
Update scalafmt version from 3.8.2 to 3.8.3 (#288)
Pull request: #288
Configuration menu - View commit details
-
Copy full SHA for 8508910 - Browse repository at this point
Copy the full SHA 8508910View commit details -
Configuration menu - View commit details
-
Copy full SHA for c36de15 - Browse repository at this point
Copy the full SHA c36de15View commit details
Commits on Aug 19, 2024
-
Add lightweight syntax for
os.proc().call()
andos.proc().spawn()
(……#292) Now these can be spelled `os.call()` and `os.spawn()`, and we provide `Shellable[TupleN]` conversions to make it convenient to call without constructing a `Seq(...)` every time. So this: ```scala os.proc("ls", "doesnt-exist").call(cwd = wd, check = false, stderr = os.Pipe) ``` Becomes ```scala os.call(cmd = ("ls", "doesnt-exist"), cwd = wd, check = false, stderr = os.Pipe) ``` The original purpose of the `os.proc().call()` style was to avoid the verbosity of constructing a `Seq` each time, and by making it flexible enough to take tuples, this mitigates that issue without the annoying method chaining style. The new style still isn't actually shorter in terms of number of characters, but it is a lot cleaner in terms of "function call taking named/optional arguments" rather than "fluent call chain with first call taking varargs and second call taking named/optional parameters". It also aligns with the Python `subprocess.*` functions which OS-Lib in general is inspired by To support Scala 2, the `Shellable[TupleN]` conversions are defined using codegen. Scala 3 allows a nicer generic-tuple implementation, but we'll be supporting Scala 2 for the foreseeable future. The older `os.proc.*` APIs remain, both for backwards compatibility, as well as to support the `pipeTo` API used to construct process pipelines Duplicated some of the existing subprocess tests to exercise the new APIs. Did not duplicate all of them, as the new APIs are pretty dumb forwarders to the existing ones so we don't need to exercise every flag in detail. Updated the docs to point towards the new APIs, but with a mention that the older `os.proc().call()` style is still supported
Configuration menu - View commit details
-
Copy full SHA for 0b62438 - Browse repository at this point
Copy the full SHA 0b62438View commit details -
Configuration menu - View commit details
-
Copy full SHA for f76569f - Browse repository at this point
Copy the full SHA f76569fView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 0.10.2...0.10.4