git.delta.rocks / jrsonnet / refs/commits / a62fc6b07a0f

difftreelog

fix static analysis error should mark file as non-evaluating

xlrsvnowYaroslav Bolyukin2026-10-07parent: #b9d891c.patch.diff
in: master

1 file changed

modifiedcrates/jrsonnet-evaluator/src/lib.rsdiffbeforeafterboth
423 drop(file_cache);423 drop(file_cache);
424 let (externals, thunks) = self.create_default_context(file_name).build();424 let (externals, thunks) = self.create_default_context(file_name).build();
425 let report = analyze_root(&parsed, externals);425 let report = analyze_root(&parsed, externals);
426 if report.errored {426 let res = if report.errored {
427 return Err(StaticAnalysisError(report.diagnostics_list).into());427 Err(StaticAnalysisError(report.diagnostics_list).into())
428 }428 } else {
429 debug_assert_eq!(report.root_shape.n_locals as usize, thunks.len());429 debug_assert_eq!(report.root_shape.n_locals as usize, thunks.len());
430 debug_assert!(report.root_shape.captures.is_empty());430 debug_assert!(report.root_shape.captures.is_empty());
431 let ctx = Context::root(thunks);431 let ctx = Context::root(thunks);
432 let res = evaluate::evaluate(ctx, &report.lir);432 evaluate::evaluate(ctx, &report.lir)
433 };
433434
434 let mut file_cache = self.file_cache();435 let mut file_cache = self.file_cache();
435 let mut file = file_cache.entry(path);436 let mut file = file_cache.entry(path);