about summary refs log tree commit diff
path: root/tvix/eval/src/warnings.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-12T14·07+0300
committertazjin <tazjin@tvl.su>2022-08-26T17·19+0000
commit7e77972d71967c65e5446e55673869ef2a8d27bb (patch)
treeb7c3f470eb00465ca9b50a4314e88aeff2ad0984 /tvix/eval/src/warnings.rs
parent5512108ca797184560c75bb2f356b699e88ee0ee (diff)
feat(tvix/eval): add mechanism for emitting warnings from compiler r/4507
These can be used predominantly to emit warnings about things that the
compiler can infer, such as deprecated language features.

Change-Id: I3649c625459d7f3f95cdf42d5c651d23d66569ec
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6174
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/warnings.rs')
-rw-r--r--tvix/eval/src/warnings.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tvix/eval/src/warnings.rs b/tvix/eval/src/warnings.rs
new file mode 100644
index 000000000000..4406d0510651
--- /dev/null
+++ b/tvix/eval/src/warnings.rs
@@ -0,0 +1,11 @@
+/// Warnings are emitted in cases where code passed to Tvix exhibits
+/// problems that the user could address.
+
+#[derive(Debug)]
+pub enum WarningKind {}
+
+#[derive(Debug)]
+pub struct EvalWarning {
+    pub node: rnix::SyntaxNode,
+    pub kind: WarningKind,
+}