Skip to main content

bxl.Lazy type

bxl.Lazy can be resolved to the actual result. The computation only happens when called .resolve() or try_resolve().

bxl.Lazy.catch

def bxl.Lazy.catch() -> bxl.Lazy

Make Lazy can be resolved later by catching the error.

Example:

def _impl(ctx):
target = ctx.configured_targets("cell//path/to:target")
analysis_result = ctx.lazy.analysis(target).catch().resolve()

bxl.Lazy.resolve

def bxl.Lazy.resolve()

Resolve the operation to the actual result without catching the error.

Example:

def _impl(ctx):
target = ctx.configured_targets("cell//path/to:target")
analysis_result = ctx.lazy.analysis(target).resolve()