deps: document ; vs , in the expr param help (independent edges vs sibling groups) #353

Closed
opened 2026-07-23 04:03:27 +00:00 by hexajon · 0 comments
hexajon commented 2026-07-23 04:03:27 +00:00 (Migrated from codeberg.org)

Wiring several independent dependency edges in one deps_add call, my instinct is to comma-separate them like a list:

expr = "4 -> 18, 5 -> 18, 6 -> 18"

But , groups siblings into one group, so that parses as 4 -> {18,5} -> {18,6} -> ... and errors with a self-dependency (18 -> 18). The correct form for independent edges is ;:

expr = "4 -> 18; 5 -> 18; 6 -> 18"

The behavior is correct, and the error message is genuinely helpful - it explains the , semantics and points at ; with an example, so recovery is one shot.

The gap is discoverability before the error: the expr parameter help shows only the single-edge form (A -> B) and defers the multi-edge grammar to help topic=deps. Since comma-as-list is the natural first guess for "several independent things", it's an easy footgun.

Ask: inline a one-liner in the expr param description, e.g. "; separates independent edges; , groups siblings into one group (A -> B, C = A depends on both B and C)." Optionally add a "did you mean ;?" nudge on the self-dependency error, though it already gets close.

Wiring several *independent* dependency edges in one `deps_add` call, my instinct is to comma-separate them like a list: ``` expr = "4 -> 18, 5 -> 18, 6 -> 18" ``` But `,` groups siblings into one group, so that parses as `4 -> {18,5} -> {18,6} -> ...` and errors with a self-dependency (`18 -> 18`). The correct form for independent edges is `;`: ``` expr = "4 -> 18; 5 -> 18; 6 -> 18" ``` The behavior is correct, and the error message is genuinely helpful - it explains the `,` semantics and points at `;` with an example, so recovery is one shot. The gap is discoverability *before* the error: the `expr` parameter help shows only the single-edge form (`A -> B`) and defers the multi-edge grammar to `help topic=deps`. Since comma-as-list is the natural first guess for "several independent things", it's an easy footgun. **Ask:** inline a one-liner in the `expr` param description, e.g. *"`;` separates independent edges; `,` groups siblings into one group (`A -> B, C` = A depends on both B and C)."* Optionally add a "did you mean `;`?" nudge on the self-dependency error, though it already gets close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#353
No description provided.