I need help with this rule graph error. The contex...
# development
f
I need help with this rule graph error. The context is I added a rule to infer dependencies for a field that already had a dep inference rule.
The existing rule is:
Copy code
class InferJavaImportDependencies(InferDependenciesRequest):
    infer_from = JavaSourceField


@rule(desc="Inferring Java dependencies by analyzing imports")
async def infer_java_dependencies_via_imports(
    request: InferJavaImportDependencies,
    java_infer_subsystem: JavaInferSubsystem,
    first_party_dep_map: FirstPartyJavaPackageMapping,
) -> InferredDependencies:
    ...
I added:
Copy code
class InferJavaConsumedTypesDependencies(InferDependenciesRequest):
    infer_from = JavaSourceField


@rule(desc="Inferring Java dependencies by analyzing consumed and top-level types")
async def infer_java_dependencies_via_consumed_types(
    request: InferJavaConsumedTypesDependencies,
    first_party_dep_map: FirstPartyJavaPackageMapping,
) -> InferredDependencies:
the interesting thing is that the code for this second rule works fine if included in the body of the first rule (without having any second rule)
never mind, the file wasn’t using
collect_rules