diff options
author | Aspen Smith <root@gws.fyi> | 2024-05-27T18·15-0400 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-06-01T09·04+0000 |
commit | 96ce9aea046b584c411afdc210e73764f27ff202 (patch) | |
tree | 58148203dd243f3498f85f831b76e18236235215 /tvix/Cargo.nix | |
parent | bbced9222cba640e4f90adb0af55e0533c591b45 (diff) |
feat(tvix/repl): Support multiline input r/8186
Transparently support multiline input in the Tvix REPL, by handling the UnexpectedEOF error returned by the parser and using it to progressively build up an input expr over multiple iterations of the REPL's outer loop. This works quite nicely: ❯ cargo r --bin tvix Compiling tvix-cli v0.1.0 (/home/aspen/code/depot/tvix/cli) Finished dev [unoptimized + debuginfo] target(s) in 1.72s Running `target/debug/tvix` tvix-repl> { foo > = > 1; > } => { foo = 1; } :: set <press up arrow> tvix-repl> { foo = 1; } => { foo = 1; } :: set Change-Id: Ib0ed4766b13e8231d696cdc27281ac158e20a777 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11732 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: aspen <root@gws.fyi> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/Cargo.nix')
-rw-r--r-- | tvix/Cargo.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix index f56618114031..1addf005dea9 100644 --- a/tvix/Cargo.nix +++ b/tvix/Cargo.nix @@ -13043,6 +13043,10 @@ rec { packageId = "nix-compat"; } { + name = "rnix"; + packageId = "rnix"; + } + { name = "rustyline"; packageId = "rustyline"; } |