```E ValueError: Encountered 3 rule graph er...
# plugins
f
Copy code
E       ValueError: Encountered 3 rule graph errors:
E         No installed rules return the type WrappedTargetRequest, and it was not provided by potential callers of @rule(pants.engine.internals.graph:327:resolve_target(WrappedTargetRequest, TargetTypesToGenerateTargetsRequests) -> WrappedTarget, gets=[Get(_TargetParametrizations, _TargetParametrizationsRequest)]).
E           If that type should be computed by a rule, ensure that that rule is installed.
E           If it should be provided by a caller, ensure that it is included in any relevant Query or Get.
E         No source of dependency Get(_TargetParametrizations, _TargetParametrizationsRequest) for @rule(pants.engine.internals.graph:327:resolve_target(WrappedTargetRequest, TargetTypesToGenerateTargetsRequests) -> WrappedTarget, gets=[Get(_TargetParametrizations, _TargetParametrizationsRequest)]). All potential sources were eliminated: []
E         No source of dependency TargetTypesToGenerateTargetsRequests for @rule(pants.engine.internals.graph:327:resolve_target(WrappedTargetRequest, TargetTypesToGenerateTargetsRequests) -> WrappedTarget, gets=[Get(_TargetParametrizations, _TargetParametrizationsRequest)]). All potential sources were eliminated: []
any ideas on what rule need to be put into RuleRunner to satisfy this rule graph error?
pants.engine.internals.graph
is already listed.
1
c
It's looks like it's trying to find a *Request rule, does it need to be provided by a query rule?
f
maybe? not from the test I wrote, but maybe the test helper that I’m calling
added
QueryRule(_TargetParametrizations, (_TargetParametrizationsRequest,)),
— no change in error
c
maybe I'm reading the error wrong, but it looks like it has that rule, but is looking for a rule to produce a WrappedTargetRequest. Looking through the code, I can't find one which does: it looks like it's always constructed in-place. So maybe a
QueryRule(???, (WrappedTargetRequest,))
?
c
I’ve always found it hard to deduce what is missing from the exception message itself, running with trace logging enabled however, gives a dot graph output of the failing graph subtree that includes the level above the logged issue which is much more helpful in guiding what is going on.
f
problem solved. chatted with @hundreds-father-404, apparently
wrapped_target = await Get(WrappedTarget, Address, addr)
became
wrapped_target = await Get(WrappedTarget, WrappedTargetRequest(addr, description_of_origin="…"))
and my PR was old so intervening semantic change