Skip to main content

Lazy

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

Lazy.catch

def 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()

Lazy.resolve

def 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()