std.deepForce - recursively force all parts of a value
- Dominant language
- Jsonnet
- Stars
- 7.6k
- Forks
- 475
- PR merge metrics
- No merged PRs in 30d
Description
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).
Contributor guide
Assessment
This issue has not been assessed yet.