From 9002b9d1a837c7870f7a84e0107792077cedfb41 Mon Sep 17 00:00:00 2001 From: alpibrupa Date: Fri, 26 Jun 2026 09:28:15 +0200 Subject: [PATCH] =?UTF-8?q?Migrate=20to=20lex=200.10.0=20(std.proc=20?= =?UTF-8?q?=E2=86=92=20std.process)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 2 +- examples/manifesto_full_chain/orchestrator.lex | 4 ++-- examples/manifesto_full_chain/orchestrator_bad.lex | 4 ++-- src/tools/attestation_query.lex | 4 ++-- src/tools/effects_of.lex | 4 ++-- src/tools/lex_audit.lex | 4 ++-- src/tools/lex_check.lex | 4 ++-- src/tools/lex_cli.lex | 4 ++-- src/tools/lex_run.lex | 4 ++-- src/tools/lex_spec_check.lex | 4 ++-- src/tools/lex_spec_smt.lex | 4 ++-- src/tools/lex_store_apply.lex | 4 ++-- src/tools/lex_store_diff.lex | 4 ++-- src/tools/lex_store_merge.lex | 4 ++-- src/tools/lex_test.lex | 4 ++-- src/tools/linter.lex | 6 +++--- src/tools/load_guidelines.lex | 4 ++-- src/tools/os_check.lex | 4 ++-- src/tools/sigid_lookup.lex | 4 ++-- src/tools/standard/bash.lex | 4 ++-- src/tools/standard/glob.lex | 4 ++-- src/tools/standard/grep.lex | 4 ++-- src/tools/vcs/ast_diff.lex | 4 ++-- src/tools/vcs/branch_create.lex | 4 ++-- src/tools/vcs/branch_current.lex | 4 ++-- src/tools/vcs/branch_list.lex | 4 ++-- src/tools/vcs/branch_overlay.lex | 4 ++-- src/tools/vcs/branch_peek.lex | 4 ++-- src/tools/vcs/branch_show.lex | 4 ++-- src/tools/vcs/branch_use.lex | 4 ++-- src/tools/vcs/merge_commit.lex | 4 ++-- src/tools/vcs/merge_defer.lex | 4 ++-- src/tools/vcs/merge_resolve.lex | 4 ++-- src/tools/vcs/merge_start.lex | 4 ++-- src/tools/vcs/merge_status.lex | 4 ++-- src/tools/vcs/op_log.lex | 4 ++-- src/tools/vcs/op_pull.lex | 4 ++-- src/tools/vcs/op_push.lex | 4 ++-- src/tools/vcs/op_show.lex | 4 ++-- 40 files changed, 79 insertions(+), 79 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca9a120..c6805b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: - name: Install Lex toolchain run: | set -euxo pipefail - LEX_VERSION="0.9.14" + LEX_VERSION="0.10.0" curl -fsSL -o /tmp/lex.tgz \ "https://github.com/alpibrusl/lex-lang/releases/download/v${LEX_VERSION}/lex-v${LEX_VERSION}-x86_64-unknown-linux-gnu.tar.gz" tar -xzf /tmp/lex.tgz -C /tmp/ diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6c21787..3dbacea 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,7 +27,7 @@ jobs: - name: Install lex if: steps.ver.outputs.changed == 'true' run: | - curl -fsSL "https://github.com/alpibrusl/lex-lang/releases/download/v0.9.14/lex-v0.9.14-x86_64-unknown-linux-gnu.tar.gz" \ + curl -fsSL "https://github.com/alpibrusl/lex-lang/releases/download/v0.10.0/lex-v0.10.0-x86_64-unknown-linux-gnu.tar.gz" \ | tar -xz --strip-components=1 -C /usr/local/bin - name: Mint JWT + publish diff --git a/examples/manifesto_full_chain/orchestrator.lex b/examples/manifesto_full_chain/orchestrator.lex index 7b1dc2e..16129fc 100644 --- a/examples/manifesto_full_chain/orchestrator.lex +++ b/examples/manifesto_full_chain/orchestrator.lex @@ -34,7 +34,7 @@ import "std.http" as http import "std.bytes" as bytes -import "std.proc" as proc +import "std.process" as proc import "std.sql" as sql @@ -113,7 +113,7 @@ fn validate_snippet(code :: Str) -> [proc, io, fs_write] Bool { let __mkdir := fs.mkdir_p("/tmp/lex_validate") match io.write("/tmp/lex_validate/snippet.lex", code) { Err(_) => false, - Ok(_) => match proc.spawn("lex", ["check", "/tmp/lex_validate/snippet.lex"]) { + Ok(_) => match proc.run("lex", ["check", "/tmp/lex_validate/snippet.lex"]) { Ok(r) => r.exit_code == 0, Err(_) => false, }, diff --git a/examples/manifesto_full_chain/orchestrator_bad.lex b/examples/manifesto_full_chain/orchestrator_bad.lex index 9a530e1..424bcbd 100644 --- a/examples/manifesto_full_chain/orchestrator_bad.lex +++ b/examples/manifesto_full_chain/orchestrator_bad.lex @@ -19,7 +19,7 @@ import "std.http" as http import "std.bytes" as bytes -import "std.proc" as proc +import "std.process" as proc import "std.sql" as sql @@ -91,7 +91,7 @@ fn validate_snippet(code :: Str) -> [proc, io, fs_write] Bool { let __mkdir := fs.mkdir_p("/tmp/lex_validate") match io.write("/tmp/lex_validate/snippet.lex", code) { Err(_) => false, - Ok(_) => match proc.spawn("lex", ["check", "/tmp/lex_validate/snippet.lex"]) { + Ok(_) => match proc.run("lex", ["check", "/tmp/lex_validate/snippet.lex"]) { Ok(r) => r.exit_code == 0, Err(_) => false, }, diff --git a/src/tools/attestation_query.lex b/src/tools/attestation_query.lex index 62d3c4a..005bf5c 100644 --- a/src/tools/attestation_query.lex +++ b/src/tools/attestation_query.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -24,7 +24,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => ["store", "attestations", fn_name], Some(path) => ["store", "attestations", "--path", path, fn_name], } - match proc.spawn("lex", cmd_args) { + match proc.run("lex", cmd_args) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => { let result := if str.is_empty(out.stdout) { diff --git a/src/tools/effects_of.lex b/src/tools/effects_of.lex index 73fb122..4a563e8 100644 --- a/src/tools/effects_of.lex +++ b/src/tools/effects_of.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -21,7 +21,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => Err(e.single("", "missing_field", "fn_name is required")), Some(fn_name) => { let target := util.field_str_or(args, "path", ".") - match proc.spawn("lex", ["check", "--json", "--effects", fn_name, target]) { + match proc.run("lex", ["check", "--json", "--effects", fn_name, target]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => if out.exit_code == 0 { Ok(JStr(out.stdout)) diff --git a/src/tools/lex_audit.lex b/src/tools/lex_audit.lex index 6c12fbf..fc570c3 100644 --- a/src/tools/lex_audit.lex +++ b/src/tools/lex_audit.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -21,7 +21,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => Err(e.single("", "missing_field", "query is required")), Some(query) => { let target := util.field_str_or(args, "path", ".") - match proc.spawn("lex", ["audit", query, target]) { + match proc.run("lex", ["audit", query, target]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), } diff --git a/src/tools/lex_check.lex b/src/tools/lex_check.lex index f760e67..e7770e4 100644 --- a/src/tools/lex_check.lex +++ b/src/tools/lex_check.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -18,7 +18,7 @@ fn params() -> s.ModelSchema { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { let target := util.field_str_or(args, "path", ".") - match proc.spawn("lex", ["check", target]) { + match proc.run("lex", ["check", target]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => { let output := if out.exit_code == 0 { diff --git a/src/tools/lex_cli.lex b/src/tools/lex_cli.lex index 0a17782..4e2c07b 100644 --- a/src/tools/lex_cli.lex +++ b/src/tools/lex_cli.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -19,7 +19,7 @@ fn params() -> s.ModelSchema { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { match util.field_str(args, "command") { None => Err(e.single("", "missing_field", "command is required")), - Some(cmd) => match proc.spawn("bash", ["-c", str.concat("lex ", cmd)]) { + Some(cmd) => match proc.run("bash", ["-c", str.concat("lex ", cmd)]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => { let combined := str.concat(out.stdout, out.stderr) diff --git a/src/tools/lex_run.lex b/src/tools/lex_run.lex index 9e96958..76ddbe1 100644 --- a/src/tools/lex_run.lex +++ b/src/tools/lex_run.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -26,7 +26,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => ["run", path, fn_name], Some(fn_args) => ["run", path, fn_name, fn_args], } - match proc.spawn("lex", cmd_args) { + match proc.run("lex", cmd_args) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), } diff --git a/src/tools/lex_spec_check.lex b/src/tools/lex_spec_check.lex index 4a54cf2..dbcee3a 100644 --- a/src/tools/lex_spec_check.lex +++ b/src/tools/lex_spec_check.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -24,7 +24,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => 100, Some(n) => n, } - match proc.spawn("lex", ["spec", "check", "--count", int.to_str(count), target]) { + match proc.run("lex", ["spec", "check", "--count", int.to_str(count), target]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => { let output := if out.exit_code == 0 { diff --git a/src/tools/lex_spec_smt.lex b/src/tools/lex_spec_smt.lex index 1722d3d..2b95bcc 100644 --- a/src/tools/lex_spec_smt.lex +++ b/src/tools/lex_spec_smt.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -24,7 +24,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => ["spec", "smt", path], Some(out_path) => ["spec", "smt", "--out", out_path, path], } - match proc.spawn("lex", out_args) { + match proc.run("lex", out_args) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), } diff --git a/src/tools/lex_store_apply.lex b/src/tools/lex_store_apply.lex index af3cbeb..f2bd19c 100644 --- a/src/tools/lex_store_apply.lex +++ b/src/tools/lex_store_apply.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -19,7 +19,7 @@ fn params() -> s.ModelSchema { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { match util.field_str(args, "operation") { None => Err(e.single("", "missing_field", "operation is required")), - Some(op_json) => match proc.spawn("lex", ["store", "apply", op_json]) { + Some(op_json) => match proc.run("lex", ["store", "apply", op_json]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => if out.exit_code == 0 { Ok(JStr(str.concat("applied\n", out.stdout))) diff --git a/src/tools/lex_store_diff.lex b/src/tools/lex_store_diff.lex index c04afd5..2511776 100644 --- a/src/tools/lex_store_diff.lex +++ b/src/tools/lex_store_diff.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -21,7 +21,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => Err(e.single("", "missing_field", "sigid_a is required")), Some(a) => match util.field_str(args, "sigid_b") { None => Err(e.single("", "missing_field", "sigid_b is required")), - Some(b) => match proc.spawn("lex", ["store", "diff", a, b]) { + Some(b) => match proc.run("lex", ["store", "diff", a, b]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), }, diff --git a/src/tools/lex_store_merge.lex b/src/tools/lex_store_merge.lex index dce7f3f..2ceb080 100644 --- a/src/tools/lex_store_merge.lex +++ b/src/tools/lex_store_merge.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -23,7 +23,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => Err(e.single("", "missing_field", "left is required")), Some(left) => match util.field_str(args, "right") { None => Err(e.single("", "missing_field", "right is required")), - Some(right) => match proc.spawn("lex", ["store", "merge", base, left, right]) { + Some(right) => match proc.run("lex", ["store", "merge", base, left, right]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => if out.exit_code == 0 { Ok(JStr(str.concat("merged\n", out.stdout))) diff --git a/src/tools/lex_test.lex b/src/tools/lex_test.lex index 3d5d891..d015ccd 100644 --- a/src/tools/lex_test.lex +++ b/src/tools/lex_test.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -18,7 +18,7 @@ fn params() -> s.ModelSchema { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { let target := util.field_str_or(args, "path", "tests") - match proc.spawn("lex", ["run", target, "run_all"]) { + match proc.run("lex", ["run", target, "run_all"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => { let output := if out.exit_code == 0 { diff --git a/src/tools/linter.lex b/src/tools/linter.lex index 611e289..fab8c36 100644 --- a/src/tools/linter.lex +++ b/src/tools/linter.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -162,7 +162,7 @@ fn translate_lex_error(raw :: Str) -> Str { } fn run_lex_fmt(path :: Str) -> [proc] LintOutcome { - match proc.spawn("bash", ["-c", str.concat("\"${LEX:-lex}\" fmt ", path)]) { + match proc.run("bash", ["-c", str.concat("\"${LEX:-lex}\" fmt ", path)]) { Err(msg) => LintWarn("lex fmt", str.concat("could not run: ", msg)), Ok(out) => if out.exit_code == 0 { if str.contains(str.trim(out.stdout), "reformatted") { @@ -177,7 +177,7 @@ fn run_lex_fmt(path :: Str) -> [proc] LintOutcome { } fn run_lex_check(path :: Str) -> [proc] LintOutcome { - match proc.spawn("bash", ["-c", str.concat("\"${LEX:-lex}\" check ", path)]) { + match proc.run("bash", ["-c", str.concat("\"${LEX:-lex}\" check ", path)]) { Err(msg) => LintFail("lex check", str.concat("could not run: ", msg)), Ok(out) => if out.exit_code == 0 { LintOk("lex check") diff --git a/src/tools/load_guidelines.lex b/src/tools/load_guidelines.lex index 5858681..01d01ad 100644 --- a/src/tools/load_guidelines.lex +++ b/src/tools/load_guidelines.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "lex-llm/tool" as t @@ -13,7 +13,7 @@ fn params() -> s.ModelSchema { } fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { - match proc.spawn("lex", ["agent-guidelines"]) { + match proc.run("lex", ["agent-guidelines"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => if out.exit_code == 0 { Ok(JStr(out.stdout)) diff --git a/src/tools/os_check.lex b/src/tools/os_check.lex index 32633cd..e10dfa1 100644 --- a/src/tools/os_check.lex +++ b/src/tools/os_check.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -69,7 +69,7 @@ fn extract_effects(check_json :: jv.Json) -> List[Str] { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { let path := util.field_str_or(args, "path", ".") let mode := util.field_str_or(args, "mode", "build") - match proc.spawn("lex", ["--output", "json", "check", path]) { + match proc.run("lex", ["--output", "json", "check", path]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => if out.exit_code != 0 { Err(e.single("", "lex_check_failed", str.concat(out.stdout, out.stderr))) diff --git a/src/tools/sigid_lookup.lex b/src/tools/sigid_lookup.lex index 468ee0b..556518a 100644 --- a/src/tools/sigid_lookup.lex +++ b/src/tools/sigid_lookup.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -19,7 +19,7 @@ fn params() -> s.ModelSchema { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { match util.field_str(args, "sigid") { None => Err(e.single("", "missing_field", "sigid is required")), - Some(sigid) => match proc.spawn("lex", ["store", "lookup", sigid]) { + Some(sigid) => match proc.run("lex", ["store", "lookup", sigid]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => if out.exit_code == 0 { Ok(JStr(out.stdout)) diff --git a/src/tools/standard/bash.lex b/src/tools/standard/bash.lex index bc22ad1..c949a4c 100644 --- a/src/tools/standard/bash.lex +++ b/src/tools/standard/bash.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -19,7 +19,7 @@ fn params() -> s.ModelSchema { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { match util.field_str(args, "command") { None => Err(e.single("", "missing_field", "command is required")), - Some(cmd) => match proc.spawn("bash", ["-c", cmd]) { + Some(cmd) => match proc.run("bash", ["-c", cmd]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => { let combined := str.concat(out.stdout, out.stderr) diff --git a/src/tools/standard/glob.lex b/src/tools/standard/glob.lex index 6ae8afc..ffa9b34 100644 --- a/src/tools/standard/glob.lex +++ b/src/tools/standard/glob.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -21,7 +21,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => Err(e.single("", "missing_field", "pattern is required")), Some(pattern) => { let dir := util.field_str_or(args, "directory", ".") - match proc.spawn("find", [dir, "-name", pattern, "-type", "f"]) { + match proc.run("find", [dir, "-name", pattern, "-type", "f"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => { let result := if str.is_empty(out.stdout) { diff --git a/src/tools/standard/grep.lex b/src/tools/standard/grep.lex index 4dced9e..e2a4658 100644 --- a/src/tools/standard/grep.lex +++ b/src/tools/standard/grep.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -21,7 +21,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => Err(e.single("", "missing_field", "pattern is required")), Some(pattern) => match util.field_str(args, "path") { None => Err(e.single("", "missing_field", "path is required")), - Some(path) => match proc.spawn("grep", ["-r", "-n", pattern, path]) { + Some(path) => match proc.run("grep", ["-r", "-n", pattern, path]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => { let result := if str.is_empty(out.stdout) { diff --git a/src/tools/vcs/ast_diff.lex b/src/tools/vcs/ast_diff.lex index c97a248..c230bdf 100644 --- a/src/tools/vcs/ast_diff.lex +++ b/src/tools/vcs/ast_diff.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -21,7 +21,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => Err(e.single("", "missing_field", "file_a is required")), Some(a) => match util.field_str(args, "file_b") { None => Err(e.single("", "missing_field", "file_b is required")), - Some(b) => match proc.spawn("lex", ["diff", a, b, "--json"]) { + Some(b) => match proc.run("lex", ["diff", a, b, "--json"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), }, diff --git a/src/tools/vcs/branch_create.lex b/src/tools/vcs/branch_create.lex index c501d1f..dd7105e 100644 --- a/src/tools/vcs/branch_create.lex +++ b/src/tools/vcs/branch_create.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -28,7 +28,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { Some(f) => ["--from", f], } let cmd := list.concat(base, from_args) - match proc.spawn("lex", cmd) { + match proc.run("lex", cmd) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), } diff --git a/src/tools/vcs/branch_current.lex b/src/tools/vcs/branch_current.lex index a15e735..53d87a2 100644 --- a/src/tools/vcs/branch_current.lex +++ b/src/tools/vcs/branch_current.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -15,7 +15,7 @@ fn params() -> s.ModelSchema { } fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { - match proc.spawn("lex", ["branch", "current", "--output", "json"]) { + match proc.run("lex", ["branch", "current", "--output", "json"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), } diff --git a/src/tools/vcs/branch_list.lex b/src/tools/vcs/branch_list.lex index 7f810e0..93c1307 100644 --- a/src/tools/vcs/branch_list.lex +++ b/src/tools/vcs/branch_list.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -15,7 +15,7 @@ fn params() -> s.ModelSchema { } fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { - match proc.spawn("lex", ["branch", "list", "--output", "json"]) { + match proc.run("lex", ["branch", "list", "--output", "json"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), } diff --git a/src/tools/vcs/branch_overlay.lex b/src/tools/vcs/branch_overlay.lex index 3b7784a..fd5103f 100644 --- a/src/tools/vcs/branch_overlay.lex +++ b/src/tools/vcs/branch_overlay.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -28,7 +28,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { Some(b) => ["--on", b], } let cmd := list.concat(base, on_args) - match proc.spawn("lex", cmd) { + match proc.run("lex", cmd) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), } diff --git a/src/tools/vcs/branch_peek.lex b/src/tools/vcs/branch_peek.lex index 658f94b..1649ca4 100644 --- a/src/tools/vcs/branch_peek.lex +++ b/src/tools/vcs/branch_peek.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -32,7 +32,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { Some(v) => ["--vs", v], } let cmd := list.concat(base, list.concat(fork_args, vs_args)) - match proc.spawn("lex", cmd) { + match proc.run("lex", cmd) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), } diff --git a/src/tools/vcs/branch_show.lex b/src/tools/vcs/branch_show.lex index b586d11..08b2d1b 100644 --- a/src/tools/vcs/branch_show.lex +++ b/src/tools/vcs/branch_show.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -19,7 +19,7 @@ fn params() -> s.ModelSchema { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { match util.field_str(args, "branch") { None => Err(e.single("", "missing_field", "branch is required")), - Some(name) => match proc.spawn("lex", ["branch", "show", name, "--output", "json"]) { + Some(name) => match proc.run("lex", ["branch", "show", name, "--output", "json"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), }, diff --git a/src/tools/vcs/branch_use.lex b/src/tools/vcs/branch_use.lex index 25681da..703a6d9 100644 --- a/src/tools/vcs/branch_use.lex +++ b/src/tools/vcs/branch_use.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -19,7 +19,7 @@ fn params() -> s.ModelSchema { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { match util.field_str(args, "branch") { None => Err(e.single("", "missing_field", "branch is required")), - Some(name) => match proc.spawn("lex", ["branch", "use", name, "--output", "json"]) { + Some(name) => match proc.run("lex", ["branch", "use", name, "--output", "json"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), }, diff --git a/src/tools/vcs/merge_commit.lex b/src/tools/vcs/merge_commit.lex index 566d515..1edf92b 100644 --- a/src/tools/vcs/merge_commit.lex +++ b/src/tools/vcs/merge_commit.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -19,7 +19,7 @@ fn params() -> s.ModelSchema { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { match util.field_str(args, "merge_id") { None => Err(e.single("", "missing_field", "merge_id is required")), - Some(id) => match proc.spawn("lex", ["merge", "commit", id, "--output", "json"]) { + Some(id) => match proc.run("lex", ["merge", "commit", id, "--output", "json"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), }, diff --git a/src/tools/vcs/merge_defer.lex b/src/tools/vcs/merge_defer.lex index b015b51..b6f7601 100644 --- a/src/tools/vcs/merge_defer.lex +++ b/src/tools/vcs/merge_defer.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -21,7 +21,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => Err(e.single("", "missing_field", "merge_id is required")), Some(id) => match util.field_str(args, "conflict_id") { None => Err(e.single("", "missing_field", "conflict_id is required")), - Some(cid) => match proc.spawn("lex", ["merge", "defer", id, cid, "--output", "json"]) { + Some(cid) => match proc.run("lex", ["merge", "defer", id, cid, "--output", "json"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), }, diff --git a/src/tools/vcs/merge_resolve.lex b/src/tools/vcs/merge_resolve.lex index 81d0993..b1c7982 100644 --- a/src/tools/vcs/merge_resolve.lex +++ b/src/tools/vcs/merge_resolve.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -21,7 +21,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => Err(e.single("", "missing_field", "merge_id is required")), Some(id) => match util.field_str(args, "resolutions_file") { None => Err(e.single("", "missing_field", "resolutions_file is required")), - Some(file) => match proc.spawn("lex", ["merge", "resolve", id, "--file", file, "--output", "json"]) { + Some(file) => match proc.run("lex", ["merge", "resolve", id, "--file", file, "--output", "json"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), }, diff --git a/src/tools/vcs/merge_start.lex b/src/tools/vcs/merge_start.lex index 883fe06..a3c43b5 100644 --- a/src/tools/vcs/merge_start.lex +++ b/src/tools/vcs/merge_start.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -21,7 +21,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { None => Err(e.single("", "missing_field", "src is required")), Some(src) => match util.field_str(args, "dst") { None => Err(e.single("", "missing_field", "dst is required")), - Some(dst) => match proc.spawn("lex", ["merge", "start", "--src", src, "--dst", dst, "--output", "json"]) { + Some(dst) => match proc.run("lex", ["merge", "start", "--src", src, "--dst", dst, "--output", "json"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), }, diff --git a/src/tools/vcs/merge_status.lex b/src/tools/vcs/merge_status.lex index 5dbc2ce..13f6760 100644 --- a/src/tools/vcs/merge_status.lex +++ b/src/tools/vcs/merge_status.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -19,7 +19,7 @@ fn params() -> s.ModelSchema { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { match util.field_str(args, "merge_id") { None => Err(e.single("", "missing_field", "merge_id is required")), - Some(id) => match proc.spawn("lex", ["merge", "status", id, "--output", "json"]) { + Some(id) => match proc.run("lex", ["merge", "status", id, "--output", "json"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), }, diff --git a/src/tools/vcs/op_log.lex b/src/tools/vcs/op_log.lex index 52f0803..6a0717d 100644 --- a/src/tools/vcs/op_log.lex +++ b/src/tools/vcs/op_log.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -29,7 +29,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { Some(n) => ["--limit", n], } let cmd := list.concat(base, list.concat(branch_args, limit_args)) - match proc.spawn("lex", cmd) { + match proc.run("lex", cmd) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), } diff --git a/src/tools/vcs/op_pull.lex b/src/tools/vcs/op_pull.lex index a535046..efcfbea 100644 --- a/src/tools/vcs/op_pull.lex +++ b/src/tools/vcs/op_pull.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -36,7 +36,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { _ => [], } let cmd := list.concat(base, list.concat(branch_args, list.concat(limit_args, dry_args))) - match proc.spawn("lex", cmd) { + match proc.run("lex", cmd) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), } diff --git a/src/tools/vcs/op_push.lex b/src/tools/vcs/op_push.lex index 858ee49..5620e17 100644 --- a/src/tools/vcs/op_push.lex +++ b/src/tools/vcs/op_push.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -32,7 +32,7 @@ fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { _ => [], } let cmd := list.concat(base, list.concat(branch_args, dry_args)) - match proc.spawn("lex", cmd) { + match proc.run("lex", cmd) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), } diff --git a/src/tools/vcs/op_show.lex b/src/tools/vcs/op_show.lex index 1e20436..9c80fb1 100644 --- a/src/tools/vcs/op_show.lex +++ b/src/tools/vcs/op_show.lex @@ -1,4 +1,4 @@ -import "std.proc" as proc +import "std.process" as proc import "std.str" as str @@ -19,7 +19,7 @@ fn params() -> s.ModelSchema { fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] { match util.field_str(args, "op_id") { None => Err(e.single("", "missing_field", "op_id is required")), - Some(id) => match proc.spawn("lex", ["op", "show", id, "--output", "json"]) { + Some(id) => match proc.run("lex", ["op", "show", id, "--output", "json"]) { Err(msg) => Err(e.single("", "proc_error", msg)), Ok(out) => Ok(JStr(str.concat(out.stdout, out.stderr))), },