get_paths_without_materialization
type
get_paths_without_materialization.get_paths_without_materialization
def get_paths_without_materialization.get_paths_without_materialization(
this,
ctx: bxl_ctx,
*,
abs: bool = False
)
The output paths of a cmd_args()
inputs. The output paths will be returned as a list. Takes an optional boolean to print the absolute or relative path. Note that this method returns an artifact path without asking for the artifact to be materialized, (i.e. it may not actually exist on the disk yet).
This is a risky function to call because you may accidentally pass this path to further BXL actions that expect the artifact to be materialized. If this happens, the BXL script will error out. If you want the path without materialization for other uses that don’t involve passing them into further actions, then it’s safe.
Sample usage:
def _impl_get_paths_without_materialization(ctx):
node = ctx.configured_targets("root//bin:the_binary")
providers = ctx.analysis(node).providers()
path = get_paths_without_materialization(providers[RunInfo], abs=True) # Note this artifact is NOT ensured or materialized
ctx.output.print(path)