Skip to content

std.deepForce - recursively force all parts of a value #779

Open
@sbarzowski

Description

@sbarzowski

It can be useful for:
(a) troubleshooting - it can be temporarily added to simplify the stack traces when some value is used somewhere deeply
(b) improve stack traces for functions which will traverse the value anyway - e.g. custom manifesters.
(c) optimizing memory usage (may be tricky to get right).

A function like this can be already implemented with Jsonnet. One way to do so is to use assert to force object fields/array elements and then return the value itself (assert allows us to actually calculate something, but return a completely different thing). It needs to be a builtin for it to really make sense (otherwise both performance and stack traces would probably suffer).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions