Skip to content

ask path

Alexander Liberov edited this page Oct 21, 2026 · 2 revisions

ask: path

Every shortest call path from routine A to routine B. One of the diagram questions of the ask verb -- see Diagrams and Charts for the model, the bundle and click-to-source.

Asking it

Answered in-process by the engine (drag-lint ask); no PowerShell is needed (see Charts and the IDE).

drag-lint ask path --target MyApp.Orders.TOrderService.Post --to MyApp.Db.TConnection.Commit --db <project.sqlite>

In the IDE: drag-lint > Reports > Call path from this routine to another... with the caret on routine A; the menu then asks for routine B (a qualified name).

You select

Two routines: A (-Target) and B (-To).

The chart shows

Every SHORTEST route of calls from A to B. Each arrow is one call, labelled with its call site (file:line; several sites when A calls B from more than one line) and its grade: certain (bound to this routine) or ambiguous (bound to it, but another candidate survived on the type chain). More than -Cap paths (default 20) are drawn as the first 20 plus "+N more shortest paths not shown" -- the count is exact.

It stands on

The engine's call-path decides the question (found, and how many calls the shortest route takes); every route of that length is then enumerated over the same resolved call_edges, and call-path's own path must be one of them or nothing is drawn.

Parameters

-Cap (paths drawn, default 20). Run charts\src\Emit-Path.ps1 directly for -MaxDepth (longest route searched, default 20 calls -- call-path's own default).

Read it carefully

Only RESOLVED calls are on a path: a call the index matched by name alone has no call edge, so it is never drawn (the Legend says so). "No call path from A to B" within the depth cap is a refusal, not an empty chart; so are A = B and a routine the index does not know. For everything within N hops of one routine, both ways, ask butterfly with -Depth N -- there is no separate "neighbours" question.

Clone this wiki locally