From 5512108ca797184560c75bb2f356b699e88ee0ee Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 12 Aug 2022 16:34:39 +0300 Subject: fix(tvix/compiler): handle literal URL values The parser creates this node type from literal URL values. Technically these are deprecated and have been removed from nixpkgs. Change-Id: I4d05034dd9b4d8348e4ed8a2bbb37c1b6ccef8bc Reviewed-on: https://cl.tvl.fyi/c/depot/+/6173 Reviewed-by: grfn Reviewed-by: sterni Tested-by: BuildkiteCI --- tvix/eval/src/compiler.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tvix') diff --git a/tvix/eval/src/compiler.rs b/tvix/eval/src/compiler.rs index 7685e2f08c22..1a4e8df1da4d 100644 --- a/tvix/eval/src/compiler.rs +++ b/tvix/eval/src/compiler.rs @@ -132,7 +132,14 @@ impl Compiler { Ok(()) } - rnix::NixValue::String(_) => todo!(), + // These nodes are yielded by literal URL values. + rnix::NixValue::String(s) => { + // TODO(tazjin): emit deprecation warning + let idx = self.chunk.add_constant(Value::String(s.into())); + self.chunk.add_op(OpCode::OpConstant(idx)); + Ok(()) + } + rnix::NixValue::Path(_, _) => todo!(), } } -- cgit 1.4.1