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:
parent
7a84a8fe89
commit
d5aa75bbcf
1 changed files with 5 additions and 7 deletions
|
@ -968,13 +968,11 @@ impl<'o> VM<'o> {
|
|||
|
||||
/// Emit a warning with the given WarningKind and the source span
|
||||
/// of the current instruction.
|
||||
pub fn emit_warning(&mut self, _kind: WarningKind) {
|
||||
// TODO: put LightSpan in warning, calculate only *after* eval
|
||||
// TODO: what to do with the spans?
|
||||
// self.push_warning(EvalWarning {
|
||||
// kind,
|
||||
// span: self.current_span(),
|
||||
// });
|
||||
pub fn emit_warning(&mut self, kind: WarningKind) {
|
||||
self.push_warning(EvalWarning {
|
||||
kind,
|
||||
span: self.get_span(),
|
||||
});
|
||||
}
|
||||
|
||||
/// Interpolate string fragments by popping the specified number of
|
||||
|
|
Loading…
Reference in a new issue