about summary refs log tree commit diff
path: root/tvix/Cargo.lock
diff options
context:
space:
mode:
authorAspen Smith <root@gws.fyi>2024-05-27T18·15-0400
committerclbot <clbot@tvl.fyi>2024-06-01T09·04+0000
commit96ce9aea046b584c411afdc210e73764f27ff202 (patch)
tree58148203dd243f3498f85f831b76e18236235215 /tvix/Cargo.lock
parentbbced9222cba640e4f90adb0af55e0533c591b45 (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.lock')
-rw-r--r--tvix/Cargo.lock1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock
index 9ad121371264..fa2c2c3dcc52 100644
--- a/tvix/Cargo.lock
+++ b/tvix/Cargo.lock
@@ -4119,6 +4119,7 @@ dependencies = [
  "clap",
  "dirs",
  "nix-compat",
+ "rnix",
  "rustyline",
  "thiserror",
  "tokio",