livery.workshop._invoke¶
livery.workshop._invoke ¶
How a step's path list reaches its tool: in how many calls.
The paths go on the tool's command line, where a step's template puts
them (livery.workshop._words.run_words). batches splits a path
list into the fewest calls the platform's command line allows, and
run_batched runs each call and merges their failures into one
refusal, so a long list never fails on the operating system's limit
and never stops at the first failing call.
Functions:
| Name | Description |
|---|---|
batches |
paths in the fewest calls whose arguments stay within limit bytes. |
run_batched |
Run call once per batch of paths; one refusal naming every failure. |
Attributes:
| Name | Type | Description |
|---|---|---|
ARGV_LIMIT |
|
batches ¶
paths in the fewest calls whose arguments stay within limit bytes.
In order: each call takes paths until the next would not fit. A path longer than the limit on its own goes in a call of its own, since there is no smaller way to pass it.
Source code in packages/workshop/src/livery/workshop/_invoke.py
run_batched ¶
run_batched(paths: Sequence[str], call: Callable[[tuple[str, ...]], None], *, limit: int = ARGV_LIMIT) -> None
Run call once per batch of paths; one refusal naming every failure.
Every batch runs even when an earlier one fails, so one gate shows every finding. An empty paths runs nothing.
Raises:
| Type | Description |
|---|---|
Failed
|
when any batch failed, with each failure's reason. |