Exemple #1
0
def rules():
    return (
        *collect_rules(),
        UnionRule(GenerateTargetsRequest, GenerateTargetsFromFiles),
        UnionRule(GenerateTargetsRequest, GenerateTargetsFromResources),
        UnionRule(GenerateSourcesRequest, RelocateFilesViaCodegenRequest),
        UnionRule(PackageFieldSet, ArchiveFieldSet),
    )
Exemple #2
0
def rules():
    return [
        *collect_rules(),
        *lockfile.rules(),
        UnionRule(FmtRequest, ScalafmtRequest),
        UnionRule(LintTargetsRequest, ScalafmtRequest),
        UnionRule(GenerateToolLockfileSentinel, ScalafmtToolLockfileSentinel),
    ]
Exemple #3
0
def rules():
    return (
        *collect_rules(),
        *lockfile.rules(),
        *python_sources.rules(),
        UnionRule(GenerateToolLockfileSentinel, Flake8LockfileSentinel),
        UnionRule(ExportPythonToolSentinel, Flake8ExportSentinel),
    )
Exemple #4
0
 def rules(cls):
     return (
         *super().rules(),
         RootRule(TargetsWithOrigins),
         UnionRule(cls.FieldSetSuperclass, cls.FieldSetSubclass1),
         UnionRule(cls.FieldSetSuperclass, cls.FieldSetSubclass2),
         UnionRule(cls.FieldSetSuperclassWithOrigin, cls.FieldSetSubclassWithOrigin),
     )
Exemple #5
0
def rules():
    return [
        *collect_rules(),
        *jvm_tool.rules(),
        UnionRule(FmtRequest, GoogleJavaFormatRequest),
        UnionRule(GenerateToolLockfileSentinel,
                  GoogleJavaFormatToolLockfileSentinel),
    ]
Exemple #6
0
def rules():
    return [
        *collect_rules(),
        UnionRule(PythonFmtRequest, BlackRequest),
        UnionRule(LintRequest, BlackRequest),
        *pex.rules(),
        *stripped_source_files.rules(),
    ]
Exemple #7
0
def rules():
    return (
        *collect_rules(),
        UnionRule(BSPHandlerMapping, WorkspaceBuildTargetsHandlerMapping),
        UnionRule(BSPHandlerMapping, BuildTargetSourcesHandlerMapping),
        UnionRule(BSPHandlerMapping, DependencySourcesHandlerMapping),
        UnionRule(BSPHandlerMapping, DependencyModulesHandlerMapping),
    )
Exemple #8
0
def rules():
    return (
        *collect_rules(),
        UnionRule(GenerateSourcesRequest, GenerateGoFromProtobufRequest),
        UnionRule(GoCodegenBuildRequest, GoCodegenBuildProtobufRequest),
        UnionRule(InferDependenciesRequest,
                  InferGoProtobufDependenciesRequest),
    )
Exemple #9
0
def rules():
    return (
        *collect_rules(),
        UnionRule(GenerateLockfile, GeneratePythonLockfile),
        UnionRule(KnownUserResolveNamesRequest,
                  KnownPythonUserResolveNamesRequest),
        UnionRule(RequestedUserResolveNames, RequestedPythonUserResolveNames),
    )
Exemple #10
0
def rules():
    return [
        subsystem_rule(IPython),
        UnionRule(ReplImplementation, PythonRepl),
        UnionRule(ReplImplementation, IPythonRepl),
        run_python_repl,
        run_ipython_repl,
    ]
Exemple #11
0
def rules():
    return (
        *collect_rules(),
        *jvm_tool.rules(),
        *jdk_rules.rules(),
        UnionRule(GenerateSourcesRequest, GenerateJavaFromAvroRequest),
        UnionRule(GenerateToolLockfileSentinel, AvroToolLockfileSentinel),
    )
Exemple #12
0
def rules():
    return [
        UnionRule(DockerComponentFieldSet, DockerPythonSourcesFS),
        UnionRule(DockerComponentFieldSet, DockerResourcesFS),
        UnionRule(DockerComponentFieldSet, DockerFilesFS),
        UnionRule(DockerComponentFieldSet, DockerRelocatedFilesFS),
        *collect_rules(),
    ]
Exemple #13
0
def rules():
    return (
        *collect_rules(),
        *subsystem.rules(),
        UnionRule(GenerateSourcesRequest, GeneratePythonFromThriftRequest),
        UnionRule(InjectDependenciesRequest,
                  InjectApacheThriftPythonDependencies),
    )
def rules():
    return [
        *collect_rules(),
        UnionRule(InferDependenciesRequest,
                  InferTerraformModuleDependenciesRequest),
        UnionRule(PythonToolLockfileSentinel,
                  TerraformHcl2ParserLockfileSentinel),
    ]
Exemple #15
0
def rules():
    return [
        *collect_rules(),
        *extra_fields.rules(),
        *jvm_tool.rules(),
        *jdk_rules.rules(),
        UnionRule(GenerateSourcesRequest, GenerateJavaFromWsdlRequest),
        UnionRule(GenerateToolLockfileSentinel, JaxWsToolsLockfileSentinel),
    ]
Exemple #16
0
def generic_goal_rule_runner() -> RuleRunner:
    return RuleRunner(rules=(
        update_build_files,
        add_line,
        reverse_lines,
        SubsystemRule(UpdateBuildFilesSubsystem),
        UnionRule(RewrittenBuildFileRequest, MockRewriteAddLine),
        UnionRule(RewrittenBuildFileRequest, MockRewriteReverseLines),
    ))
Exemple #17
0
def rules():
    return [
        *collect_rules(),
        UnionRule(PythonFmtRequest, IsortRequest),
        UnionRule(LintRequest, IsortRequest),
        *determine_source_files.rules(),
        *pex.rules(),
        *strip_source_roots.rules(),
    ]
Exemple #18
0
def rules():
    return [
        *import_rules(),
        infer_python_init_dependencies,
        infer_python_conftest_dependencies,
        *ancestor_files.rules(),
        UnionRule(InferDependenciesRequest, InferInitDependencies),
        UnionRule(InferDependenciesRequest, InferConftestDependencies),
    ]
Exemple #19
0
def rules():
    return (
        *collect_rules(),
        *coursier_fetch.rules(),
        UnionRule(GenerateLockfile, GenerateJvmLockfile),
        UnionRule(KnownUserResolveNamesRequest,
                  KnownJVMUserResolveNamesRequest),
        UnionRule(RequestedUserResolveNames, RequestedJVMUserResolveNames),
    )
Exemple #20
0
def rules():
    return [
        *collect_rules(),
        *ancestor_files.rules(),
        *module_mapper.rules(),
        UnionRule(InferDependenciesRequest, InferPythonDependencies),
        UnionRule(InferDependenciesRequest, InferInitDependencies),
        UnionRule(InferDependenciesRequest, InferConftestDependencies),
    ]
Exemple #21
0
def rules():
    return (
        *collect_rules(),
        *import_rules(),
        UnionRule(InjectDependenciesRequest,
                  InjectPexBinaryEntryPointDependency),
        UnionRule(InjectDependenciesRequest,
                  InjectPythonDistributionDependencies),
    )
Exemple #22
0
def rules():
    return [
        *collect_rules(),
        *lockfile.rules(),
        UnionRule(GenerateSourcesRequest, GenerateScalaFromProtobufRequest),
        UnionRule(GenerateToolLockfileSentinel, ScalapbcToolLockfileSentinel),
        ProtobufSourceTarget.register_plugin_field(PrefixedJvmJdkField),
        ProtobufSourcesGeneratorTarget.register_plugin_field(
            PrefixedJvmJdkField),
    ]
Exemple #23
0
def rules():
    return (
        *collect_rules(),
        *import_rules(),
        UnionRule(TargetFilesGeneratorSettingsRequest, PythonFilesGeneratorSettingsRequest),
        UnionRule(GenerateTargetsRequest, GenerateTargetsFromPexBinaries),
        UnionRule(InjectDependenciesRequest, InjectPexBinaryEntryPointDependency),
        UnionRule(InjectDependenciesRequest, InjectPythonDistributionDependencies),
        UnionRule(ValidateDependenciesRequest, PythonValidateDependenciesRequest),
    )
Exemple #24
0
def rules():
    return (
        *collect_rules(),
        *import_rules(),
        UnionRule(GenerateTargetsRequest, GenerateTargetsFromPythonTests),
        UnionRule(GenerateTargetsRequest, GenerateTargetsFromPythonSources),
        UnionRule(GenerateTargetsRequest, GenerateTargetsFromPythonTestUtils),
        UnionRule(InjectDependenciesRequest, InjectPexBinaryEntryPointDependency),
        UnionRule(InjectDependenciesRequest, InjectPythonDistributionDependencies),
    )
Exemple #25
0
 def rules(cls):
     return (
         *super().rules(),
         *target_rules(),
         RootRule(TargetsWithOrigins),
         UnionRule(cls.ConfigSuperclass, cls.ConfigSubclass1),
         UnionRule(cls.ConfigSuperclass, cls.ConfigSubclass2),
         UnionRule(cls.ConfigSuperclassWithOrigin,
                   cls.ConfigSubclassWithOrigin),
     )
Exemple #26
0
def rules():
    return (
        *collect_rules(),
        UnionRule(GenerateSourcesRequest, GenerateJavaFromThriftRequest),
        UnionRule(InjectDependenciesRequest, InjectScroogeJavaDependencies),
        ThriftSourceTarget.register_plugin_field(PrefixedJvmJdkField),
        ThriftSourcesGeneratorTarget.register_plugin_field(PrefixedJvmJdkField),
        ThriftSourceTarget.register_plugin_field(PrefixedJvmResolveField),
        ThriftSourcesGeneratorTarget.register_plugin_field(PrefixedJvmResolveField),
    )
Exemple #27
0
def rules():
    return (
        *collect_rules(),
        *first_party_pkg.rules(),
        *import_analysis.rules(),
        UnionRule(InferDependenciesRequest, InferGoPackageDependenciesRequest),
        UnionRule(InjectDependenciesRequest, InjectGoThirdPartyPackageDependenciesRequest),
        UnionRule(InjectDependenciesRequest, InjectGoBinaryMainDependencyRequest),
        UnionRule(GenerateTargetsRequest, GenerateTargetsFromGoModRequest),
    )
Exemple #28
0
def rules():
    return (
        *collect_rules(),
        *kotlin_parser.rules(),
        *symbol_mapper.rules(),
        *jvm_symbol_mapper.rules(),
        *artifact_mapper.rules(),
        UnionRule(InferDependenciesRequest, InferKotlinSourceDependencies),
        UnionRule(InjectDependenciesRequest, InjectKotlinRuntimeDependencyRequest),
    )
def rules():
    return (
        *collect_rules(),
        *pex.rules(),
        UnionRule(RewrittenBuildFileRequest, RenameDeprecatedTargetsRequest),
        UnionRule(RewrittenBuildFileRequest, RenameDeprecatedFieldsRequest),
        # NB: We want this to come at the end so that running Black or Yapf happens
        # after all our deprecation fixers.
        UnionRule(RewrittenBuildFileRequest, FormatWithBlackRequest),
        UnionRule(RewrittenBuildFileRequest, FormatWithYapfRequest),
    )
Exemple #30
0
 def rules(cls):
     return (
         *super().rules(),
         RootRule(DependenciesRequest),
         inject_smalltalk_deps,
         inject_custom_smalltalk_deps,
         infer_smalltalk_dependencies,
         UnionRule(InjectDependenciesRequest, InjectSmalltalkDependencies),
         UnionRule(InjectDependenciesRequest, InjectCustomSmalltalkDependencies),
         UnionRule(InferDependenciesRequest, InferSmalltalkDependencies),
     )