curved-television-6568
07/09/2021, 11:53 AM@@ -343,6 +346,7 @@ def test_inject_python_distribution_dependencies() -> None:
rule_runner = RuleRunner(
rules=[
inject_python_distribution_dependencies,
+ resolve_python_distribution_entry_points,
*import_rules(),
QueryRule(InjectedDependencies, [InjectPythonDistributionDependencies]),
],
I now get a whole bunch more graph issues…
E ValueError: Encountered 26 rule graph errors:
E No installed rules return the type AddressSpecs, and it was not provided by potential callers of @rule(pants.engine.internals.build_files:159:addresses_from_address_specs(AddressSpecs, GlobalOptions, AddressSpecsFilter) -> Addresses, gets=[Get(Address, AddressInput), Get(TargetAdaptor, Address), Get(UnexpandedTargets, Addresses), Get(Paths, PathGlobs), Get(AddressFamily, AddressFamilyDir)]).
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 installed rules return the type DependenciesRequest, and it was not provided by potential callers of @rule(pants.engine.internals.graph:729:resolve_dependencies(DependenciesRequest, UnionMembership, GlobalOptions) -> Addresses, gets=[Get(ExplicitlyProvidedDependencies, DependenciesRequest), Get(WrappedTarget, Address), Get(InferredDependencies, InferPythonImportDependencies), Get(Subtargets, Address), Get(Address, AddressInput)]).
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 installed rules return the type FilesystemSpecs, and it was not provided by potential callers of @rule(pants.engine.internals.graph:432:addresses_from_filesystem_specs(FilesystemSpecs, GlobalOptions) -> Addresses, gets=[Get(Paths, PathGlobs), Get(Owners, OwnersRequest)]).
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 installed rules return the type ResolvePythonDistributionEntryPointsRequest, and it was not provided by potential callers of @rule(pants.backend.python.target_types_rules:145:resolve_python_distribution_entry_points(ResolvePythonDistributionEntryPointsRequest) -> ResolvedPythonDistributionEntryPoints, gets=[Get(Targets, UnparsedAddressInputs), Get(ResolvedPexEntryPoint, ResolvePexEntryPointRequest)]).
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 installed rules return the type ResolvedPexEntryPoint to satisfy Get(ResolvedPexEntryPoint, ResolvePexEntryPointRequest) for @rule(pants.backend.python.target_types_rules:145:resolve_python_distribution_entry_points(ResolvePythonDistributionEntryPointsRequest) -> ResolvedPythonDistributionEntryPoints, gets=[Get(Targets, UnparsedAddressInputs), Get(ResolvedPexEntryPoint, ResolvePexEntryPointRequest)]).
E Ensure that the rule you are expecting to use is installed.
E No installed rules return the type Specs, and it was not provided by potential callers of @rule(pants.engine.internals.graph:471:resolve_addresses_from_specs(Specs) -> Addresses, gets=[Get(Addresses, AddressSpecs), Get(Addresses, FilesystemSpecs)]).
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 AddressSpecsFilter for @rule(pants.engine.internals.build_files:159:addresses_from_address_specs(AddressSpecs, GlobalOptions, AddressSpecsFilter) -> Addresses, gets=[Get(Address, AddressInput), Get(TargetAdaptor, Address), Get(UnexpandedTargets, Addresses), Get(Paths, PathGlobs), Get(AddressFamily, AddressFamilyDir)]). All potential sources were eliminated: []
E No source of dependency Get(Address, AddressInput) for @rule(pants.engine.internals.build_files:159:addresses_from_address_specs(AddressSpecs, GlobalOptions, AddressSpecsFilter) -> Addresses, gets=[Get(Address, AddressInput), Get(TargetAdaptor, Address), Get(UnexpandedTargets, Addresses), Get(Paths, PathGlobs), Get(AddressFamily, AddressFamilyDir)]). All potential sources were eliminated: []
E No source of dependency Get(Address, AddressInput) for @rule(pants.engine.internals.graph:729:resolve_dependencies(DependenciesRequest, UnionMembership, GlobalOptions) -> Addresses, gets=[Get(ExplicitlyProvidedDependencies, DependenciesRequest), Get(WrappedTarget, Address), Get(InferredDependencies, InferPythonImportDependencies), Get(Subtargets, Address), Get(Address, AddressInput)]). All potential sources were eliminated: []
E No source of dependency Get(AddressFamily, AddressFamilyDir) for @rule(pants.engine.internals.build_files:159:addresses_from_address_specs(AddressSpecs, GlobalOptions, AddressSpecsFilter) -> Addresses, gets=[Get(Address, AddressInput), Get(TargetAdaptor, Address), Get(UnexpandedTargets, Addresses), Get(Paths, PathGlobs), Get(AddressFamily, AddressFamilyDir)]). All potential sources were eliminated: []
E No source of dependency Get(Addresses, AddressSpecs) for @rule(pants.engine.internals.graph:471:resolve_addresses_from_specs(Specs) -> Addresses, gets=[Get(Addresses, AddressSpecs), Get(Addresses, FilesystemSpecs)]). All potential sources were eliminated: []
E No source of dependency Get(Addresses, FilesystemSpecs) for @rule(pants.engine.internals.graph:471:resolve_addresses_from_specs(Specs) -> Addresses, gets=[Get(Addresses, AddressSpecs), Get(Addresses, FilesystemSpecs)]). All potential sources were eliminated: []
E No source of dependency Get(ExplicitlyProvidedDependencies, DependenciesRequest) for @rule(pants.engine.internals.graph:729:resolve_dependencies(DependenciesRequest, UnionMembership, GlobalOptions) -> Addresses, gets=[Get(ExplicitlyProvidedDependencies, DependenciesRequest), Get(WrappedTarget, Address), Get(InferredDependencies, InferPythonImportDependencies), Get(Subtargets, Address), Get(Address, AddressInput)]). All potential sources were eliminated: []
E No source of dependency Get(InferredDependencies, InferPythonImportDependencies) for @rule(pants.engine.internals.graph:729:resolve_dependencies(DependenciesRequest, UnionMembership, GlobalOptions) -> Addresses, gets=[Get(ExplicitlyProvidedDependencies, DependenciesRequest), Get(WrappedTarget, Address), Get(InferredDependencies, InferPythonImportDependencies), Get(Subtargets, Address), Get(Address, AddressInput)]). All potential sources were eliminated: []
E No source of dependency Get(Owners, OwnersRequest) for @rule(pants.engine.internals.graph:432:addresses_from_filesystem_specs(FilesystemSpecs, GlobalOptions) -> Addresses, gets=[Get(Paths, PathGlobs), Get(Owners, OwnersRequest)]). All potential sources were eliminated: []
E No source of dependency Get(Paths, PathGlobs) for @rule(pants.engine.internals.build_files:159:addresses_from_address_specs(AddressSpecs, GlobalOptions, AddressSpecsFilter) -> Addresses, gets=[Get(Address, AddressInput), Get(TargetAdaptor, Address), Get(UnexpandedTargets, Addresses), Get(Paths, PathGlobs), Get(AddressFamily, AddressFamilyDir)]). All potential sources were eliminated: []
E No source of dependency Get(Paths, PathGlobs) for @rule(pants.engine.internals.graph:432:addresses_from_filesystem_specs(FilesystemSpecs, GlobalOptions) -> Addresses, gets=[Get(Paths, PathGlobs), Get(Owners, OwnersRequest)]). All potential sources were eliminated: []
E No source of dependency Get(Subtargets, Address) for @rule(pants.engine.internals.graph:729:resolve_dependencies(DependenciesRequest, UnionMembership, GlobalOptions) -> Addresses, gets=[Get(ExplicitlyProvidedDependencies, DependenciesRequest), Get(WrappedTarget, Address), Get(InferredDependencies, InferPythonImportDependencies), Get(Subtargets, Address), Get(Address, AddressInput)]). All potential sources were eliminated: []
E No source of dependency Get(TargetAdaptor, Address) for @rule(pants.engine.internals.build_files:159:addresses_from_address_specs(AddressSpecs, GlobalOptions, AddressSpecsFilter) -> Addresses, gets=[Get(Address, AddressInput), Get(TargetAdaptor, Address), Get(UnexpandedTargets, Addresses), Get(Paths, PathGlobs), Get(AddressFamily, AddressFamilyDir)]). All potential sources were eliminated: []
E No source of dependency Get(Targets, UnparsedAddressInputs) for @rule(pants.backend.python.target_types_rules:145:resolve_python_distribution_entry_points(ResolvePythonDistributionEntryPointsRequest) -> ResolvedPythonDistributionEntryPoints, gets=[Get(Targets, UnparsedAddressInputs), Get(ResolvedPexEntryPoint, ResolvePexEntryPointRequest)]). All potential sources were eliminated: []
E No source of dependency Get(UnexpandedTargets, Addresses) for @rule(pants.engine.internals.build_files:159:addresses_from_address_specs(AddressSpecs, GlobalOptions, AddressSpecsFilter) -> Addresses, gets=[Get(Address, AddressInput), Get(TargetAdaptor, Address), Get(UnexpandedTargets, Addresses), Get(Paths, PathGlobs), Get(AddressFamily, AddressFamilyDir)]). All potential sources were eliminated: []
E No source of dependency Get(WrappedTarget, Address) for @rule(pants.engine.internals.graph:729:resolve_dependencies(DependenciesRequest, UnionMembership, GlobalOptions) -> Addresses, gets=[Get(ExplicitlyProvidedDependencies, DependenciesRequest), Get(WrappedTarget, Address), Get(InferredDependencies, InferPythonImportDependencies), Get(Subtargets, Address), Get(Address, AddressInput)]). All potential sources were eliminated: []
E No source of dependency GlobalOptions for @rule(pants.engine.internals.build_files:159:addresses_from_address_specs(AddressSpecs, GlobalOptions, AddressSpecsFilter) -> Addresses, gets=[Get(Address, AddressInput), Get(TargetAdaptor, Address), Get(UnexpandedTargets, Addresses), Get(Paths, PathGlobs), Get(AddressFamily, AddressFamilyDir)]). All potential sources were eliminated: []
E No source of dependency GlobalOptions for @rule(pants.engine.internals.graph:432:addresses_from_filesystem_specs(FilesystemSpecs, GlobalOptions) -> Addresses, gets=[Get(Paths, PathGlobs), Get(Owners, OwnersRequest)]). All potential sources were eliminated: []
E No source of dependency GlobalOptions for @rule(pants.engine.internals.graph:729:resolve_dependencies(DependenciesRequest, UnionMembership, GlobalOptions) -> Addresses, gets=[Get(ExplicitlyProvidedDependencies, DependenciesRequest), Get(WrappedTarget, Address), Get(InferredDependencies, InferPythonImportDependencies), Get(Subtargets, Address), Get(Address, AddressInput)]). All potential sources were eliminated: []
E No source of dependency UnionMembership for @rule(pants.engine.internals.graph:729:resolve_dependencies(DependenciesRequest, UnionMembership, GlobalOptions) -> Addresses, gets=[Get(ExplicitlyProvidedDependencies, DependenciesRequest), Get(WrappedTarget, Address), Get(InferredDependencies, InferPythonImportDependencies), Get(Subtargets, Address), Get(Address, AddressInput)]). All potential sources were eliminated: []
Any help figuring out which rules (and/or QueryRules) needed appreciated. Looking at other tests, I can’t glean any hints as to what I could use.. will poke around some more on this in the mean time (only time you learn, is when trying to solve problems 😉 )No installed rules return the type ResolvedPexEntryPointafter spotting that one, I added the resolve_pex_entry_point, and et voila, it works. phew.
witty-crayon-22786
07/09/2021, 3:55 PMcurved-television-6568
07/09/2021, 4:16 PM