From cf772cc3eca04e3e103aeed438a7e694a531af4b Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Thu, 26 May 2022 18:14:54 +0000 Subject: [PATCH] fix: tests after friendly errors feature --- --- a/crates/jrsonnet-evaluator/tests/golden/missing_binding.jsonnet +++ b/crates/jrsonnet-evaluator/tests/golden/missing_binding.jsonnet @@ -1 +1 @@ -a +sta --- a/crates/jrsonnet-evaluator/tests/golden/missing_binding.jsonnet.golden +++ b/crates/jrsonnet-evaluator/tests/golden/missing_binding.jsonnet.golden @@ -1,3 +1,3 @@ -runtime error: variable is not defined: a -There is variable(s) with similar names present: std, test - missing_binding.jsonnet:1:1-3: variable access \ No newline at end of file +variable is not defined: sta +There is variable with similar name present: std + missing_binding.jsonnet:1:1-5: variable access \ No newline at end of file --- a/crates/jrsonnet-macros/src/lib.rs +++ b/crates/jrsonnet-macros/src/lib.rs @@ -529,7 +529,7 @@ } } else { quote! { - <#ty>::from_untyped(obj.get(s.clone(), #name.into())?.ok_or_else(|| Error::NoSuchField(#name.into()))?, s.clone())? + <#ty>::from_untyped(obj.get(s.clone(), #name.into())?.ok_or_else(|| Error::NoSuchField(#name.into(), vec![]))?, s.clone())? } }; -- gitstuff