feat(tvix/eval): emit warnings with kinds and spans

In the past, we had `emit_warning` be no-op and we used `push_warnings` exclusively
but as we have consumers of this function, we need it to work somewhat.

Change-Id: I78a5ece199a473dec9ef5ea1fae60b36e35137b8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10477
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Ryan Lahfa 2023-12-31 00:00:50 +01:00 committed by tazjin
parent 7a84a8fe89
commit d5aa75bbcf

View file

@ -968,13 +968,11 @@ impl<'o> VM<'o> {
/// Emit a warning with the given WarningKind and the source span /// Emit a warning with the given WarningKind and the source span
/// of the current instruction. /// of the current instruction.
pub fn emit_warning(&mut self, _kind: WarningKind) { pub fn emit_warning(&mut self, kind: WarningKind) {
// TODO: put LightSpan in warning, calculate only *after* eval self.push_warning(EvalWarning {
// TODO: what to do with the spans? kind,
// self.push_warning(EvalWarning { span: self.get_span(),
// kind, });
// span: self.current_span(),
// });
} }
/// Interpolate string fragments by popping the specified number of /// Interpolate string fragments by popping the specified number of