Has the idea come up yet to support a trace intrin...
# development
Has the idea come up yet to support a trace intrinsic? It would be useful to be able to add something like this to a rule to debug:
Copy code
trace = await Get(Trace, Here())
print(f"At {here}")
And have a rendering of the stack of rules that are suspended waiting on the current (
) rule.
I don't think it has! I like that a lot! What do you mean rules that are suspended?
The call stack. Most vivdly, for
await Get
calls you are literally suspended. For chaining rule input parameters its less vivid.
There can be more than one stack of course, so there would need to be some choice. Maybe paramtrizable
Put another way or rendered anothe way - the subgraph of the rule graph waiting on me.
we have that (for better or worse) in two forms: workunits and the Graph
so yea, could do.
also, in case you do this: i’m about 90% sure we’ll need to support non-
usage at some point (i.e. for methods of the `Console`/`Workspace`), particularly for https://github.com/pantsbuild/pants/issues/10542
👍 1
(in case that would allow for better syntax here)