From 55d21a1389504d6d9872144077196bac9ee17feb Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 1 Sep 2022 19:57:55 +0300 Subject: refactor(tvix/eval): store spans instead of nodes in Warning/Error Another step towards being able to report accurate errors. The codemap spans contain strictly more accessible information, as they now retain information about which input file something came from. This required some shuffling around in the compiler to thread all the right information to the right places. Change-Id: I18ccfb20f07b0c33e1c4f51ca00cd09f7b2d19c6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6404 Reviewed-by: sterni Tested-by: BuildkiteCI --- tvix/eval/src/errors.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tvix/eval/src/errors.rs') diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs index 32d37d7815..aced6f6a55 100644 --- a/tvix/eval/src/errors.rs +++ b/tvix/eval/src/errors.rs @@ -52,13 +52,13 @@ pub enum ErrorKind { #[derive(Clone, Debug)] pub struct Error { - pub node: Option, pub kind: ErrorKind, + pub span: Option, } impl From for Error { fn from(kind: ErrorKind) -> Self { - Error { node: None, kind } + Error { span: None, kind } } } -- cgit 1.4.1