Esempio n. 1
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *classpath.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *source_files.rules(),
            *scalac_rules(),
            *util_rules(),
            *jdk_rules(),
            *target_types.rules(),
            *protobuf_target_types_rules(),
            *stripped_source_files.rules(),
            *scala_protobuf_rules(),
            *artifact_mapper.rules(),
            *distdir.rules(),
            QueryRule(HydratedSources, [HydrateSourcesRequest]),
            QueryRule(GeneratedSources, [GenerateScalaFromProtobufRequest]),
            QueryRule(DigestContents, (Digest, )),
        ],
        target_types=[
            ScalaSourceTarget,
            ScalaSourcesGeneratorTarget,
            ProtobufSourcesGeneratorTarget,
            JvmArtifactTarget,
        ],
    )
    rule_runner.set_options(
        [],
        env_inherit=PYTHON_BOOTSTRAP_ENV,
    )
    return rule_runner
Esempio n. 2
0
def rules():
    return [
        *collect_rules(),
        *artifact_mapper.rules(),
        *scala_parser.rules(),
        *symbol_mapper.rules(),
        UnionRule(InferDependenciesRequest, InferScalaSourceDependencies),
    ]
Esempio n. 3
0
def rules():
    return [
        *collect_rules(),
        *artifact_mapper.rules(),
        *java_parser_rules(),
        *symbol_mapper.rules(),
        *source_files_rules(),
        UnionRule(InferDependenciesRequest, InferJavaSourceDependencies),
    ]
Esempio n. 4
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),
    )
Esempio n. 5
0
def rules():
    return [
        *collect_rules(),
        *artifact_mapper.rules(),
        *scala_parser.rules(),
        *scalac_plugins.rules(),
        *symbol_mapper.rules(),
        UnionRule(InferDependenciesRequest, InferScalaSourceDependencies),
        UnionRule(InjectDependenciesRequest, InjectScalaLibraryDependencyRequest),
        UnionRule(InjectDependenciesRequest, InjectScalaPluginDependenciesRequest),
    ]
Esempio n. 6
0
def rules():
    return (
        *collect_rules(),
        *subsystem.rules(),
        UnionRule(GenerateSourcesRequest, GenerateJavaFromThriftRequest),
        UnionRule(InjectDependenciesRequest,
                  InjectApacheThriftJavaDependencies),
        ThriftSourceTarget.register_plugin_field(PrefixedJvmJdkField),
        ThriftSourcesGeneratorTarget.register_plugin_field(
            PrefixedJvmJdkField),
        ThriftSourceTarget.register_plugin_field(PrefixedJvmResolveField),
        ThriftSourcesGeneratorTarget.register_plugin_field(
            PrefixedJvmResolveField),
        # Rules needed to avoid rule graph errors.
        *artifact_mapper.rules(),
    )
Esempio n. 7
0
def rule_runner() -> RuleRunner:
    return RuleRunner(
        rules=[
            *thrift_rules(),
            *apache_thrift_rules(),
            *apache_thrift_java_rules(),
            *source_files.rules(),
            *source_root.rules(),
            *graph.rules(),
            *stripped_source_files.rules(),
            *artifact_mapper.rules(),
            QueryRule(HydratedSources, [HydrateSourcesRequest]),
            QueryRule(GeneratedSources, [GenerateJavaFromThriftRequest]),
        ],
        target_types=[ThriftSourcesGeneratorTarget, JvmArtifactTarget],
    )
Esempio n. 8
0
def rules():
    return [
        *collect_rules(),
        *lockfile.rules(),
        *export_codegen_goal.rules(),
        *dependency_inference.rules(),
        UnionRule(GenerateSourcesRequest, GenerateScalaFromProtobufRequest),
        UnionRule(GenerateToolLockfileSentinel, ScalapbcToolLockfileSentinel),
        ProtobufSourceTarget.register_plugin_field(PrefixedJvmJdkField),
        ProtobufSourcesGeneratorTarget.register_plugin_field(
            PrefixedJvmJdkField),
        ProtobufSourceTarget.register_plugin_field(PrefixedJvmResolveField),
        ProtobufSourcesGeneratorTarget.register_plugin_field(
            PrefixedJvmResolveField),
        # Rules to avoid rule graph errors.
        *artifact_mapper.rules(),
        *distdir.rules(),
    ]
Esempio n. 9
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *jvm_tool.rules(),
            *dep_inference_rules(),
            *kotlin_parser.rules(),
            *symbol_mapper.rules(),
            *kotlin_target_type_rules(),
            *source_files.rules(),
            *jvm_util_rules(),
            *jdk_rules.rules(),
            *artifact_mapper.rules(),
            *jvm_symbol_mapper.rules(),
            QueryRule(Addresses, [DependenciesRequest]),
            QueryRule(ExplicitlyProvidedDependencies, [DependenciesRequest]),
            QueryRule(InferredDependencies, [InferKotlinSourceDependencies]),
            QueryRule(Targets, [UnparsedAddressInputs]),
        ],
        target_types=[KotlinSourcesGeneratorTarget],
        objects={"parametrize": Parametrize},
    )
    rule_runner.set_options(args=[], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner