refactor(tvix/eval): remove todo!() calls in compiler

It is impossible for tvixbolt to recover from panics, so the user
experience of typing an expression using an unsupported feature was
that it would get sad and stop responding to input.

Instead, raise a normal value-level error of a new variant and
continue where possible.

Change-Id: Ibe016c92cacb87b85095c0f83758eddc6468053e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6528
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2022-09-11 23:12:02 +03:00 committed by tazjin
parent 0dc2b19ebe
commit 1844c788f5
4 changed files with 29 additions and 5 deletions

View file

@ -30,7 +30,11 @@ impl Compiler<'_, '_> {
/// 3. Attribute sets can (optionally) be recursive.
pub(super) fn compile_attr_set(&mut self, slot: LocalIdx, node: ast::AttrSet) {
if node.rec_token().is_some() {
todo!("recursive attribute sets are not yet implemented")
let span = self.span_for(&node);
self.emit_warning(
span,
WarningKind::NotImplemented("recursive attribute sets are not yet implemented"),
);
}
// Open a scope to track the positions of the temporaries used