When calling std.manifestYamlDoc(thing), for values that:
- are imported from another file
- are set to a key of the object being serialized to YAML
- would produce an error when evaluated
- are not evaluated at another point during execution of the Jsonnet code,
the error is swallowed and an empty value is rendered in the resulting YAML.
Minimal reproduction:
// imported.libsonnet
{
key:
assert false : "it broke";
"somestring",
}
// main.jsonnet
local busted = import 'imported.libsonnet';
std.manifestYamlDoc({key: busted})
Outputs:
If the value is evaluated by another operation during execution, e.g.:
// main.jsonnet
local busted = import 'imported.libsonnet';
std.manifestYamlDoc(std.trace(std.manifestJson({key: busted}), {key: busted}))
the error is raised as expected.