Previously in https://github.com/openllb/hlb/pull/289, SetAsync was introduced and each block literal was executed asynchronously by creating a chain of goroutines piping to each other. However in the example above, image("other") will only start resolving image config once image "alpine" was done because each line depended on the line above it.
In this PR, image("other") will be executed asynchronously, and copy will block until its arguments have resolved.
If a builtin Callable required an argument like input Value instead of input Filesystem, it is further delayed until the builtin decides to resolve input to a Filesystem, allowing the builtin to do things asynchronously before consuming input. (Used in a the fs cache(fs input, string ref) experiment). This is implemented by lazyValue.
This makes codegen fully asynchronous, as arguments will also be evaluating asynchronously.
Previously in https://github.com/openllb/hlb/pull/289,
SetAsync
was introduced and each block literal was executed asynchronously by creating a chain of goroutines piping to each other. However in the example above,image("other")
will only start resolving image config onceimage "alpine"
was done because each line depended on the line above it.In this PR,
image("other")
will be executed asynchronously, andcopy
will block until its arguments have resolved.If a builtin
Callable
required an argument likeinput Value
instead ofinput Filesystem
, it is further delayed until the builtin decides to resolveinput
to aFilesystem
, allowing the builtin to do things asynchronously before consuminginput
. (Used in a thefs cache(fs input, string ref)
experiment). This is implemented bylazyValue
.