OK y'all rule graph error debugging time :thread:
# development
b
OK y'all rule graph error debugging time ๐Ÿงต
โœ… 1
Finally getting to the "provide default partitioner" change for fmt/lint (yay).
registration_rules
will (if prompted) also
yield
a memoized classproperty rule which does the legwork for you. It works for everything I've changed... EXCEPT for
gofmt
.
I can comment everything but
"pants.backend.experimental.go",
out in
pants.toml
and it'll work
Also if I comment out
*gofmt_rules(),
from
src/python/pants/backend/experimental/go/register.py
it works
Copy code
No installed rules return the type GofmtRequest.PartitionRequest, and it was not provided by potential callers of @rule(pants.core.goals.fmt:179:default_single_partition_partitioner(GofmtRequest.PartitionRequest, GofmtSubsystem) -> Partitions, gets=[Get(SourcesPaths, [SourcesPathsRequest])]).
    If that type should be computed by a rule, ensure that that rule is installed.
    If it should be provided by a caller, ensure that it is included in any relevant Query or Get.
  No installed rules return the type GofmtSubsystem, and it was not provided by potential callers of @rule(pants.core.goals.fmt:179:default_single_partition_partitioner(GofmtRequest.PartitionRequest, GofmtSubsystem) -> Partitions, gets=[Get(SourcesPaths, [SourcesPathsRequest])]).
It's the subsystem ๐Ÿค”
Ah looks like
*GofmtSubsystem.rules(),
was never registered?!
Ahhh
collect_rules
registers the rules of the subsystem if its an input type.
Yikes ๐Ÿ˜